Example #1
0
 private void PlayCard(MatchData match, PlayCardCommandData commandData)
 {
     if (commandData.cardInstance.TryGetStrongType <Monster>(out CardInstance <Monster> monster))
     {
         match.SpawnMonster(monster, commandData.targetTile, commandData.sender);
     }
 }
Example #2
0
        public override void OnExecute(GameManager gm, ICommand command)
        {
            PlayCardCommandData data = command.GetData <PlayCardCommandData>();

            if (data == null)
            {
                return;
            }
            if (data.cardInstance.TryGetStrongType <Monster>(out CardInstance <Monster> monster))
            {
                gm.match.SpawnMonster(monster, data.targetTile, data.sender);
            }
        }