1
This commit is contained in:
parent
2475503eab
commit
3e21e93834
@ -479,3 +479,8 @@ void Trigger::BulletHitBuff(Bullet* bullet)
|
|||||||
{
|
{
|
||||||
DispatchEvent(kTriggerBulletHitBuffEvent, {bullet});
|
DispatchEvent(kTriggerBulletHitBuffEvent, {bullet});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Trigger::Attacked(Creature* sender)
|
||||||
|
{
|
||||||
|
DispatchEvent(kAttacked, {sender});
|
||||||
|
}
|
||||||
|
@ -39,7 +39,8 @@ enum EventId_e
|
|||||||
kFlyHookDestoryEvent,
|
kFlyHookDestoryEvent,
|
||||||
kSkillBulletPreCreateEvent,
|
kSkillBulletPreCreateEvent,
|
||||||
kUseSkillEvent,
|
kUseSkillEvent,
|
||||||
kTriggerBulletHitBuffEvent
|
kTriggerBulletHitBuffEvent,
|
||||||
|
kAttacked
|
||||||
};
|
};
|
||||||
|
|
||||||
class Weapon;
|
class Weapon;
|
||||||
@ -76,6 +77,7 @@ public:
|
|||||||
void FlyHookCreate(Bullet* bullet);
|
void FlyHookCreate(Bullet* bullet);
|
||||||
void FlyHookDestory();
|
void FlyHookDestory();
|
||||||
void BulletHitBuff(Bullet* bullet);
|
void BulletHitBuff(Bullet* bullet);
|
||||||
|
void Attacked(Creature* sender);
|
||||||
|
|
||||||
std::weak_ptr<EventHandlerPtr> AddListener(int event_id, CommonCbProc cb);
|
std::weak_ptr<EventHandlerPtr> AddListener(int event_id, CommonCbProc cb);
|
||||||
void RemoveEventHandler(std::weak_ptr<EventHandlerPtr> handler_ptr);
|
void RemoveEventHandler(std::weak_ptr<EventHandlerPtr> handler_ptr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user