Commit 5d6c968e authored by Danial KordModanlou's avatar Danial KordModanlou

new ui

parent bc8385f4
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
<Path>.vs</Path> <Path>.vs</Path>
<Path>Library</Path> <Path>Library</Path>
<Path>Logs</Path> <Path>Logs</Path>
<Path>Temp</Path>
<Path>obj</Path> <Path>obj</Path>
</explicitExcludes> </explicitExcludes>
</component> </component>
......
This diff is collapsed.
This diff is collapsed.
using System.Collections; using System;
using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
...@@ -17,6 +18,7 @@ public class menuSystem : MonoBehaviour ...@@ -17,6 +18,7 @@ public class menuSystem : MonoBehaviour
[SerializeField] private Sprite saveNamePause; [SerializeField] private Sprite saveNamePause;
[SerializeField] private Sprite saveNameCountinou; [SerializeField] private Sprite saveNameCountinou;
public GameObject backGround;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
...@@ -24,6 +26,15 @@ public class menuSystem : MonoBehaviour ...@@ -24,6 +26,15 @@ public class menuSystem : MonoBehaviour
} }
private void Update()
{
if (Input.GetKeyDown(KeyCode.Escape))
{
saveName();
}
}
public void saveName() public void saveName()
{ {
...@@ -37,6 +48,7 @@ public class menuSystem : MonoBehaviour ...@@ -37,6 +48,7 @@ public class menuSystem : MonoBehaviour
} }
else else
{ {
nameField.text = PlayerName; nameField.text = PlayerName;
Time.timeScale = 0.01f; Time.timeScale = 0.01f;
menu.SetActive(true); menu.SetActive(true);
...@@ -53,6 +65,7 @@ public class menuSystem : MonoBehaviour ...@@ -53,6 +65,7 @@ public class menuSystem : MonoBehaviour
public void saveOption() public void saveOption()
{ {
PlayerName = nameField.text;
Debug.Log("ff"); Debug.Log("ff");
if(activeSaving == 1) if(activeSaving == 1)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment