Skip to content

Commit f357d00

Browse files
author
mattrick
committed
Fix Walk Scripts, Removed More Temp Files
1 parent bdc846e commit f357d00

52 files changed

Lines changed: 175 additions & 462 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Assets/Scripts/PlayerIO.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,10 @@ void Update () {
6666
}
6767
}
6868

69+
70+
if (Input.GetKey (KeyCode.Escape) && Input.GetKey (KeyCode.F1)) {
71+
Application.Quit();
72+
}
73+
6974
}
7075
}

Assets/Scripts/PlayerWalkScript.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,14 @@ void Start(){
1010
originalRotationValue = transform.rotation; // save the initial rotation
1111
}
1212

13-
1413
void Update ()
1514
{
1615
if (Input.GetKey (KeyCode.W) || Input.GetKey (KeyCode.A) || Input.GetKey (KeyCode.S) || Input.GetKey (KeyCode.D)) {
17-
18-
transform.Rotate (Vector3.down, speed * 10);
19-
} else {
20-
var rot = transform.rotation;
16+
transform.Rotate (Vector3.down, speed * 2);
17+
}
18+
else {
2119
transform.rotation = Quaternion.Slerp (transform.rotation, originalRotationValue, Time.time * rotationResetSpeed);
2220
transform.rotation = Quaternion.Euler(transform.parent.root.transform.rotation.eulerAngles.x, transform.parent.root.transform.rotation.eulerAngles.y, transform.rotation.eulerAngles.z);
23-
24-
}
21+
}
2522
}
2623
}

Assets/Scripts/PlayerWalkScriptLeft.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,11 @@ void Start(){
1313
void Update ()
1414
{
1515
if (Input.GetKey (KeyCode.W) || Input.GetKey (KeyCode.A) || Input.GetKey (KeyCode.S) || Input.GetKey (KeyCode.D)) {
16-
17-
transform.Rotate (Vector3.up, speed * 10);
18-
}
16+
transform.Rotate (Vector3.up, speed * 2);
17+
}
1918
else {
20-
var rot = transform.rotation;
2119
transform.rotation = Quaternion.Slerp (transform.rotation, originalRotationValue, Time.time * rotationResetSpeed);
2220
transform.rotation = Quaternion.Euler(transform.parent.root.transform.rotation.eulerAngles.x, transform.parent.root.transform.rotation.eulerAngles.y, transform.rotation.eulerAngles.z);
23-
2421
}
2522
}
2623
}

Assets/Scripts/World.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class World : MonoBehaviour {
1313

1414
// Use this for initialization
1515
void Awake () {
16+
Screen.showCursor = false;
1617
currentWorld = this;
1718
if (seed == 0)
1819
seed = Random.Range(0, int.MaxValue);

Assets/Standard Assets/Character Controllers/First Person Controller.prefab.meta

Lines changed: 0 additions & 4 deletions
This file was deleted.

Assets/Standard Assets/Character Controllers/Materials/MinecraftPlayer-Player__char_png.mat.meta

Lines changed: 0 additions & 4 deletions
This file was deleted.

Assets/Standard Assets/Character Controllers/Materials/MinecraftPlayer-Player__char_png_0.mat.meta

Lines changed: 0 additions & 4 deletions
This file was deleted.

Assets/Standard Assets/Character Controllers/Materials/Player.mat.meta

Lines changed: 0 additions & 4 deletions
This file was deleted.

Assets/Standard Assets/Character Controllers/Materials/Player__char_png_0.mat.meta

Lines changed: 0 additions & 4 deletions
This file was deleted.

Assets/Standard Assets/Character Controllers/Materials/char.mat.meta

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)