diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-05-03 08:49:01 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-05-03 08:49:01 -0400 |
commit | afb0ada00a2c50ea541ba6dc93058ccdb0286cdd (patch) | |
tree | 36b070d21fd237419a9f0a3bafb11add8fd68aa7 /src/mob.cpp | |
parent | f102149e15ca1ac36cbb4e2627e5ce44f2d5273a (diff) |
ortho snapping, reset option
Diffstat (limited to 'src/mob.cpp')
-rw-r--r-- | src/mob.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mob.cpp b/src/mob.cpp index 1829240..6ce46ab 100644 --- a/src/mob.cpp +++ b/src/mob.cpp @@ -310,6 +310,8 @@ Mob::~Mob() } extern World *currentWorld; +extern Arena *arena; + void Mob::wander(void) { static bool YAYA = false; @@ -320,16 +322,12 @@ void Mob::wander(void) if (aggressive && !YAYA && isInside(vec2 {player->loc.x + width / 2, player->loc.y + height / 4})) { if (!ui::dialogBoxExists) { std::thread([&](void){ - auto *a = new Arena(currentWorld, player, this); - a->setStyle(""); - a->setBackground(WorldBGType::Forest); - a->setBGM("assets/music/embark.wav"); - + arena->fight(currentWorld, player, this); ui::toggleWhiteFast(); YAYA = true; ui::waitForCover(); YAYA = false; - currentWorld = a; + currentWorld = arena; ui::toggleWhiteFast(); }).detach(); } |