Little tweaks
This commit is contained in:
parent
e1fba1deed
commit
8ffc34f2d0
2 changed files with 14 additions and 5 deletions
|
@ -432,7 +432,7 @@ public class DungeonGenerator {
|
||||||
r.tiles[pos].type = Room.TileType.ROCK;
|
r.tiles[pos].type = Room.TileType.ROCK;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
float prob2 = 0.02f;
|
float prob2 = 0.04f;
|
||||||
if (UnityEngine.Random.value > 1 - prob2)
|
if (UnityEngine.Random.value > 1 - prob2)
|
||||||
{
|
{
|
||||||
r.spawnpoints.Add(pos);
|
r.spawnpoints.Add(pos);
|
||||||
|
|
|
@ -57,11 +57,20 @@ public class PlayerMovement : MonoBehaviour {
|
||||||
//Debug.Log(br);
|
//Debug.Log(br);
|
||||||
Debug.DrawLine(transform.position, transform.position + br, Color.red, 0.01f, false);
|
Debug.DrawLine(transform.position, transform.position + br, Color.red, 0.01f, false);
|
||||||
}
|
}
|
||||||
if ( Input.GetAxis("Horizontal") < 0 )
|
|
||||||
rb.MoveRotation(rb.rotation + turnSpeed);
|
|
||||||
//transform.Rotate(Vector3.forward * turnSpeed);
|
//transform.Rotate(Vector3.forward * turnSpeed);
|
||||||
if ( Input.GetAxis("Horizontal") > 0 )
|
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);
|
rb.MoveRotation(rb.rotation - turnSpeed);
|
||||||
|
} else {
|
||||||
|
rb.MoveRotation(rb.rotation);
|
||||||
|
}
|
||||||
//transform.Rotate(Vector3.forward * -turnSpeed);
|
//transform.Rotate(Vector3.forward * -turnSpeed);
|
||||||
// Debug lines
|
// Debug lines
|
||||||
Debug.DrawLine(transform.position, transform.position + speedVec, Color.magenta, 0.01f, false);
|
Debug.DrawLine(transform.position, transform.position + speedVec, Color.magenta, 0.01f, false);
|
||||||
|
|
Loading…
Add table
Reference in a new issue