IEnumerator C_SkillPlay(float _Wait) { m_Caster.SetStateAndAnimationLocal(E_ANIMATION.SPECIAL1, 0.25f, 1.0f, _Wait, false); yield return(new WaitForSeconds(_Wait)); m_CurrentCooldown = m_MaxCooldown; List <Character> list = Character.FindTeamAllArea(m_Caster, m_Caster.m_Team, m_Caster.transform.position, m_Radius, false); if (list != null) { E_BUFF buff = m_Type == E_PHALANXTYPE.ADDTYPE ? E_BUFF.DEFENCEUP : E_BUFF.DEFENCEMULTI; object[] datas = null; if (m_Type == E_PHALANXTYPE.ADDTYPE) { datas = new object[] { m_Duration, m_DefenceBonus, m_DamageType, "Effect/" + m_Effect.name, m_EffectAttachPoint } } ; else { datas = new object[] { m_Duration, m_DefenceBonusMultiply, m_DamageType, "Effect/" + m_Effect.name, m_EffectAttachPoint } }; for (int i = 0; i < list.Count; ++i) { list[i].AddBuff(buff, datas); } } }
private int Action(E_BUFF type) { Debug.Log(type.ToString() + " Action"); switch (type) { case E_BUFF.Mask: this.alert.Show("AlterMaskAntiCovid"); this.Decrement(type); return(0); case E_BUFF.Pill: this.PillAlert.SetActive(true); StartCoroutine(WaitForPillAction()); return(1); default: throw new System.ArgumentException("Invalid buff"); } }
public void Decrement(E_BUFF type) { this.buffDictionary[type.ToString()].Decrement(); }
public void Increment(E_BUFF type, GameObject buffObject) { this.buffDictionary[type.ToString()].Increment(); Destroy(buffObject); }
public void AddBuff(E_BUFF _BuffID, object[] _BuffData = null) { m_PhotonView.RPC("AddBuff_RPC", RpcTarget.AllViaServer, (int)_BuffID, _BuffData); }