C# Class Nez.AI.GOAP.Action

Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Свойство Type Description
cost int
name string

Méthodes publiques

Méthode Description
Action ( ) : System
Action ( string name ) : System
Action ( string name, int cost ) : System
ToString ( ) : string
setPostcondition ( string conditionName, bool value ) : void
setPrecondition ( string conditionName, bool value ) : void
validate ( ) : bool

called before the Planner does its planning. Gives the Action an opportunity to set its score or to opt out if it isnt of use. For example, if the Action is to pick up a gun but there are no guns in the world returning false would keep the Action from being considered by the ActionPlanner.

Method Details

Action() public méthode

public Action ( ) : System
Résultat System

Action() public méthode

public Action ( string name ) : System
name string
Résultat System

Action() public méthode

public Action ( string name, int cost ) : System
name string
cost int
Résultat System

ToString() public méthode

public ToString ( ) : string
Résultat string

setPostcondition() public méthode

public setPostcondition ( string conditionName, bool value ) : void
conditionName string
value bool
Résultat void

setPrecondition() public méthode

public setPrecondition ( string conditionName, bool value ) : void
conditionName string
value bool
Résultat void

validate() public méthode

called before the Planner does its planning. Gives the Action an opportunity to set its score or to opt out if it isnt of use. For example, if the Action is to pick up a gun but there are no guns in the world returning false would keep the Action from being considered by the ActionPlanner.
public validate ( ) : bool
Résultat bool

Property Details

cost public_oe property

The cost of performing the action. Figure out a weight that suits the action. Changing it will affect what actions are chosen during planning
public int cost
Résultat int

name public_oe property

optional name for the Action. Used for debugging purposes
public string name
Résultat string