TO SQUASH: menu callbacks
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class MenuCallbackHolder
|
||||
public class MenuCallbackHolder: MonoBehaviour
|
||||
{
|
||||
private System.Action[] callbacks;
|
||||
|
||||
public MenuCallbackHolder()
|
||||
private AudioSource audioSource;
|
||||
|
||||
private AudioClip zapAudioClip;
|
||||
|
||||
private static readonly string zapAudioClipPath = "Audio/1496_YummyStorm";
|
||||
|
||||
void Start()
|
||||
{
|
||||
audioSource = GetComponent<AudioSource>();
|
||||
zapAudioClip = Resources.Load<AudioClip>(zapAudioClipPath);
|
||||
|
||||
callbacks = new System.Action[]
|
||||
{
|
||||
PlayButtonCallback,
|
||||
@@ -38,25 +47,28 @@ public class MenuCallbackHolder
|
||||
public void InstruccionsButtonCallback()
|
||||
{
|
||||
Debug.Log("Instructions button pressed");
|
||||
// UnityEngine.SceneManagement.SceneManager.LoadScene("Instructions");
|
||||
// TODO: Implement instructions scene.
|
||||
}
|
||||
|
||||
public void SetupButtonCallback()
|
||||
{
|
||||
Debug.Log("Setup button pressed");
|
||||
// UnityEngine.SceneManagement.SceneManager.LoadScene("Setup");
|
||||
// TODO: Implement setup dialog.
|
||||
}
|
||||
|
||||
public void ZapButtonCallback()
|
||||
{
|
||||
Debug.Log("Zap Scores button pressed");
|
||||
// UnityEngine.SceneManagement.SceneManager.LoadScene("Zap");
|
||||
audioSource.PlayOneShot(zapAudioClip);
|
||||
|
||||
// TODO: Add a confirmation dialog before resetting scores
|
||||
GameSetup.ZapScores();
|
||||
}
|
||||
|
||||
public void AboutButtonCallback()
|
||||
{
|
||||
Debug.Log("About button pressed");
|
||||
// UnityEngine.SceneManagement.SceneManager.LoadScene("About");
|
||||
// TODO: Implement about dialog.
|
||||
}
|
||||
|
||||
public void QuitButtonCallback()
|
||||
|
||||
Reference in New Issue
Block a user