The FSM for boss fights is started.
This commit is contained in:
parent
fdc0bcdb3b
commit
3b11ed0a75
3 changed files with 33 additions and 0 deletions
11
boss/fsm.cpp
Normal file
11
boss/fsm.cpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include "boss/fsm.hpp"
|
||||
|
||||
namespace boss {
|
||||
FSM::FSM() {
|
||||
}
|
||||
|
||||
void event(Event ev, std::any data={}) {
|
||||
(void)ev;
|
||||
(void)data;
|
||||
}
|
||||
}
|
||||
21
boss/fsm.hpp
Normal file
21
boss/fsm.hpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#include "simplefsm.hpp"
|
||||
#include <any>
|
||||
|
||||
namespace boss {
|
||||
enum class State {
|
||||
START=0,
|
||||
END=1
|
||||
};
|
||||
|
||||
enum class Event {
|
||||
NOP
|
||||
};
|
||||
|
||||
class FSM : public DeadSimpleFSM<State, Event> {
|
||||
FSM();
|
||||
|
||||
void event(Event ev, std::any data={});
|
||||
};
|
||||
}
|
||||
|
|
@ -86,6 +86,7 @@ sources = [
|
|||
'autowalker.cpp',
|
||||
'backend.cpp',
|
||||
'battle.cpp',
|
||||
'boss/fsm.cpp',
|
||||
'boss/system.cpp',
|
||||
'boss/ui.cpp',
|
||||
'combat.cpp',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue