C# Класс UIStateToggleBtn, marblemadness

Наследование: AutoSpriteControlBase
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
defaultState int
delay float
layers SpriteRoot[],
methodToInvoke string
scriptWithMethodToInvoke MonoBehaviour
soundToPlay UnityEngine.AudioSource
whenToInvoke POINTER_INFO.INPUT_EVENT

Защищенные свойства (Protected)

Свойство Тип Описание
curStateIndex int
layerState int
overLayerState int
stateChangeWhileDeactivated bool
stateIndices ].int[

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
Awake ( ) : void
DisableMe ( ) : void
OnEnable ( ) : void
SetLayerState ( int s ) : void

Описание методов

Awake() защищенный Метод

protected Awake ( ) : void
Результат void

Copy() публичный Метод

public Copy ( SpriteRoot, s ) : void
s SpriteRoot,
Результат void

Copy() публичный Метод

public Copy ( SpriteRoot, s, ControlCopyFlags flags ) : void
s SpriteRoot,
flags ControlCopyFlags
Результат void

Create() статический публичный Метод

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.
Результат UIStateToggleBtn,

Create() статический публичный Метод

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.
Результат UIStateToggleBtn,

DisableMe() защищенный Метод

protected DisableMe ( ) : void
Результат void

DrawPostStateSelectGUI() публичный Метод

public DrawPostStateSelectGUI ( int selState ) : int
selState int
Результат int

DrawPreStateSelectGUI() публичный Метод

public DrawPreStateSelectGUI ( int selState, bool inspector ) : int
selState int
inspector bool
Результат int

DrawPreTransitionUI() публичный Метод

public DrawPreTransitionUI ( int selState, IGUIScriptSelector gui ) : void
selState int
gui IGUIScriptSelector
Результат void

GetStateLabel() публичный Метод

public GetStateLabel ( int index ) : string
index int
Результат string

GetTransitions() публичный Метод

public GetTransitions ( int index ) : EZTransitionList
index int
Результат EZTransitionList

InitUVs() публичный Метод

public InitUVs ( ) : void
Результат void

OnEnable() защищенный Метод

protected OnEnable ( ) : void
Результат void

OnInput() публичный Метод

public OnInput ( POINTER_INFO, &ptr ) : void
ptr POINTER_INFO,
Результат void

SetLayerState() защищенный Метод

protected SetLayerState ( int s ) : void
s int
Результат void

SetStateLabel() публичный Метод

public SetStateLabel ( int index, string label ) : void
index int
label string
Результат void

SetToggleState() публичный Метод

Sets the button's toggle state to the specified state.
public SetToggleState ( int s ) : void
s int The zero-based state number/index.
Результат void

SetToggleState() публичный Метод

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.
Результат void

SetToggleState() публичный Метод

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
Результат void

SetToggleState() публичный Метод

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.
Результат void

Start() публичный Метод

public Start ( ) : void
Результат void

ToggleState() публичный Метод

Toggles the button's state to the next in the sequence and returns the resulting state number.
public ToggleState ( ) : int
Результат int

Описание свойств

curStateIndex защищенное свойство

protected int curStateIndex
Результат int

defaultState публичное свойство

Zero-based index of the state that should be the default, initial state.
public int defaultState
Результат int

delay публичное свойство

Delay, in seconds, between the time the control is tapped and the time the method is executed.
public float delay
Результат float

layerState защищенное свойство

protected int layerState
Результат int

layers публичное свойство

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
Результат SpriteRoot[],

methodToInvoke публичное свойство

A string containing the name of the method to be invoked.
public string methodToInvoke
Результат string

overLayerState защищенное свойство

protected int overLayerState
Результат int

scriptWithMethodToInvoke публичное свойство

Reference to the script component with the method you wish to invoke when the button changes states.
public MonoBehaviour scriptWithMethodToInvoke
Результат MonoBehaviour

soundToPlay публичное свойство

Sound that will be played when the button is tapped.
public AudioSource,UnityEngine soundToPlay
Результат UnityEngine.AudioSource

stateChangeWhileDeactivated защищенное свойство

protected bool stateChangeWhileDeactivated
Результат bool

stateIndices защищенное свойство

protected int[,] stateIndices
Результат ].int[

whenToInvoke публичное свойство

Sets what event should have occurred to invoke the associated MonoBehaviour method. Defaults to TAP.
public POINTER_INFO.INPUT_EVENT whenToInvoke
Результат POINTER_INFO.INPUT_EVENT