예제 #1
0
 public void OnClick()
 {
     if (moheData != null && !moheData.MoheDead() && GameData.Instance.RuntimeGame.TurnLogic.IsMyTurn(contPlayer) && BoardController.Instance.CanClickJewel())
     {
         GameEvents.Instance.Notify <ISelectMoheActionButton>(i => i.OnSelectMoheActionButton(seat, moheData.InstanceID));
     }
 }
예제 #2
0
        public void Execute()
        {
            if (mohe.MoheDead())
            {
                // Find the player that the mohe belongs to
                IRoster roster = GameController.Instance.GetPlayerController(mohe.PlayerSeat).Player.Roster;

                // If the player has no more mohe, end the game
                if (roster.AllVanquished)
                {
                    Debug.Log("Move game state ended");
                    GameData.Instance.RuntimeGame.EndGame();
                }
                else
                {
                    // If the player has more mohe, swap in an available mohe for the destroyed one
                    Debug.Log("More Mohe! Continue game");
                    roster.AutoRoster();
                }
            }
        }