void Start() { m_lastWillD = new Dictionary<ELastWill, funct> { { ELastWill.ROCK, ApplyRock }, { ELastWill.BOOST, ApplyBoost }, { ELastWill.EXPLOSION, ApplyExplosion }, }; m_prevLastWill = ELastWill.NONE; }
public void LoadPlayerFromCard(CardElement elem) { m_id = elem.GetId(); m_lastWillPow = elem.GetLastWill(); m_name = elem.GetName(); m_maxHp = elem.GetHp(); m_curHp = m_maxHp; m_baseAttack = elem.GetAttack(); m_defence = elem.GetDefence(); GetComponent<SpriteRenderer>().color = elem.GetColor(); if (m_lastWillFunc.GetPreviousWill() == ELastWill.BOOST) m_bonusAttack = 30; }
public void SetParams(CardElement other) { _isUnlocked = other._isUnlocked; m_id = other.GetId(); m_cost = other.GetCost(); m_name = other.GetName(); m_lastWillPow = other.GetLastWill(); m_lastWillDescription = other.GetLastWillDesc(); m_maxHp = other.GetHp(); m_baseAttack = other.GetAttack(); m_defence = other.GetDefence(); }
public void UseLastWill(ELastWill pow, GameObject obj, int id) { m_lastWillD[pow](obj); m_prevLastWill = pow; gameObject.GetComponent<GameController>().ConsumeHero(id); }