コード例 #1
0
 /// <summary>
 /// 更新游戏
 /// </summary>
 /// <returns></returns>
 public void UpdateGame()
 {
     if (gameStatus == GameStatus.Going)
     {
         if (IsBattle == true)
         {
             //战斗结束后再更新数据
             IsBattle = false;
             GameObject loser = GameUtil.Battle(attacker, defender);
             //这里再写入一个映射 阵亡者与步数的映射,复盘用到
             GameCache.SetLoserStepDic(loser, step);
             KilledEvent(loser);
         }
         UpdateBout();
     }
 }