C# 클래스 Myre.Entities.Behaviours.Behaviour

An abstract class which represents specific functionality which an Entity can perform.

Behaviours effectively tag an entity as performing some task. They may contain private working data, and gather references to required properties. They should not contain logic, as that is handled by the behaviours' manager.

Each Scene has a behaviour manager for each type of behaviour. This manager performs any updating or drawing for all behaviours of the relevant type.

파일 보기 프로젝트 열기: martindevans/Myre 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
CreateProperties ( System.Entity context ) : void

Initialises this instance.

CreatePropeties is called once when the entity is constructed. Here the behaviour should create any properties required by this behaviour to function. Create properties is called before Initialise.

GetFullPropertyName ( string propertyName ) : string
Initialise ( INamedDataProvider initialisationData ) : void

Initialises this instance.

Initialise/Shutdown may be called multiple times, as the instance is recycled. Here the behaviour should do any setup needed to put the behaviour into its' initial state, including getting optional properties from the entity which may have been created by other behaviours, and register to any services. Initialise is called before the behaviour is added to the manager.

Shutdown ( INamedDataProvider shutdownData ) : void

Shuts down this instance.

Initialise/Shutdown may be called multiple times, as the instance is recycled. Shutdown is called after the behaviour has been removed from the manager.

보호된 메소드들

메소드 설명
Behaviour ( ) : System
Behaviour ( string name ) : System
Initialised ( ) : void

Indicates that this instance has all been initialised

메소드 상세

Behaviour() 보호된 메소드

protected Behaviour ( ) : System
리턴 System

Behaviour() 보호된 메소드

protected Behaviour ( string name ) : System
name string
리턴 System

CreateProperties() 공개 메소드

Initialises this instance.
CreatePropeties is called once when the entity is constructed. Here the behaviour should create any properties required by this behaviour to function. Create properties is called before Initialise.
public CreateProperties ( System.Entity context ) : void
context System.Entity /// Initialisation context. This object can be used to publish properties to the owning entity. ///
리턴 void

GetFullPropertyName() 공개 메소드

public GetFullPropertyName ( string propertyName ) : string
propertyName string
리턴 string

Initialise() 공개 메소드

Initialises this instance.
Initialise/Shutdown may be called multiple times, as the instance is recycled. Here the behaviour should do any setup needed to put the behaviour into its' initial state, including getting optional properties from the entity which may have been created by other behaviours, and register to any services. Initialise is called before the behaviour is added to the manager.
public Initialise ( INamedDataProvider initialisationData ) : void
initialisationData INamedDataProvider /// Initialisation context. This object can be used to query properties and behaviours. ///
리턴 void

Initialised() 보호된 메소드

Indicates that this instance has all been initialised
protected Initialised ( ) : void
리턴 void

Shutdown() 공개 메소드

Shuts down this instance.
Initialise/Shutdown may be called multiple times, as the instance is recycled. Shutdown is called after the behaviour has been removed from the manager.
public Shutdown ( INamedDataProvider shutdownData ) : void
shutdownData INamedDataProvider
리턴 void