C# Class MenuTools.MenuLogic

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

Public Properties

Property 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

Protected Methods

Method 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

Method 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 method

Down menu option is selected (only called if menu is missing Down function)
protected Down ( ) : void
return void

Left() protected method

Left menu option is selected (only called if menu is missing Left function)
protected Left ( ) : void
return void

PlayInstructionsAfterDelay() protected method

protected PlayInstructionsAfterDelay ( ) : void
return void

Right() protected method

Right menu option is selected (only called if menu is missing Right function)
protected Right ( ) : void
return void

StopAudio() protected method

Allow specific menus to stop audio when necessary
protected StopAudio ( ) : void
return void

Up() protected method

Up menu option is selected (only called if menu is missing Up function)
protected Up ( ) : void
return void

directionalMenuLogic() protected method

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
return void

Property Details

CancelButton public_oe property

public string CancelButton
return string

HorizontalButton public_oe property

public string HorizontalButton
return string

Instructions public_oe property

public AudioClip,UnityEngine Instructions
return UnityEngine.AudioClip

SubmitButton public_oe property

public string SubmitButton
return string

VerticalButton public_oe property

public string VerticalButton
return string

downSound public_oe property

public AudioClip,UnityEngine downSound
return UnityEngine.AudioClip

leftSound public_oe property

public AudioClip,UnityEngine leftSound
return UnityEngine.AudioClip

rightSound public_oe property

public AudioClip,UnityEngine rightSound
return UnityEngine.AudioClip

shouldPlay public_oe property

public bool shouldPlay
return bool

upSound public_oe property

public AudioClip,UnityEngine upSound
return UnityEngine.AudioClip