Add quit on escapeand get down move speed

This commit is contained in:
Kotrba Filip
2020-02-02 09:00:36 +01:00
parent db4e632716
commit 7257b45303
5 changed files with 15 additions and 5 deletions

View File

@@ -6,10 +6,10 @@ using UnityEngine.SceneManagement;
public class PlayerManager : MonoBehaviour
{
public float speed = 10;
public float runSpeed = 25;
public float speed = 8;
public float runSpeed = 20;
public float rotateSpeed = 5;
public float mouseSensitive = 200;
public float mouseSensitive = 100;
public float buildRate = 0.5f;
public float health = 100;
public float actualHealth = 100;
@@ -45,6 +45,10 @@ public class PlayerManager : MonoBehaviour
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Escape))
{
Application.Quit(0);
}
guiManager.Wood.text = barricadeMaterials.ToString();
guiManager.Ammo.text = ammo.ToString();
Move();