Make it possible to quit in the boss fight for faster dev.
This commit is contained in:
parent
61a40ae7cd
commit
a0861a8f57
2 changed files with 16 additions and 2 deletions
|
|
@ -39,7 +39,17 @@ namespace boss {
|
|||
} break;
|
||||
case MOUSE_MOVE: {
|
||||
$ui.mouse(mouse_pos.x, mouse_pos.y, {1 << guecs::ModBit::hover});
|
||||
} break;
|
||||
}
|
||||
break;
|
||||
case MOUSE_DRAG:
|
||||
dbc::log("mouse drag");
|
||||
break;
|
||||
case MOUSE_DRAG_START:
|
||||
dbc::log("mouse START drag");
|
||||
break;
|
||||
case MOUSE_DROP:
|
||||
dbc::log("mouse DROP");
|
||||
break;
|
||||
case TICK:
|
||||
$ui.run_systems();
|
||||
break;
|
||||
|
|
@ -49,6 +59,7 @@ namespace boss {
|
|||
}
|
||||
|
||||
void Fight::END(gui::Event ev, std::any data) {
|
||||
// We need to clean up that world I think, but not sure how
|
||||
(void)ev;
|
||||
(void)data;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -213,7 +213,10 @@ namespace gui {
|
|||
dbc::check($boss_fight != nullptr, "$boss_fight not initialized");
|
||||
$boss_fight->mouse_pos = mouse_position();
|
||||
|
||||
if($boss_fight->event(ev, data)) {
|
||||
if(ev == gui::Event::QUIT) {
|
||||
// just epsilon straight to the exit
|
||||
IDLE(ev, data);
|
||||
} if($boss_fight->event(ev, data)) {
|
||||
sound::play("ambient");
|
||||
next_level(false);
|
||||
state(State::IDLE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue