C# Класс UnityAI.Core.Planning.Predicate

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

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

Метод Описание
CalculateHashCode ( string name, bool isNegative, IEnumerable parameters ) : int

Calculates a hashcode for a predicate's parameters

Written separately so that it can be used for calculating hashes on predicat caching

CompareTo ( object obj ) : int
Create ( string name ) : Predicate

Create a Predicate

Create ( string name, bool isNegative ) : Predicate

Create a Predicate

Equals ( object obj ) : bool

Is this predicate Equal to another Predicate?

FindPredicate ( string name, bool isNegative ) : Predicate

Find the Predicate in the Cache

GetHashCode ( ) : int

Calculates the predicate's hashcode

IsComplimentOf ( Predicate predicate ) : bool

Are the Predicates Negatives of Eachother

ToString ( ) : string

String Representation of the Predicate

Validate ( ) : void

Marks the predicate as current

Защищенные методы

Метод Описание
AddPredicate ( Predicate predicate ) : void

Adds a Predicate to the current cache

CalculateHashCode ( Predicate predicate ) : int

Calculates a hashcode for a predicate

Written separately so that it can be used for calculating hashes on predicat caching

Predicate ( string name ) : System

Construct a Predicate ie At(Monster,Location)

Predicate ( string name, bool isNegative ) : System

Construct a Predicate ie At(Monster,Location)

Приватные методы

Метод Описание
InitializeCache ( ) : void

Initialize the Predicate Cache

Predicate ( ) : System

Static Constructor

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

AddPredicate() защищенный статический Метод

Adds a Predicate to the current cache
protected static AddPredicate ( Predicate predicate ) : void
predicate Predicate Predicate to add
Результат void

CalculateHashCode() защищенный статический Метод

Calculates a hashcode for a predicate
Written separately so that it can be used for calculating hashes on predicat caching
protected static CalculateHashCode ( Predicate predicate ) : int
predicate Predicate Predicate to evaluate
Результат int

CalculateHashCode() публичный статический Метод

Calculates a hashcode for a predicate's parameters
Written separately so that it can be used for calculating hashes on predicat caching
public static CalculateHashCode ( string name, bool isNegative, IEnumerable parameters ) : int
name string Predicate name
isNegative bool Is the predicate negative?
parameters IEnumerable Predicate parameters
Результат int

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

public CompareTo ( object obj ) : int
obj object
Результат int

Create() публичный статический Метод

Create a Predicate
public static Create ( string name ) : Predicate
name string Name of Predicate
Результат Predicate

Create() публичный статический Метод

Create a Predicate
public static Create ( string name, bool isNegative ) : Predicate
name string Name of Predicate
isNegative bool Is Negative?
Результат Predicate

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

Is this predicate Equal to another Predicate?
public Equals ( object obj ) : bool
obj object
Результат bool

FindPredicate() публичный статический Метод

Find the Predicate in the Cache
public static FindPredicate ( string name, bool isNegative ) : Predicate
name string Name of the Predicate
isNegative bool Is Negated
Результат Predicate

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

Calculates the predicate's hashcode
public GetHashCode ( ) : int
Результат int

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

Are the Predicates Negatives of Eachother
public IsComplimentOf ( Predicate predicate ) : bool
predicate Predicate Predicate to Compare
Результат bool

Predicate() защищенный Метод

Construct a Predicate ie At(Monster,Location)
protected Predicate ( string name ) : System
name string Name of the Predicate
Результат System

Predicate() защищенный Метод

Construct a Predicate ie At(Monster,Location)
protected Predicate ( string name, bool isNegative ) : System
name string Name of the Predicate
isNegative bool Is Negated?
Результат System

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

String Representation of the Predicate
public ToString ( ) : string
Результат string

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

Marks the predicate as current
public Validate ( ) : void
Результат void