1
This commit is contained in:
parent
710a56228a
commit
29ec288c9c
@ -418,3 +418,8 @@ void Trigger::DispatchEvent(int event_id, const std::vector<std::any>& param)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Trigger::BulletHit(Bullet* bullet)
|
||||
{
|
||||
DispatchEvent(kBulletHit, {bullet});
|
||||
}
|
||||
|
@ -28,12 +28,14 @@ enum EventId_e
|
||||
kShieldDestoryEvent = 5,
|
||||
kFlyHookPullEvent = 6,
|
||||
kRescueEvent = 7,
|
||||
kBulletHit = 8
|
||||
};
|
||||
|
||||
class Weapon;
|
||||
class Creature;
|
||||
class Skill;
|
||||
class Buff;
|
||||
class Bullet;
|
||||
class Trigger
|
||||
{
|
||||
public:
|
||||
@ -52,6 +54,8 @@ public:
|
||||
void Die();
|
||||
void ActiveBuff(MetaData::Buff* buff_meta);
|
||||
void DeactiveBuff(MetaData::Buff* buff_meta);
|
||||
void BulletHit(Bullet* bullet);
|
||||
|
||||
std::weak_ptr<EventHandlerPtr> AddListener(int event_id, CommonCbProc cb);
|
||||
void RemoveEventHandler(std::weak_ptr<EventHandlerPtr> handler_ptr);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user