Пример #1
0
 /// <summary>
 /// Overrides the enemy's update function to use
 /// </summary>
 /// <param name="enemy"> stores a reference of the EnemyStateMachine in enemy</param>
 /// <returns>nothing because the enemy is dead</returns>
 public override EnemyState Update(EnemyStateMachine enemy)
 {
     //Debug.Log("boom"); 
     enemy.Explode(); // tells the enemy to explode(destroy itself)
     return null; // stay in this state
 } // end update
Пример #2
0
        public abstract EnemyState Update(EnemyStateMachine enemy); // creates a special update that can be taken over by other classes

        public virtual void OnStart(EnemyStateMachine enemy) { } // a start function that can be taken over by other classes
Пример #3
0
 public virtual void OnStart(EnemyStateMachine enemy) { } // a start function that can be taken over by other classes
 public virtual void OnEnd(EnemyStateMachine enemy) { } // a end function that can be taken over by other classes
Пример #4
0
 public abstract EnemyState Update(EnemyStateMachine enemy); // creates a special update that can be taken over by other classes