C# Класс tk2dButton, Malisse

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

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

Свойство Тип Описание
buttonDownSound UnityEngine.AudioClip
buttonDownSprite string
buttonPressedSound UnityEngine.AudioClip
buttonPressedSprite string
buttonUpSound UnityEngine.AudioClip
buttonUpSprite string
messageName string
pressedWaitTime float
scaleTime float
targetObject GameObject
targetScale float
viewCamera Camera

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

Метод Описание
OnEnable ( ) : void
PlaySound ( AudioClip source ) : void
Start ( ) : void
Update ( ) : void
UpdateSpriteIds ( ) : void

Call this when the sprite names have changed

Приватные методы

Метод Описание
LocalWaitForSeconds ( float seconds ) : IEnumerator
coHandleButtonPress ( int fingerId ) : IEnumerator
coScale ( Vector3 defaultScale, float startScale, float endScale ) : IEnumerator

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

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

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

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

public PlaySound ( AudioClip source ) : void
source UnityEngine.AudioClip
Результат void

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

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

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

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

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

Call this when the sprite names have changed
public UpdateSpriteIds ( ) : void
Результат void

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

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

Audio clip to play when the button transitions from up to down state. Requires an AudioSource component to be attached to work.
public AudioClip,UnityEngine buttonDownSound
Результат UnityEngine.AudioClip

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

The button down sprite. This is resolved by name from the sprite collection of the sprite component.
public string buttonDownSprite
Результат string

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

Audio clip to play when the button is pressed. Requires an AudioSource component to be attached to work.
public AudioClip,UnityEngine buttonPressedSound
Результат UnityEngine.AudioClip

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

The button pressed sprite. This is resolved by name from the sprite collection of the sprite component.
public string buttonPressedSprite
Результат string

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

Audio clip to play when the button transitions from down to up state. Requires an AudioSource component to be attached to work.
public AudioClip,UnityEngine buttonUpSound
Результат UnityEngine.AudioClip

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

The button up sprite. This is resolved by name from the sprite collection of the sprite component.
public string buttonUpSprite
Результат string

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

The message to send to the object. This should be the name of the method which needs to be called.
public string messageName
Результат string

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

How long to wait before allowing the button to be pressed again, in seconds.
public float pressedWaitTime
Результат float

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

The length of time the scale operation takes
public float scaleTime
Результат float

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

Target object to send the message to. The event methods below are significantly more efficient.
public GameObject targetObject
Результат GameObject

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

How much to scale the sprite when the button is in the down state
public float targetScale
Результат float

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

The camera this button is meant to be viewed from. Set this explicitly for best performance.\n The system will automatically traverse up the hierarchy to find a camera if this is not set.\n If nothing is found, it will fall back to the active tk2dCamera.\n Failing that, it will use Camera.main.
public Camera viewCamera
Результат Camera