Advertisement
mifth

ShootBullet.java

Sep 29th, 2011
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 KB | None | 0 0
  1.  
  2. import com.jme3.asset.AssetManager;
  3. import com.jme3.material.Material;
  4. import com.jme3.math.*;
  5. import com.jme3.scene.Geometry;
  6. import com.jme3.scene.Node;
  7. import com.jme3.scene.shape.Box;
  8.  
  9. public class ShootBullet {
  10.    
  11.     Node shotGroup = new Node("shotGroup");
  12.     Box box_bullet = new Box(Vector3f.ZERO, 1, 1, 1);
  13.     Material mat_box;
  14.     Geometry bullet;
  15.     ShootBulletRun sbrun;
  16.    
  17.     ShootBullet (ShootBulletRun runn) {
  18.    
  19.     sbrun = runn;    
  20.     bullet = new Geometry ("Bullet", box_bullet);
  21.     Material mat_bullet = new Material(sbrun.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
  22.     mat_bullet.setColor("m_Color", ColorRGBA.Red);
  23.     bullet.setMaterial(mat_bullet);
  24. //    sbrun.getRootNode().attachChild(bullet);
  25.     }
  26.  
  27.    
  28. }
  29.  
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement