C# Class UIStateToggleBtn3D, urban-survivors

Inheritance: ControlBase
Mostrar archivo Open project: exdev/urban-survivors Class Usage Examples

Public Properties

Property Type Description
defaultState int
delay float
methodToInvoke string
scriptWithMethodToInvoke MonoBehaviour
soundToPlay UnityEngine.AudioSource
whenToInvoke POINTER_INFO.INPUT_EVENT

Protected Properties

Property Type Description
curStateIndex int

Public Methods

Method Description
Copy ( IControl c ) : void
Copy ( IControl c, ControlCopyFlags flags ) : void
Create ( string name, Vector3 pos ) : UIStateToggleBtn3D,

Creates a GameObject and attaches this component type to it.

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

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
GetTransitions ( int index ) : EZTransitionList
OnInput ( POINTER_INFO, ptr ) : void
SetToggleState ( int s ) : 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.

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

Method Details

Awake() protected method

protected Awake ( ) : void
return void

Copy() public method

public Copy ( IControl c ) : void
c IControl
return void

Copy() public method

public Copy ( IControl c, ControlCopyFlags flags ) : void
c IControl
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 ) : UIStateToggleBtn3D,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
return UIStateToggleBtn3D,

Create() static public method

Creates a GameObject and attaches this component type to it.
static public Create ( string name, Vector3 pos, Quaternion rotation ) : UIStateToggleBtn3D,
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 UIStateToggleBtn3D,

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

GetTransitions() public method

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

OnInput() public method

public OnInput ( POINTER_INFO, ptr ) : void
ptr POINTER_INFO,
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. Does nothing if the specified state is not found.
public SetToggleState ( string stateName ) : void
stateName string
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

methodToInvoke public_oe property

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

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

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