1
This commit is contained in:
parent
ceeb840e7d
commit
e8a2d36a3f
@ -79,6 +79,7 @@ void InternalShot(Creature* c,
|
||||
is_tank_skin);
|
||||
}
|
||||
}
|
||||
c->GetTrigger()->Shot(weapon_meta);
|
||||
if (weapon_meta->i->recoil_force() > 0.000001) {
|
||||
a8::Vec2 old_move_dir = c->GetMoveDir();
|
||||
c->MustBeAddBuff(c, kRecoilBuffId);
|
||||
@ -100,6 +101,7 @@ void InternalShot(Creature* c,
|
||||
Creature::Creature():MoveableEntity()
|
||||
{
|
||||
trigger_ = new Trigger(this);
|
||||
trigger_->Init();
|
||||
weapons.reserve(MAX_WEAPON_NUM);
|
||||
for (size_t i = 0; i < MAX_WEAPON_NUM; ++i) {
|
||||
auto& weapon = a8::FastAppend(weapons);
|
||||
@ -126,6 +128,7 @@ Creature::~Creature()
|
||||
}
|
||||
skill_hash_.clear();
|
||||
ClearPassiveSkill();
|
||||
trigger_->UnInit();
|
||||
A8_SAFE_DELETE(trigger_);
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ void Trigger::TakeonWeapon(Weapon* old_weapon, Weapon* new_weapon)
|
||||
{
|
||||
}
|
||||
|
||||
void Trigger::Shot(Weapon* weapon)
|
||||
void Trigger::Shot(MetaData::Equip* weapon_meta)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ public:
|
||||
void UnInit();
|
||||
Creature* GetOwner() { return owner_; };
|
||||
void TakeonWeapon(Weapon* old_weapon, Weapon* new_weapon);
|
||||
void Shot(Weapon* weapon);
|
||||
void Shot(MetaData::Equip* weapon_meta);
|
||||
void Kill(Creature* target);
|
||||
void UseItemAction();
|
||||
void UseSkill(Skill* skill);
|
||||
|
Loading…
x
Reference in New Issue
Block a user