Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.jme3.asset.AssetManager;
- import com.jme3.material.Material;
- import com.jme3.math.*;
- import com.jme3.scene.Geometry;
- import com.jme3.scene.Node;
- import com.jme3.scene.shape.Box;
- public class ShootBullet {
- Node shotGroup = new Node("shotGroup");
- Box box_bullet = new Box(Vector3f.ZERO, 1, 1, 1);
- Material mat_box;
- Geometry bullet;
- ShootBulletRun sbrun;
- ShootBullet (ShootBulletRun runn) {
- sbrun = runn;
- bullet = new Geometry ("Bullet", box_bullet);
- Material mat_bullet = new Material(sbrun.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
- mat_bullet.setColor("m_Color", ColorRGBA.Red);
- bullet.setMaterial(mat_bullet);
- // sbrun.getRootNode().attachChild(bullet);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement