This commit is contained in:
aozhiwei 2023-03-15 20:26:16 +08:00
parent 1c51d9ba3a
commit 3d0e1e02a2
3 changed files with 14 additions and 0 deletions

View File

@ -66,6 +66,7 @@ Creature::Creature():MoveableEntity()
inventory_[IS_1XSCOPE].num = 1;
movement_ = std::make_shared<Movement>(this);
gun_grasp_ = std::make_shared<GunGrasp>(this);
gun_grasp_->Init();
}
Creature::~Creature()

View File

@ -19,3 +19,14 @@ GunGrasp::GunGrasp(Creature* owner)
GunGrasp::~GunGrasp()
{
}
void GunGrasp::Init()
{
owner_->GetTrigger()->AddListener
(
kDieEvent,
[this] (const a8::Args& args) mutable
{
}
);
}

View File

@ -10,6 +10,8 @@ class GunGrasp
GunGrasp(Creature* owner);
~GunGrasp();
void Init();
private:
Creature* owner_ = nullptr;
};