using CoreGame; namespace CoreGame.Render { //triggerCfg.param1 1为永久buff,2为2秒限时buff public class Trigger_MakeEntityCannotBeHurt : TriggerBase { public override void OnEvent(TriggerSpec self, int eventId, object param1) { OnTrigger(self, eventId, param1); } public override bool OnPreExecuteCheck(TriggerSpec self, int eventId, object param1) { if (triggerCfg.param1 == (int)param1) { return true; } return false; } public override void Init(TriggerSpec self) { RegEntityEvent(self, ClientEvent.MakeEntityCannotBeHurt); } public override void UnInit(TriggerSpec self) { UnRegEntityEvent(self, ClientEvent.MakeEntityCannotBeHurt); } } }