Esempio n. 1
0
 @Override
 /** Dispose all the resources. */
 public void dispose() {
   super.dispose();
   for (Texture t : textureMap.values()) {
     t.dispose();
   }
   textureMap.clear();
   regionMap.clear();
   for (BitmapFont f : fontMap.values()) {
     f.dispose();
   }
   for (Sound s : soundMap.values()) {
     s.dispose();
   }
 }
 @Override
 public void dispose() {
   Iterator<SpaceScene> appIter = scenes.values();
   while (appIter.hasNext()) {
     SpaceScene app = appIter.next();
     app.dispose();
   }
 }
 @Override
 public void resize(int width, int height) {
   Iterator<SpaceScene> appIter = scenes.values();
   while (appIter.hasNext()) {
     SpaceScene app = appIter.next();
     app.resize(width, height);
   }
 }
 @Override
 public void create() {
   Iterator<SpaceScene> appIter = scenes.values();
   while (appIter.hasNext()) {
     SpaceScene app = appIter.next();
     app.create();
   }
   reloadScene("main menu");
   switchScene("main menu");
 }
Esempio n. 5
0
  public void act(float delta) {
    mTime += delta;
    getAttackBounds().set(getX() - getWidth() / 2, getY(), getWidth(), getHeight());

    for (Iterator<SkillItem> it = mAllSkills.values().iterator(); it.hasNext(); ) {
      SkillItem skill = it.next();
      if (mTime >= skill.getCooldownFinish()) {
        skill.resetCooldown();
      }
      skill.getInfo().act(skill, delta);
    }

    mUnitsHeap.act(this);
  }