1
This commit is contained in:
parent
718886e247
commit
bc9aab25c6
@ -2504,6 +2504,7 @@ void Creature::OnBattleStart(Room* room)
|
||||
TryAddBuffAndSetTime(this, kInvincibleBuffId, FRAME_RATE_MS * 2);
|
||||
}
|
||||
battle_start_time_ = f8::App::Instance()->GetNowTime();
|
||||
GetTrigger()->OnBattleStart();
|
||||
}
|
||||
|
||||
bool Creature::CanFollow(Creature* follower)
|
||||
|
@ -738,3 +738,8 @@ void Trigger::BulletDmgEnd(Creature* target)
|
||||
{
|
||||
DispatchEvent(kBulletDmgEndEvent, {target});
|
||||
}
|
||||
|
||||
void Trigger::OnBattleStart()
|
||||
{
|
||||
DispatchEvent(kBattleStartEvent, {});
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ enum EventId_e
|
||||
kBulletDmgStartEvent,
|
||||
kBulletDmgEndEvent,
|
||||
kCrazeModeEvent,
|
||||
kBattleStartEvent
|
||||
};
|
||||
|
||||
class Weapon;
|
||||
@ -94,6 +95,7 @@ public:
|
||||
void BeAttack(int attacker_id);
|
||||
void BulletDmgStart(Creature* target);
|
||||
void BulletDmgEnd(Creature* target);
|
||||
void OnBattleStart();
|
||||
|
||||
std::weak_ptr<EventHandler> AddListener(int event_id, a8::CommonCbProc cb);
|
||||
void RemoveEventHandler(std::weak_ptr<EventHandler> handler_ptr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user