32 lines
866 B
C++
32 lines
866 B
C++
#include "precompile.h"
|
|
|
|
#include "frag_mitask.h"
|
|
#include "room.h"
|
|
#include "player.h"
|
|
#include "metadata.h"
|
|
#include "metamgr.h"
|
|
#include "gridservice.h"
|
|
#include "creature.h"
|
|
#include "obstacle.h"
|
|
#include "explosion.h"
|
|
#include "entityfactory.h"
|
|
|
|
void FragMiTask::Done()
|
|
{
|
|
Position center = bomb_pos;
|
|
if (follow_target.Get()) {
|
|
bomb_pos = follow_target.Get()->GetPos();
|
|
center = bomb_pos;
|
|
}
|
|
|
|
std::shared_ptr<Explosion> explosion = EntityFactory::Instance()->MakeExplosion();
|
|
if (force_target.Get()) {
|
|
explosion->AddForceTarget(force_target);
|
|
}
|
|
explosion->EnemyAndObstacleAttack(sender,
|
|
center,
|
|
explosion_range,
|
|
gun_meta->pb->explosion_effect(),
|
|
GetAtk());
|
|
}
|