示例#1
0
 public Bullet() {
   super(AssetLoader.getInstance().getImage("bullet"));
   m = World.getInstance().getEntityManager();
 }
示例#2
0
 /** use this for level collision ect. */
 public void checkForUnwantedContacts(Contact contact) {
   Entity other = getOtherEntity(contact);
   if (other == null) {
     World.getInstance().getEntityManager().removeEntity(this);
   }
 }
示例#3
0
 @Override
 void enter() {
   timer = 500;
   Astronaut astronaut = World.getInstance().getAstronaut();
   target = astronaut.getPosition().sub(getPosition()).normalise().scale(ATTACKSPEED);
 }