1
0
Fork 0

move ButtonActions to UIController

This commit is contained in:
Jan 2018-04-21 22:32:53 +02:00
parent e939bd05d6
commit b39d70af7e
4 changed files with 11 additions and 31 deletions

View file

@ -621,7 +621,7 @@ MonoBehaviour:
m_GameObject: {fileID: 1321930644}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 85cdf13c4d0744871a8d88efea7e8063, type: 3}
m_Script: {fileID: 11500000, guid: 4f52f2b666c1ec64195aad9936df2d4f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1586619316
@ -953,6 +953,6 @@ MonoBehaviour:
m_GameObject: {fileID: 2026061256}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 85cdf13c4d0744871a8d88efea7e8063, type: 3}
m_Script: {fileID: 11500000, guid: 4f52f2b666c1ec64195aad9936df2d4f, type: 3}
m_Name:
m_EditorClassIdentifier:

View file

@ -1,13 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ButtonActions : MonoBehaviour {
public void LoadSceneByIndex(int index) {
UnityEngine.SceneManagement.SceneManager.LoadScene(index);
}
public void QuitGame() {
UnityEngine.Application.Quit();
}
}

View file

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 85cdf13c4d0744871a8d88efea7e8063
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -19,10 +19,6 @@ public class UIController : MonoBehaviour {
}
public static UIController instance;
public void quitGame()
{
Application.Quit();
}
public void ShowPauseMenu()
{
pauseMenu.SetActive(true);
@ -32,7 +28,15 @@ public class UIController : MonoBehaviour {
pauseMenu.SetActive(false);
}
public void LoadSceneByIndex(int index)
{
UnityEngine.SceneManagement.SceneManager.LoadScene(index);
}
public void QuitGame()
{
Application.Quit();
}
}