Example #1
0
 /** Calculates if a GameObject is outside the world or not. */
 private void calculateOutsideWorld(GameObject go) {
   if (go instanceof MoveableGameObject) {
     if (!go.isActive()) {
       return;
     }
     if (go.getX() - go.getFrameWidth() < 0
         || go.getX() > mapWidth
         || go.getY() - go.getFrameHeight() < 0
         || go.getY() > mapHeight) {
       ((MoveableGameObject) go).outsideWorld();
     }
   }
 }
Example #2
0
 /*
  * (non-Javadoc)
  *
  * @see android.gameengine.icadroids.objects.MoveableGameObject#update()
  */
 public void update() {
   super.update();
   decay--;
   if (decay < 0) this.deleteThisGameObject();
 }