Global

Members

active :Boolean

Whether any of the ActionState's inputs are active.

Properties:
Name Type Description
active
Source:
Type:
  • Boolean

event :String

The name of the event to trigger on the Entity.

Properties:
Name Type Description
event
Source:
Type:
  • String

inputs :Array

The list of input toggles to track control input.

Properties:
Name Type Description
inputs
Source:
Type:
  • Array

paused

The PIXIAnimations paused state. If paused, the animation doesn't update.

Properties:
Name Type Description
paused
Source:

states :platypus.StateMap

The state of the Entity that is valid for this ActionState.

Properties:
Name Type Description
states
Source:
Type:

stateSummary :platypus.Data

The message that is passed to the Entity if the ActionState is active.

Properties:
Name Type Description
stateSummary
Source:
Type:

trigger :function

The function to call if the ActionState is active.

Properties:
Name Type Description
trigger
Source:
Type:
  • function

valid :Boolean

Whether the Entity's state is valid for this ActionState.

Properties:
Name Type Description
valid
Source:
Type:
  • Boolean

wasActive :Boolean

Whether any of the ActionState's inputs were active last update.

Properties:
Name Type Description
wasActive
Source:
Type:
  • Boolean

wasValid :Boolean

Whether the Entity's state was valid for this ActionState last update.

Properties:
Name Type Description
wasValid
Source:
Type:
  • Boolean

Methods

destroy()

Cleans up this SFXPlayer.

Source:

greenSlice(array)

Slices, but uses a recycled array. Note that this slice does not accept parameters and makes a shallow copy of the original array.

Source:
Parameters:
Name Type Description
array Array

The array to copy.

Returns:

Array

greenSplice(array, index) → {any}

Splices, but only removes a single item and returns the item itself, not an array.

Source:
Parameters:
Name Type Description
array Array

The array from which an item is to be extracted.

index Number

The index of the item to extract.

Returns:
Type:
any

greenSplit(str, splitteropt)

Splits a string, but populates an array from the array cache instead of creating a new one.

Source:
Parameters:
Name Type Attributes Description
str String

String to split.

splitter String <optional>

String demarking where to split. If not provided, each character in the split string becomes an array item.

Returns:

Array

play(sound, data) → {pixiSound.MediaInstance}

Plays a sound.

Source:
Parameters:
Name Type Description
sound String

Sound Id to play.

data Object

PixiSound data to inform sound playback.

Returns:
Type:
pixiSound.MediaInstance

The media instance of the playing sound.

setVolume(volume)

Sets volume on all playing sound effects.

Source:
Parameters:
Name Type Description
volume Number

A value between 0-1 to set volume on all playing sound effects.

stop(audio)

Plays a sound.

Source:
Parameters:
Name Type Description
audio pixiSound.MediaInstance

Audio to stop.

union(arrayTo)

Merges items from one array into the other, making sure to not duplicate identical entries.

Source:
Parameters:
Name Type Description
arrayTo Array

The array into which items will be inserted.

...arrayFrom Array

The array(s) containing items to be merged.

Returns:

Array