예제 #1
0
 /** with this method we can obtain static obstacle from pool */
 public synchronized StaticObstacle obtainPoolItem(float x, float y) {
   StaticObstacle obstacle = super.obtainPoolItem();
   obstacle.setPosition(x, y);
   obstacle.setVisible(true);
   obstacle.setIgnoreUpdate(false);
   return obstacle;
 }
예제 #2
0
 /** this method is for handling static obstacle when recycle method called * */
 @Override
 protected void onHandleRecycleItem(StaticObstacle obstacle) {
   super.onHandleRecycleItem(obstacle);
   obstacle.setVisible(false);
   obstacle.setIgnoreUpdate(true);
 }