using CoreGame; namespace CoreGame.Render { public class Trigger_LevelMonsterRage : 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) { var levelWaveEnt = Contexts.Combat.LevelWave; var levelWave = levelWaveEnt.levelWave; var waveCount = 0; foreach (var waveParam in levelWave.waveParams) { if (waveParam.eids.Count > 0) { waveCount++; } } return waveCount >= triggerCfg.param1; } public override void Init(TriggerSpec self) { RegEntityEvent(self, ClientEvent.LevelMonsterRage); } public override void UnInit(TriggerSpec self) { UnRegEntityEvent(self, ClientEvent.LevelMonsterRage); } } }