예제 #1
0
 public void OnClickGrid(Vector2Int pos, Team team)
 {
     switch (phase.Value)
     {
         case GamePhase.Prepare:
             break;
         case GamePhase.SelectChara:
             {
                 var chara = grids.GetCharacter(team, pos);
                 if (chara != null)
                 {
                     characterPanel.SetChara(chara);
                     currentChara = chara;
                 }
             }
             break;
         case GamePhase.Attack:
             {
                 if (team == currentChara.team) return;
                 var target = grids.GetAttackTarget(team, pos.x);
                 currentChara.Attack(target);
                 phase.Value = GamePhase.SelectChara;
             }
             break;
         case GamePhase.SpecSkill:
             {
                 currentSkill.Cast(pos);
                 phase.Value = GamePhase.SelectChara;
             }
             break;
         case GamePhase.EndTurn:
             break;
         default:
             break;
     }
 }