C# Class UIRadioBtn3D, urban-survivors

Inheritance: ControlBase, IRadioButton
显示文件 Open project: exdev/urban-survivors Class Usage Examples

Public Properties

Property Type Description
defaultValue bool
delay float
methodToInvoke string
radioGroup int
scriptWithMethodToInvoke MonoBehaviour
soundToPlay UnityEngine.AudioSource
useParentForGrouping bool
whenToInvoke POINTER_INFO.INPUT_EVENT

Protected Properties

Property Type Description
btnValue bool
group RadioBtnGroup,
states string[]

Public Methods

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

Creates a GameObject and attaches this component type to it.

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

Creates a GameObject and attaches this component type to it.

DrawPreTransitionUI ( int selState, IGUIScriptSelector gui ) : void
GetTransitions ( int index ) : EZTransitionList
OnDestroy ( ) : void
OnInput ( POINTER_INFO, ptr ) : void
SetGroup ( GameObject parent ) : void

Makes the radio button a part of the specified group and it will thenceforth be mutually exclusive to all other radio buttons in the same group.

SetGroup ( int groupID ) : void

Makes the radio button a part of the specified group and it will thenceforth be mutually exclusive to all other radio buttons in the same group.

Start ( ) : void

Protected Methods

Method Description
Awake ( ) : void
DisableMe ( ) : void
PopOtherButtonsInGroup ( ) : void
SetButtonState ( ) : void
StartTransition ( int newState, int prevState ) : 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 ) : UIRadioBtn3D,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
return UIRadioBtn3D,

Create() static public method

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

DisableMe() protected method

protected DisableMe ( ) : void
return void

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

OnDestroy() public method

public OnDestroy ( ) : void
return void

OnInput() public method

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

PopOtherButtonsInGroup() protected method

protected PopOtherButtonsInGroup ( ) : void
return void

SetButtonState() protected method

protected SetButtonState ( ) : void
return void

SetGroup() public method

Makes the radio button a part of the specified group and it will thenceforth be mutually exclusive to all other radio buttons in the same group.
public SetGroup ( GameObject parent ) : void
parent GameObject
return void

SetGroup() public method

Makes the radio button a part of the specified group and it will thenceforth be mutually exclusive to all other radio buttons in the same group.
public SetGroup ( int groupID ) : void
groupID int
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

btnValue protected_oe property

protected bool btnValue
return bool

defaultValue public_oe property

The default value of the button
public bool defaultValue
return bool

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

group protected_oe property

protected RadioBtnGroup, group
return RadioBtnGroup,

methodToInvoke public_oe property

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

radioGroup public_oe property

The numbered group to which this radio button belongs. Buttons that share a group will be mutually exclusive to one another. This value is only available if RADIOBTN_USE_PARENT is not defined. Otherwise, by default, radio buttons group themselves according to a common parent GameObject.
public int radioGroup
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

states protected_oe property

protected string[] states
return string[]

useParentForGrouping public_oe property

When true, the radio button will group itself with other radio buttons based on whether they share the same parent GameObject.
public bool useParentForGrouping
return bool

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