/// <summary> /// Crea un minion en la mesa a partir de una carta arrastrada /// </summary> /// <param name="playedCard"></param> /// <param name="tablePos"></param> public void PlayAMinionFromHand(MinionCard minionCard, int tablePos) { Gold.AddGold(-minionCard.CurrentGoldCost); //Borramos la carta de la mano Hand.RemoveCard(minionCard); Destroy(minionCard.gameObject); //TODO: Minion al instante en battlefield? new PlayAMinionCommand(this, minionCard, tablePos).EnqueueComand(); }
//TODO: FROZEN, DICCIONARIO DE CARTAS JUGADAS //------------Atributos privados------------- /// <summary> /// Construye el minion, establece todos los atributos de minionInfo /// </summary> /// <param name="minionInfo"></param> public void BuildMinion(MinionCard minionCard) { minionInfo = minionCard.CardInfo; maxHealth = minionCard.MaxHealth; Attack = minionCard.Attack; CurrentHealth = minionCard.MaxHealth; attacksForOneTurn = 1; attacksLeftThisTurn = 0; attacksThisTurn = 0; creatureGraphicImage.sprite = minionInfo.Image; Taunt = false; Charge = false; Stealth = false; Windfury = false; if (minionCard.Charge) { ApplyCharge(); } if (minionCard.Windfury) { ApplyWindfury(); } if (minionCard.Taunt) { ApplyTaunt(); } if (minionCard.Stealth) { ApplyStealth(); } }
//---------------------PRIVATE VARIABLES------------------------------ /// <summary> /// Obtenemos referencias /// </summary> protected override void Awake() { base.Awake(); minionCard = GetComponent <MinionCard>(); }
/// <summary> /// Comando que juega una carta de la mano en el battlefield /// </summary> public PlayAMinionCommand(Player player, MinionCard cardInfo, int tablePos) { this.cardInfo = cardInfo; this.player = player; this.tablePos = tablePos; }