C# Класс MenuTools.MenuLogic

Receives user input on menus, plays audio clips and calls appropriate functions based on selections
Наследование: UnityEngine.MonoBehaviour
Показать файл Открыть проект

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

Свойство Тип Описание
CancelButton string
HorizontalButton string
Instructions UnityEngine.AudioClip
SubmitButton string
VerticalButton string
downSound UnityEngine.AudioClip
leftSound UnityEngine.AudioClip
rightSound UnityEngine.AudioClip
shouldPlay bool
upSound UnityEngine.AudioClip

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

Метод Описание
Down ( ) : void

Down menu option is selected (only called if menu is missing Down function)

Left ( ) : void

Left menu option is selected (only called if menu is missing Left function)

PlayInstructionsAfterDelay ( ) : void
Right ( ) : void

Right menu option is selected (only called if menu is missing Right function)

StopAudio ( ) : void

Allow specific menus to stop audio when necessary

Up ( ) : void

Up menu option is selected (only called if menu is missing Up function)

directionalMenuLogic ( LeftFunc left, RightFunc right, UpFunc up, DownFunc down ) : void

Checks for user button presses and calls respective function

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

Метод Описание
Start ( ) : void

Get the AudioSource for the menu when the scene starts

Update ( ) : void

Every frame, check for user input on menu

changeBumpers ( string dir ) : void
playDirectionalSound ( AudioClip clip ) : void

Plays clip when direction is pressed

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

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

Down menu option is selected (only called if menu is missing Down function)
protected Down ( ) : void
Результат void

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

Left menu option is selected (only called if menu is missing Left function)
protected Left ( ) : void
Результат void

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

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

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

Right menu option is selected (only called if menu is missing Right function)
protected Right ( ) : void
Результат void

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

Allow specific menus to stop audio when necessary
protected StopAudio ( ) : void
Результат void

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

Up menu option is selected (only called if menu is missing Up function)
protected Up ( ) : void
Результат void

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

Checks for user button presses and calls respective function
protected directionalMenuLogic ( LeftFunc left, RightFunc right, UpFunc up, DownFunc down ) : void
left LeftFunc Defined Left function
right RightFunc Defined Right function
up UpFunc Defined Up function
down DownFunc Defined Down function
Результат void

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

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

public string CancelButton
Результат string

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

public string HorizontalButton
Результат string

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

public AudioClip,UnityEngine Instructions
Результат UnityEngine.AudioClip

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

public string SubmitButton
Результат string

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

public string VerticalButton
Результат string

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

public AudioClip,UnityEngine downSound
Результат UnityEngine.AudioClip

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

public AudioClip,UnityEngine leftSound
Результат UnityEngine.AudioClip

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

public AudioClip,UnityEngine rightSound
Результат UnityEngine.AudioClip

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

public bool shouldPlay
Результат bool

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

public AudioClip,UnityEngine upSound
Результат UnityEngine.AudioClip