Newer
Older
Dreamsturbia-Project-IADE-Unity3D / Assets / Scripts / MainMenuBehaviour.cs
@Rackday Rackday on 21 Aug 990 bytes Project Added
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
using UnityEngine.SceneManagement;

public class MainMenuBehaviour : MonoBehaviour
{

    [SerializeField] private Texture2D cursorTexture;
    private Vector2 cursorHotspot;

    private void Start()
    {
        Cursor.SetCursor(cursorTexture, cursorHotspot, CursorMode.ForceSoftware);
        Cursor.visible = true;
        Cursor.lockState = CursorLockMode.None;
    }

    //Buttons Functions
    public void Play()
    {
        SceneManager.LoadScene(2);
        Cursor.visible = false;
        Cursor.lockState = CursorLockMode.Locked;
    }

    public void Quit()
    {
        Application.Quit();
    }

    //Button UI Behaviour
    public void ButtonOverlay(TMP_Text buttontext)
    {
        buttontext.color = new Color32(255, 212, 73, 255);
    }

    public void ButtonExitOverlay(TMP_Text buttontext)
    {
        buttontext.color = Color.white;
    }


}