mirror of
https://github.com/Mukheem/TwinTurbine.git
synced 2025-01-19 20:31:50 +01:00
32 lines
756 B
C#
32 lines
756 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class MenuController : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private Transform referencePoint;
|
|
|
|
private void Start()
|
|
{
|
|
transform.parent = referencePoint;
|
|
transform.localPosition = Vector3.zero;
|
|
transform.localRotation = Quaternion.identity;
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
if(transform.position == Vector3.zero)
|
|
gameObject.SetActive(false);
|
|
else
|
|
gameObject.SetActive(true);
|
|
}
|
|
|
|
public void OnLoadDemoScene(int iSceneIndex)
|
|
{
|
|
Debug.Log($"{nameof(OnLoadDemoScene)}:{iSceneIndex}");
|
|
SceneManager.LoadScene(iSceneIndex);
|
|
}
|
|
}
|