Danger mouse

This commit is contained in:
MarcEricMartel 2023-06-10 17:10:23 -04:00
parent b982ffb7c4
commit 25fe5ee634

View File

@ -21,21 +21,26 @@ public partial class player : Camera3D
public override void _Process(double delta)
{
Vector3 rot = this.Rotation;
bool zin = true, zout = true;
this.Rotation -= rot;
if (_mLeft)
if (this.Position.Y < 5)
zin = false;
else if (this.Position.Y > 20)
zout = false;
if (_mLeft && this.Position.X > -30)
this.Translate(new Vector3((float)-delta*10, 0, 0));
if (_mRight)
if (_mRight && this.Position.X < 30)
this.Translate(new Vector3((float)delta*10, 0, 0));
if (_mUp)
if (_mUp && this.Position.Z > -25)
this.Translate(new Vector3(0, 0, (float)-delta*10));
if (_mDown)
if (_mDown && this.Position.Z < 25)
this.Translate(new Vector3(0, 0, (float)delta*10));
this.Rotation += rot;
if (_wIn && this.Position.Z > 3)
if (_wIn && zin)
this.Translate(new Vector3(0, 0, (float)-delta*10));
if (_wOut && this.Position.Z < 12)
if (_wOut && zout)
this.Translate(new Vector3(0, 0, (float)delta*10));
_con.Set("text", this.Position);