Simple battle system included in the boss fight but I need to figure out how it should operate.
This commit is contained in:
parent
d418f073f0
commit
8ee3e8736f
8 changed files with 75 additions and 17 deletions
|
|
@ -40,13 +40,13 @@ namespace combat {
|
|||
}
|
||||
}
|
||||
|
||||
void BattleEngine::set(DinkyECS::Entity entity, std::string state, bool setting) {
|
||||
void BattleEngine::set(DinkyECS::Entity entity, const std::string& state, bool setting) {
|
||||
dbc::check(combatants.contains(entity), "invalid combatant given to BattleEngine");
|
||||
auto& action = combatants.at(entity);
|
||||
action.ai.set_state(state, setting);
|
||||
}
|
||||
|
||||
void BattleEngine::set_all(std::string state, bool setting) {
|
||||
void BattleEngine::set_all(const std::string& state, bool setting) {
|
||||
for(auto& [ent, action] : combatants) {
|
||||
action.ai.set_state(state, setting);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue