C# Class MenuTools.MenuLogic

Receives user input on menus, plays audio clips and calls appropriate functions based on selections
Inheritance: UnityEngine.MonoBehaviour
Afficher le fichier Open project: DrexelGoalBall/goalBall

Méthodes publiques

Свойство Type Description
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

Méthodes protégées

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

Down() protected méthode

Down menu option is selected (only called if menu is missing Down function)
protected Down ( ) : void
Résultat void

Left() protected méthode

Left menu option is selected (only called if menu is missing Left function)
protected Left ( ) : void
Résultat void

PlayInstructionsAfterDelay() protected méthode

protected PlayInstructionsAfterDelay ( ) : void
Résultat void

Right() protected méthode

Right menu option is selected (only called if menu is missing Right function)
protected Right ( ) : void
Résultat void

StopAudio() protected méthode

Allow specific menus to stop audio when necessary
protected StopAudio ( ) : void
Résultat void

Up() protected méthode

Up menu option is selected (only called if menu is missing Up function)
protected Up ( ) : void
Résultat void

directionalMenuLogic() protected méthode

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
Résultat void

Property Details

CancelButton public_oe property

public string CancelButton
Résultat string

HorizontalButton public_oe property

public string HorizontalButton
Résultat string

Instructions public_oe property

public AudioClip,UnityEngine Instructions
Résultat UnityEngine.AudioClip

SubmitButton public_oe property

public string SubmitButton
Résultat string

VerticalButton public_oe property

public string VerticalButton
Résultat string

downSound public_oe property

public AudioClip,UnityEngine downSound
Résultat UnityEngine.AudioClip

leftSound public_oe property

public AudioClip,UnityEngine leftSound
Résultat UnityEngine.AudioClip

rightSound public_oe property

public AudioClip,UnityEngine rightSound
Résultat UnityEngine.AudioClip

shouldPlay public_oe property

public bool shouldPlay
Résultat bool

upSound public_oe property

public AudioClip,UnityEngine upSound
Résultat UnityEngine.AudioClip