Moving some stuff around before writing a test to confirm the EntityAI.
This commit is contained in:
parent
f3e157a0f7
commit
db5a371766
6 changed files with 49 additions and 38 deletions
13
ai.cpp
13
ai.cpp
|
@ -157,4 +157,17 @@ namespace ai {
|
|||
AIProfile* profile() {
|
||||
return &AIMGR.profile;
|
||||
}
|
||||
|
||||
|
||||
bool EntityAI::wants_to(std::string name) {
|
||||
return plan.script[0].name == name;
|
||||
}
|
||||
|
||||
void EntityAI::set_state(std::string name, bool setting) {
|
||||
ai::set(start, name, setting);
|
||||
}
|
||||
|
||||
void EntityAI::update() {
|
||||
plan = ai::plan(script, start, goal);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue