예제 #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);
 }