//Function : BoostDefense //~~~~~~~~~~~~~~~~~~~~~~~~ //This is an Action function, for increasing Defense void BoostDefense() { if (m_actionTimer >= data.AnimTimeBoostDef) { Action = null; } else if (!m_actionTaken && m_actionTimer >= 0.5f * data.AnimTimeBoostDef) { m_actionTaken = true; m_defBoost += data.DefBoostAmount; BoostDefense_Event.Raise(); } }
//Function : BoostAttack //~~~~~~~~~~~~~~~~~~~~~~~~ //This is an Action function, for increasing Attack void BoostAttack() { if (m_actionTimer >= data.AnimTimeBoostAtk) { Action = null; } else if (!m_actionTaken && m_actionTimer >= 0.5f * data.AnimTimeBoostAtk) { m_actionTaken = true; m_atkBoost += data.AtkBoostAmount; BoostAttack_Event.Raise(); } }
//Function : AttackNormal //~~~~~~~~~~~~~~~~~~~~~~~~ //This is an Action function, for carrying out a Normal Attack void AttackNormal() { if (m_actionTimer >= data.AnimTimeAtkNormal) { Action = null; } else if (!m_actionTaken && m_actionTimer >= 0.5f * data.AnimTimeAtkNormal) { m_actionTaken = true; //Attack Normal AttackNormal_Event.Raise(); } }
//Function : AttackSpecial //~~~~~~~~~~~~~~~~~~~~~~~~ //This is an Action function, for carrying out a Special Attack void AttackSpecial() { if (m_actionTimer >= data.AnimTimeAtkSpecial) { Action = null; } else if (!m_actionTaken && m_actionTimer >= 0.5f * data.AnimTimeAtkSpecial) { m_actionTaken = true; if (m_chargingSpecialAttack) //2nd Turn - Attack { m_chargingSpecialAttack = false; //Attack Special AttackSpecial_Event.Raise(); } else //1st Turn - Charging up { m_chargingSpecialAttack = true; } } }
//Function : SetNextAction //~~~~~~~~~~~~~~~~~~~~~~~~ //EnemyDrumonAction _action //~~~~~~~~~~~~~~~~~~~~~~~~ //This function sets the Action of the Enemy, and should normally only be called in ExecuteTurn() void SetNextAction(EnemyDrumonAction _action) { Action = _action; m_actionTimer = 0; m_actionTaken = false; }