C# Class UIButton3D, urban-survivors

Inheritance: ControlBase
Show file Open project: exdev/urban-survivors Class Usage Examples

Public Properties

Property Type Description
delay float
methodToInvoke string
repeat bool
scriptWithMethodToInvoke MonoBehaviour
soundOnClick UnityEngine.AudioSource
soundOnOver UnityEngine.AudioSource
whenToInvoke POINTER_INFO.INPUT_EVENT

Protected Properties

Property Type Description
m_ctrlState CONTROL_STATE
states string[]

Public Methods

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

Creates a GameObject and attaches this component type to it.

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

Creates a GameObject and attaches this component type to it.

DrawPreTransitionUI ( int selState, IGUIScriptSelector gui ) : void
GetTransitions ( int index ) : EZTransitionList
OnInput ( POINTER_INFO, ptr ) : void
Start ( ) : void

Protected Methods

Method Description
SetControlState ( CONTROL_STATE s ) : void
StartTransition ( int newState, int prevState ) : void

Method Details

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 ) : UIButton3D,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
return UIButton3D,

Create() static public method

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

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

SetControlState() protected method

protected SetControlState ( CONTROL_STATE s ) : void
s CONTROL_STATE
return void

Start() public method

public Start ( ) : void
return void

StartTransition() protected method

protected StartTransition ( int newState, int prevState ) : void
newState int
prevState int
return void

Property Details

delay public property

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

m_ctrlState protected property

protected CONTROL_STATE m_ctrlState
return CONTROL_STATE

methodToInvoke public property

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

repeat public property

When repeat is true, the button will call the various delegates and invokes as long as the button is held down. NOTE: If repeat is true, it overrides any setting of "whenToInvoke"/"When To Invoke". One exception to this is that "soundToPlay" is still played based upon "whenToInvoke".
public bool repeat
return bool

scriptWithMethodToInvoke public property

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

soundOnClick public property

Sound that will be played when the button is activated (pressed)
public AudioSource,UnityEngine soundOnClick
return UnityEngine.AudioSource

soundOnOver public property

Sound that will be played when the button is is in an "over" state (mouse over)
public AudioSource,UnityEngine soundOnOver
return UnityEngine.AudioSource

states protected property

protected string[] states
return string[]

whenToInvoke public 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