You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
1.0 KiB

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);
}
}
}