Пример #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);
 }