Pausen funktion funktioniert komplet UI handler bisschen geändert
This commit is contained in:
@@ -2,15 +2,36 @@
|
||||
using UnityEngine;
|
||||
public class PausenManager : MonoBehaviour
|
||||
{
|
||||
private bool isOn = false;
|
||||
[SerializeField] GameObject Can;
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
Can.SetActive(false);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
isOn = true;
|
||||
show();
|
||||
}
|
||||
}
|
||||
public void show()
|
||||
{
|
||||
if(isOn = true)
|
||||
{
|
||||
Can.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
Can.SetActive(false);
|
||||
}
|
||||
}
|
||||
public void weiter()
|
||||
{
|
||||
isOn = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user