Nothing new
This commit is contained in:
parent
8e32bebe47
commit
37995f1187
@ -34,6 +34,7 @@ public class BlockScript : MonoBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(Input.GetKeyDown(KeyCode.Space) && IsAlive && !IsFlying && !logic.IsFreezed) {
|
if(Input.GetKeyDown(KeyCode.Space) && IsAlive && !IsFlying && !logic.IsFreezed) {
|
||||||
|
logic.addJump();
|
||||||
IsFlying = true;
|
IsFlying = true;
|
||||||
JumpSound.Play();
|
JumpSound.Play();
|
||||||
myRigidbody.velocity = Vector2.up * blockStrength;
|
myRigidbody.velocity = Vector2.up * blockStrength;
|
||||||
|
|||||||
@ -17,7 +17,7 @@ public class LogicScript : MonoBehaviour
|
|||||||
private int playerJumps;
|
private int playerJumps;
|
||||||
public Text jumpsText;
|
public Text jumpsText;
|
||||||
|
|
||||||
private int playTime;
|
private float playTime;
|
||||||
public Text timeText;
|
public Text timeText;
|
||||||
|
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ public class LogicScript : MonoBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addTime() {
|
public void addTime() {
|
||||||
//playTime += Time;
|
playTime += Time.deltaTime;
|
||||||
timeText.text = playTime.ToString() + " Seconds";
|
timeText.text = playTime.ToString() + " Seconds";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,6 +49,7 @@ public class LogicScript : MonoBehaviour
|
|||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (Input.GetKeyDown(KeyCode.Escape) && !IsFreezed && player.IsAlive) {
|
if (Input.GetKeyDown(KeyCode.Escape) && !IsFreezed && player.IsAlive) {
|
||||||
IsFreezed = true;
|
IsFreezed = true;
|
||||||
pauseMenu.SetActive(true);
|
pauseMenu.SetActive(true);
|
||||||
@ -62,5 +63,7 @@ public class LogicScript : MonoBehaviour
|
|||||||
player.myRigidbody.velocity = player.velocity;
|
player.myRigidbody.velocity = player.velocity;
|
||||||
IsFreezed = false;
|
IsFreezed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addTime();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,11 +14,11 @@ EditorBuildSettings:
|
|||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Scenes/Lobby.unity
|
path: Assets/Scenes/Lobby.unity
|
||||||
guid: 8240615bc55e9ac4a84999a9b6359255
|
guid: 8240615bc55e9ac4a84999a9b6359255
|
||||||
- enabled: 1
|
|
||||||
path: Assets/Scenes/Level_01.unity
|
|
||||||
guid: f31bc3f5439bc684194182ee640e22fa
|
|
||||||
- enabled: 1
|
- enabled: 1
|
||||||
path: Assets/Scenes/Pause_Menu.unity
|
path: Assets/Scenes/Pause_Menu.unity
|
||||||
guid: 87ca1619e6402204c9432061705dd240
|
guid: 87ca1619e6402204c9432061705dd240
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/Scenes/Level_01.unity
|
||||||
|
guid: f31bc3f5439bc684194182ee640e22fa
|
||||||
m_configObjects: {}
|
m_configObjects: {}
|
||||||
m_UseUCBPForAssetBundles: 0
|
m_UseUCBPForAssetBundles: 0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user