Enemies and now using the GOAP AI to decide when to attack the player, but it's very rough right now. I need to sort out how to store the AI states and use them in the System.
This commit is contained in:
parent
77f2e94515
commit
ad71631809
13 changed files with 61 additions and 30 deletions
4
goap.hpp
4
goap.hpp
|
@ -30,6 +30,8 @@ namespace ai {
|
|||
State $positive_effects;
|
||||
State $negative_effects;
|
||||
|
||||
Action() {}
|
||||
|
||||
Action(std::string name, int cost) :
|
||||
name(name), cost(cost) { }
|
||||
|
||||
|
@ -68,7 +70,7 @@ namespace ai {
|
|||
|
||||
bool is_subset(State& source, State& target);
|
||||
|
||||
int distance_to_goal(State from, State to, Action& action);
|
||||
int distance_to_goal(State from, State to);
|
||||
|
||||
ActionPlan plan_actions(std::vector<Action>& actions, State start, State goal);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue