GameJam Progress Day 2
This commit is contained in:
22
Assets/Scripts/UI/SetPlayerMode.cs
Normal file
22
Assets/Scripts/UI/SetPlayerMode.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class SetPlayerMode : MonoBehaviour
|
||||
{
|
||||
|
||||
public int playerMode;
|
||||
private GameSettings settings;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
this.settings = GameObject.Find("/settings").GetComponent<GameSettings>();
|
||||
}
|
||||
|
||||
void OnMouseDown()
|
||||
{
|
||||
this.settings.playerMode = this.playerMode;
|
||||
SceneManager.LoadScene("main", LoadSceneMode.Single);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user