public void spawnReset() { setHp(getMaxHp()); mAllSkills.clear(); mBullets.clear(); mUnitsHeap.clear(); mUnitsHeap.add(this); }
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); }
public void deleteUnit(AbstractBullet unit) { mBullets.removeValue(unit, true); mUnitsHeap.remove(unit); }
public Tower(BattleGame game) { super(game); mHp = mMaxHp; mUnitsHeap.add(this); }
public void addUnit(AbstractBullet unit) { mBullets.add(unit); mUnitsHeap.add(unit); }