C# Класс Nez.AI.GOAP.Action

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
cost int
name string

Открытые методы

Метод Описание
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.

Описание методов

Action() публичный Метод

public Action ( ) : System
Результат System

Action() публичный Метод

public Action ( string name ) : System
name string
Результат System

Action() публичный Метод

public Action ( string name, int cost ) : System
name string
cost int
Результат System

ToString() публичный Метод

public ToString ( ) : string
Результат string

setPostcondition() публичный Метод

public setPostcondition ( string conditionName, bool value ) : void
conditionName string
value bool
Результат void

setPrecondition() публичный Метод

public setPrecondition ( string conditionName, bool value ) : void
conditionName string
value bool
Результат void

validate() публичный Метод

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
Результат bool

Описание свойств

cost публичное свойство

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
Результат int

name публичное свойство

optional name for the Action. Used for debugging purposes
public string name
Результат string