コード例 #1
0
ファイル: Zombie.cs プロジェクト: kjchiu/zomgame-2
 /// <summary>
 /// This state changing function is used for the SEARCH state. The location is where the zombie will be heading.
 /// </summary>
 /// <param name="state">This will be "Search", otherwise the destination is ignored.</param>
 /// <param name="destination">The destination for the search.</param>
 public void ChangeStateTo(string state, MapBlock destination)
 {
     currentState = stateList[state];
     if (state.Equals(ZombieStateNames.SEARCH_STATE))
     {
         ((SearchState)currentState).Destination = destination;
     }
 }
コード例 #2
0
ファイル: Zombie.cs プロジェクト: kjchiu/zomgame-2
 /// <summary>
 /// State-changing function for any state except SEARCH. Uses state names from ZombieStateNames.cs.
 /// </summary>
 /// <param name="state">Name of state to switch to</param>
 public void ChangeStateTo(string state)
 {
     currentState = stateList[state];
 }
コード例 #3
0
ファイル: Zombie.cs プロジェクト: kjchiu/zomgame-2
 public void ChangeStateTo(ZombieState state)
 {
     state.player = currentState.player;
     state.zombie = this;
     currentState = state;
 }