cool title screen
This commit is contained in:
parent
b0625ae834
commit
949135cecb
33 changed files with 4977 additions and 7 deletions
37
Assets/Scripts/MainMenuHandler.cs
Normal file
37
Assets/Scripts/MainMenuHandler.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class MainMenuHandler : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Animator uiAnimator;
|
||||
[SerializeField] private string openUIAction;
|
||||
[SerializeField] private string closeUIAction;
|
||||
[SerializeField] private Transform uiMovingObject;
|
||||
|
||||
|
||||
|
||||
public void StartGame()
|
||||
{
|
||||
SceneManager.LoadScene(1);
|
||||
}
|
||||
|
||||
public void StartEndless()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void QuitGame()
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
public void OpenUI(GameObject uiToOpen)
|
||||
{
|
||||
uiAnimator.SetTrigger(openUIAction);
|
||||
uiToOpen.transform.SetParent(uiMovingObject);
|
||||
uiToOpen.transform.position = uiMovingObject.position;
|
||||
}
|
||||
public void CloseUI(GameObject uiToClose)
|
||||
{
|
||||
uiAnimator.SetTrigger(closeUIAction);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue