SFXState

Engine/source/sfx/sfxState.h

A boolean switch used to modify playlist behavior.

More...

Callbacks

DECLARE_CALLBACK(void , onActivate , () )
DECLARE_CALLBACK(void , onDeactivate , () )

Public Types

enum
_Anonymous_ {
  MaxIncludedStates = 4
  MaxExcludedStates = 4
}
Parent 

Protected Attributes

Reference count for activation.

Reference count for disabling.

mExcludedStates [MaxExcludedStates]

States that will be disabled when this state is activated.

mIncludedStates [MaxIncludedStates]

States that will be activated when this state is activated.

Protected Functions

Call when state has become active.

Call when state has gone back to being deactive.

Public Functions

Activate this state.

DECLARE_DESCRIPTION("A datablock describing <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> particular state <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the <a href="/coding/file/sfxsystem_8h/#sfxsystem_8h_1a52e87f85ae30be82ffefd31b5c03e03d">SFX</a> system." )

Disable this state so that it cannot be activated.

Re-enable this state.

bool

Return true if the state is currently active (activated and not disabled).

bool

Return true if the state is currently disabled.

bool

Called when the object is added to the sim.

bool
preload(bool server, String & errorStr)

Called to prepare the datablock for use, after it has been unpacked.

Public Static Functions

Detailed Description

A boolean switch used to modify playlist behavior.

Callbacks

DECLARE_CALLBACK(void , onActivate , () )

DECLARE_CALLBACK(void , onDeactivate , () )

Public Types

@172

Enumerator

MaxIncludedStates = 4
MaxExcludedStates = 4
typedef SimDataBlock Parent 

Protected Attributes

U32 mActiveCount 

Reference count for activation.

U32 mDisableCount 

Reference count for disabling.

SFXState * mExcludedStates [MaxExcludedStates]

States that will be disabled when this state is activated.

SFXState * mIncludedStates [MaxIncludedStates]

States that will be activated when this state is activated.

Protected Functions

_onActivate()

Call when state has become active.

_onDeactivate()

Call when state has gone back to being deactive.

Public Functions

SFXState()

activate()

Activate this state.

activate/deactivate calls balance each other. Activating a disabled state will not make it active.

deactivate()

DECLARE_CATEGORY("SFX" )

DECLARE_CONOBJECT(SFXState )

DECLARE_DESCRIPTION("A datablock describing <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> particular state <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> the <a href="/coding/file/sfxsystem_8h/#sfxsystem_8h_1a52e87f85ae30be82ffefd31b5c03e03d">SFX</a> system." )

disable()

Disable this state so that it cannot be activated.

This is used by state exclusion.

enable()

Re-enable this state.

isActive()

Return true if the state is currently active (activated and not disabled).

isDisabled()

Return true if the state is currently disabled.

onAdd()

Reimplemented from: SimDataBlock

packData(BitStream * stream)

Reimplemented from: SimDataBlock

preload(bool server, String & errorStr)

Reimplemented from: SimDataBlock

unpackData(BitStream * stream)

Reimplemented from: SimDataBlock

Public Static Functions

initPersistFields()