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.
31 lines
1009 B
31 lines
1009 B
using CoreGame;
|
|
using GAS.Runtime;
|
|
|
|
namespace CoreGame.Render
|
|
{
|
|
public class Trigger_ChangeGunSkillEnd : TriggerBase
|
|
{
|
|
public override void OnEvent(TriggerSpec self, int eventId, object param1)
|
|
{
|
|
OnTrigger(self, eventId, param1);
|
|
}
|
|
|
|
public override void Init(TriggerSpec self)
|
|
{
|
|
self.tagChangedHandle = (tag, count) =>
|
|
{
|
|
if (count > 0) // remove
|
|
return;
|
|
OnEvent(self, 0, null);
|
|
};
|
|
self.owner.abilitySystem.GameplayTagCountContainer.RegisterGameplayTagEvent(GTagLib.Solt_ChangeGunSkill,
|
|
EGameplayTagEventType.NewOrRemoved, self.tagChangedHandle);
|
|
}
|
|
|
|
public override void UnInit(TriggerSpec self)
|
|
{
|
|
self.owner.abilitySystem.GameplayTagCountContainer.UnregisterGameplayTagEvent(GTagLib.Solt_ChangeGunSkill,
|
|
EGameplayTagEventType.NewOrRemoved, self.tagChangedHandle);
|
|
}
|
|
}
|
|
}
|