void InitTriggers() { if (m_Data.trigger_TimeInterval > PETools.PEMath.Epsilon) { PEAT_Time time = new PEAT_Time(); time.interval = m_Data.trigger_TimeInterval; m_Triggers.Add(time); } if (null != m_Data.trigger_AbnormalHit && null != m_Entity.Alnormal) { PEAT_AbnormalHit abnormalHit = new PEAT_AbnormalHit(); abnormalHit.hitAbnormals = m_Data.trigger_AbnormalHit; m_Entity.Alnormal.evtStart += abnormalHit.OnHitAbnormal; m_Triggers.Add(abnormalHit); } }
void InitTriggers() { if (m_Data.trigger_TimeInterval > PETools.PEMath.Epsilon) { PEAT_Time time = new PEAT_Time(); time.interval = m_Data.trigger_TimeInterval; m_Triggers.Add(time); } if (m_Data.trigger_BuffAdd != null) { PEAT_Event_IntArray buffAdd = new PEAT_Event_IntArray(); buffAdd.intValues = m_Data.trigger_BuffAdd; AddSaveBuffs(buffAdd.intValues); m_AbnormalCmpt.evtBuffAdd += buffAdd.OnIntEvent; m_Triggers.Add(buffAdd); } if (m_Data.trigger_ItemGet != null) { PEAT_Event_IntArray itemAdd = new PEAT_Event_IntArray(); itemAdd.intValues = m_Data.trigger_ItemGet; m_AbnormalCmpt.evtItemAdd += itemAdd.OnIntEvent; m_Triggers.Add(itemAdd); } if (m_Data.trigger_Damage) { PEAT_Event damage = new PEAT_Event(); m_AbnormalCmpt.evtDamage += damage.OnEvent; m_Triggers.Add(damage); } if (m_Data.trigger_InWater) { PEAT_InWater inWater = new PEAT_InWater(); inWater.view = m_AbnormalCmpt.Entity.biologyViewCmpt; inWater.passenger = m_AbnormalCmpt.Entity.passengerCmpt; m_Triggers.Add(inWater); } }
void InitRemoveTriggers() { m_EndImm = m_Data.rt_Immediate; if (m_EndImm) { return; } if (m_Data.rt_TimeInterval > PETools.PEMath.Epsilon) { PEAT_Time time = new PEAT_Time(); time.interval = m_Data.rt_TimeInterval; m_RemoveTriggers.Add(time); } if (null != m_Data.rt_BuffRemove) { PEAT_Event_IntArray buffRemove = new PEAT_Event_IntArray(); buffRemove.intValues = m_Data.rt_BuffRemove; m_AbnormalCmpt.evtBuffRemove += buffRemove.OnIntEvent; m_RemoveTriggers.Add(buffRemove); } if (m_Data.rt_EffectEnd) { PEAT_EffectEnd effectEnd = new PEAT_EffectEnd(); effectEnd.abnormal = this; m_RemoveTriggers.Add(effectEnd); } if (m_Data.rt_OutsideWater) { PEAT_Event outWater = new PEAT_Event(); m_AbnormalCmpt.evtOutWater += outWater.OnEvent; m_RemoveTriggers.Add(outWater); } }