This commit is contained in:
aozhiwei 2022-10-08 10:19:44 +08:00
parent ed63bbbd97
commit 171cf22914
3 changed files with 13 additions and 1 deletions

View File

@ -3711,3 +3711,8 @@ void Creature::LockAttackDir(int time)
}
);
}
void Creature::PullTarget(const a8::Vec2& target_pos)
{
}

View File

@ -281,6 +281,7 @@ class Creature : public MoveableEntity
void AutoNavigation(a8::Vec2 target_pos, float speed);
void AddTraceBullet(int bullet_uniid, int target_uniid, int gun_id);
void LockAttackDir(int time);
void PullTarget(const a8::Vec2& target_pos);
protected:
virtual void OnBuffRemove(Buff& buff);

View File

@ -340,12 +340,18 @@ void Skill::ProcSWZB()
[this] (const std::vector<std::any>& params)
{
CreatureWeakPtr sender = owner->GetWeakPtrRef();
a8::Vec2 center = owner->GetPos();
std::shared_ptr<Explosion> e = EntityFactory::Instance()->MakeExplosion();
e->SetHitCb
(
[sender] (const std::vector<std::any>& params)
[sender, center] (const std::vector<std::any>& params) mutable
{
if (sender.Get()) {
Entity* e = std::any_cast<Entity*>(params.at(0));
if (e->IsCreature()) {
}
}
}
);
e->EnemyAndObstacleAttack