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();

View File

@ -4,5 +4,8 @@
EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes: []
m_Scenes:
- enabled: 1
path: Assets/Scenes/PlayScene.unity
guid: 03f1c44c053777842ae209ed02a9a1dc
m_configObjects: {}

View File

@ -35,6 +35,9 @@ GraphicsSettings:
- {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}

View File

@ -4,7 +4,7 @@
UnityConnectSettings:
m_ObjectHideFlags: 0
serializedVersion: 1
m_Enabled: 0
m_Enabled: 1
m_TestMode: 0
m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
m_EventUrl: https://cdp.cloud.unity3d.com/v1/events