示例#1
0
 void GameLoop()
 {
     //Start by adding passive action progress to Hacker and Itguy
     HackerObj.AddDurationProgress();
     ItguyObj.AddDurationProgress();
     //Change Player faces based on the progress
     HackerObj.ProgressFace(ItguyObj.Progress());
     ItguyObj.ProgressFace(HackerObj.Progress());
     //Check if either player has won
     if (HackerObj.IsActionFinished())
     {
         Debug.Log("Hacker wins!");
         state = GameState.HackerWins;
     }
     else if (ItguyObj.IsActionFinished())
     {
         Debug.Log("Itguy wins!");
         state = GameState.ItguyWins;
     }
 }