C# Class UIStateToggleBtn, marblemadness

Inheritance: AutoSpriteControlBase
Mostrar archivo Open project: MtvnGames/marblemadness Class Usage Examples

Public Properties

Property Type Description
defaultState int
delay float
layers SpriteRoot[],
methodToInvoke string
scriptWithMethodToInvoke MonoBehaviour
soundToPlay UnityEngine.AudioSource
whenToInvoke POINTER_INFO.INPUT_EVENT

Protected Properties

Property Type Description
curStateIndex int
layerState int
overLayerState int
stateChangeWhileDeactivated bool
stateIndices ].int[

Public Methods

Method Description
Copy ( SpriteRoot, s ) : void
Copy ( SpriteRoot, s, ControlCopyFlags flags ) : void
Create ( string name, Vector3 pos ) : UIStateToggleBtn,

Creates a GameObject and attaches this component type to it.

Create ( string name, Vector3 pos, Quaternion rotation ) : UIStateToggleBtn,

Creates a GameObject and attaches this component type to it.

DrawPostStateSelectGUI ( int selState ) : int
DrawPreStateSelectGUI ( int selState, bool inspector ) : int
DrawPreTransitionUI ( int selState, IGUIScriptSelector gui ) : void
GetStateLabel ( int index ) : string
GetTransitions ( int index ) : EZTransitionList
InitUVs ( ) : void
OnInput ( POINTER_INFO, &ptr ) : void
SetStateLabel ( int index, string label ) : void
SetToggleState ( int s ) : void

Sets the button's toggle state to the specified state.

SetToggleState ( int s, bool suppressTransition ) : void

Sets the button's toggle state to the specified state.

SetToggleState ( string stateName ) : void

Sets the button's toggle state to the specified state. Does nothing if the specified state is not found.

SetToggleState ( string stateName, bool suppressTransition ) : void

Sets the button's toggle state to the specified state. Does nothing if the specified state is not found.

Start ( ) : void
ToggleState ( ) : int

Toggles the button's state to the next in the sequence and returns the resulting state number.

Protected Methods

Method Description
Awake ( ) : void
DisableMe ( ) : void
OnEnable ( ) : void
SetLayerState ( int s ) : void

Method Details

Awake() protected method

protected Awake ( ) : void
return void

Copy() public method

public Copy ( SpriteRoot, s ) : void
s SpriteRoot,
return void

Copy() public method

public Copy ( SpriteRoot, s, ControlCopyFlags flags ) : void
s SpriteRoot,
flags ControlCopyFlags
return void

Create() static public method

Creates a GameObject and attaches this component type to it.
static public Create ( string name, Vector3 pos ) : UIStateToggleBtn,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
return UIStateToggleBtn,

Create() static public method

Creates a GameObject and attaches this component type to it.
static public Create ( string name, Vector3 pos, Quaternion rotation ) : UIStateToggleBtn,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
rotation Quaternion Rotation of the object.
return UIStateToggleBtn,

DisableMe() protected method

protected DisableMe ( ) : void
return void

DrawPostStateSelectGUI() public method

public DrawPostStateSelectGUI ( int selState ) : int
selState int
return int

DrawPreStateSelectGUI() public method

public DrawPreStateSelectGUI ( int selState, bool inspector ) : int
selState int
inspector bool
return int

DrawPreTransitionUI() public method

public DrawPreTransitionUI ( int selState, IGUIScriptSelector gui ) : void
selState int
gui IGUIScriptSelector
return void

GetStateLabel() public method

public GetStateLabel ( int index ) : string
index int
return string

GetTransitions() public method

public GetTransitions ( int index ) : EZTransitionList
index int
return EZTransitionList

InitUVs() public method

public InitUVs ( ) : void
return void

OnEnable() protected method

protected OnEnable ( ) : void
return void

OnInput() public method

public OnInput ( POINTER_INFO, &ptr ) : void
ptr POINTER_INFO,
return void

SetLayerState() protected method

protected SetLayerState ( int s ) : void
s int
return void

SetStateLabel() public method

public SetStateLabel ( int index, string label ) : void
index int
label string
return void

SetToggleState() public method

Sets the button's toggle state to the specified state.
public SetToggleState ( int s ) : void
s int The zero-based state number/index.
return void

SetToggleState() public method

Sets the button's toggle state to the specified state.
public SetToggleState ( int s, bool suppressTransition ) : void
s int The zero-based state number/index.
suppressTransition bool Whether or not to suppress transitions when changing states.
return void

SetToggleState() public method

Sets the button's toggle state to the specified state. Does nothing if the specified state is not found.
public SetToggleState ( string stateName ) : void
stateName string
return void

SetToggleState() public method

Sets the button's toggle state to the specified state. Does nothing if the specified state is not found.
public SetToggleState ( string stateName, bool suppressTransition ) : void
stateName string
suppressTransition bool Whether or not to suppress transitions when changing states.
return void

Start() public method

public Start ( ) : void
return void

ToggleState() public method

Toggles the button's state to the next in the sequence and returns the resulting state number.
public ToggleState ( ) : int
return int

Property Details

curStateIndex protected_oe property

protected int curStateIndex
return int

defaultState public_oe property

Zero-based index of the state that should be the default, initial state.
public int defaultState
return int

delay public_oe property

Delay, in seconds, between the time the control is tapped and the time the method is executed.
public float delay
return float

layerState protected_oe property

protected int layerState
return int

layers public_oe property

An array of references to sprites which will visually represent this control. Each element (layer) represents another layer to be drawn. This allows you to use multiple sprites to draw a single control, achieving a sort of layered effect. Ex: You can use a second layer to overlay a button with a highlight effect.
public SpriteRoot[], layers
return SpriteRoot[],

methodToInvoke public_oe property

A string containing the name of the method to be invoked.
public string methodToInvoke
return string

overLayerState protected_oe property

protected int overLayerState
return int

scriptWithMethodToInvoke public_oe property

Reference to the script component with the method you wish to invoke when the button changes states.
public MonoBehaviour scriptWithMethodToInvoke
return MonoBehaviour

soundToPlay public_oe property

Sound that will be played when the button is tapped.
public AudioSource,UnityEngine soundToPlay
return UnityEngine.AudioSource

stateChangeWhileDeactivated protected_oe property

protected bool stateChangeWhileDeactivated
return bool

stateIndices protected_oe property

protected int[,] stateIndices
return ].int[

whenToInvoke public_oe property

Sets what event should have occurred to invoke the associated MonoBehaviour method. Defaults to TAP.
public POINTER_INFO.INPUT_EVENT whenToInvoke
return POINTER_INFO.INPUT_EVENT