-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add Race node
- Loading branch information
Showing
16 changed files
with
636 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import Composite from "./Composite"; | ||
import Node from "../Node"; | ||
import { Agent } from "../../Agent"; | ||
import Attribute from "../../attributes/Attribute"; | ||
import { BehaviourTreeOptions } from "../../BehaviourTreeOptions"; | ||
/** | ||
* A RACE node. | ||
* The child nodes are executed concurrently until one succeeds or all fail. | ||
*/ | ||
export default class Race extends Composite { | ||
/** | ||
* @param attributes The node attributes. | ||
* @param children The child nodes. | ||
*/ | ||
constructor(attributes: Attribute[], children: Node[]); | ||
/** | ||
* Called when the node is being updated. | ||
* @param agent The agent. | ||
* @param options The behaviour tree options object. | ||
*/ | ||
protected onUpdate(agent: Agent, options: BehaviourTreeOptions): void; | ||
/** | ||
* Gets the name of the node. | ||
*/ | ||
getName: () => string; | ||
} |
Oops, something went wrong.