Ejemplo n.º 1
0
 /**
  * will remove this Enemy From the currentEnemyGrid
  * Note this does Reset any previous changes to the stored storedStateChangeObject
  * before making its own changes
  */
 public override StateChange removeThis()
 {
     if (currentTarget != null)
     {
         currentTarget.removeNode();
         currentTarget = null;
     }
     byteTarget = null;
     this.targetEnemyCollumn = -1;
     return(base.removeThis());
 }
Ejemplo n.º 2
0
        /**
         * Will remove all EnemySubSetNodes from the set
         * @param destroyData
         */
        public void removeAllEnemies(bool destroyData)
        {
            EnemySubSetNode target = firstNode.getNextNode();

            while (target != null)
            {
                EnemySubSetNode nextTarget = target.getNextNode();
                if (target.data != null && destroyData)
                {
                    target.data.removeThis();
                }
                target.removeNode();
                target = nextTarget;
            }
        }