1
0
Fork 0

Little tweaks

This commit is contained in:
Piegames 2018-04-23 18:21:09 +02:00
parent e1fba1deed
commit 8ffc34f2d0
2 changed files with 14 additions and 5 deletions

View file

@ -432,7 +432,7 @@ public class DungeonGenerator {
r.tiles[pos].type = Room.TileType.ROCK;
continue;
}
float prob2 = 0.02f;
float prob2 = 0.04f;
if (UnityEngine.Random.value > 1 - prob2)
{
r.spawnpoints.Add(pos);

View file

@ -57,11 +57,20 @@ public class PlayerMovement : MonoBehaviour {
//Debug.Log(br);
Debug.DrawLine(transform.position, transform.position + br, Color.red, 0.01f, false);
}
//transform.Rotate(Vector3.forward * turnSpeed);
if (Input.GetAxis("Horizontal") < 0)
{
//rb.rotation += turnSpeed;
rb.MoveRotation(rb.rotation + turnSpeed);
} else
//transform.Rotate(Vector3.forward * turnSpeed);
if (Input.GetAxis("Horizontal") > 0)
{
//rb.rotation -= turnSpeed;
rb.MoveRotation(rb.rotation - turnSpeed);
} else {
rb.MoveRotation(rb.rotation);
}
//transform.Rotate(Vector3.forward * -turnSpeed);
// Debug lines
Debug.DrawLine(transform.position, transform.position + speedVec, Color.magenta, 0.01f, false);