PauseMenu Updated
This commit is contained in:
parent
37995f1187
commit
b78c5b4592
@ -2693,7 +2693,7 @@ RectTransform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1282931088}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 1}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
@ -6325,6 +6325,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 8d22c78c60bdea6438f36bf3f862344a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
velocity: {x: 0, y: 0}
|
||||
myRigidbody: {fileID: 565933370275705088}
|
||||
blockStrength: 10
|
||||
IsAlive: 1
|
||||
|
||||
@ -45,17 +45,18 @@ public class LogicScript : MonoBehaviour
|
||||
gameOverScreen.SetActive(true);
|
||||
BG_Music.Stop();
|
||||
bgscript.ScrollSpeed = 0f;
|
||||
player.IsAlive = false;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Escape) && !IsFreezed && player.IsAlive) {
|
||||
if (Input.GetKeyUp(KeyCode.Escape) && !IsFreezed && player.IsAlive) {
|
||||
IsFreezed = true;
|
||||
pauseMenu.SetActive(true);
|
||||
BG_Music.Stop();
|
||||
BG_Music.Pause();
|
||||
bgscript.ScrollSpeed = 0f;
|
||||
} else if (Input.GetKeyDown(KeyCode.Escape) && IsFreezed && player.IsAlive) {
|
||||
} else if (Input.GetKeyUp(KeyCode.Escape) && IsFreezed && player.IsAlive) {
|
||||
pauseMenu.SetActive(false);
|
||||
BG_Music.Play();
|
||||
bgscript.ScrollSpeed = 1f;
|
||||
@ -64,6 +65,10 @@ public class LogicScript : MonoBehaviour
|
||||
IsFreezed = false;
|
||||
}
|
||||
|
||||
if (!IsFreezed && player.IsAlive) {
|
||||
addTime();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user