Lots of stuff

This commit is contained in:
2021-04-19 15:41:37 +02:00
parent 3d9ca3d590
commit 589124c5fc
10 changed files with 120 additions and 24 deletions
+20 -12
View File
@@ -29,7 +29,7 @@ namespace EvilSatellites.Screens
Player player = new Player(this);
Objects.Add(player);
_player = player;
Satellite prop = new Satellite(this, new Vector3(15, 0, 15));
Satellite prop = new Satellite(this, new Vector3(5000, 5000, 5000));
Objects.Add(prop);
ObjectRadar = new Radar(_player, this);
return;
@@ -63,7 +63,7 @@ namespace EvilSatellites.Screens
objtree.Add(obj);
if (obj.Type == ObjectType.Player)
{
Manager.Sound.ListenerPosition = new System.Numerics.Vector3(obj.Position.X, obj.Position.Y, obj.Position.Z);
Manager.Sound.ListenerPosition = new System.Numerics.Vector3(obj.Position.X+obj.Dimensions.X/2, obj.Position.Y+obj.Dimensions.Y/2, obj.Position.Z+obj.Dimensions.Z/2);
Manager.Sound.ListenerOrientationForward = System.Numerics.Vector3.Normalize(new System.Numerics.Vector3(obj.Rotation.Forward.X, obj.Rotation.Forward.Y, obj.Rotation.Forward.Z));
Manager.Sound.ListenerOrientationUpwards = System.Numerics.Vector3.Normalize(new System.Numerics.Vector3(obj.Rotation.Up.X, obj.Rotation.Up.Y, obj.Rotation.Up.Z));
Manager.Listener.Position = obj.Position;
@@ -130,6 +130,14 @@ namespace EvilSatellites.Screens
{
_player.StopElevating();
}
if (Input.IsJustPressed(Keys.V))
{
_player.StartVacuuming(gameTime);
}
if (Input.IsJustReleased(Keys.V))
{
_player.StopVacuuming();
}
_player.Accelerate(move);
if (Input.IsJustPressed(Keys.Space))
{
@@ -139,14 +147,6 @@ namespace EvilSatellites.Screens
{
_player.CurrentWeapon.Stop();
}
if (Input.IsJustPressed(Keys.V))
{
Tolk.Speak(_player.Movement.Length().ToString(), true);
}
if (Input.IsJustPressed(Keys.C))
{
Tolk.Speak(_player.Position.ToString());
}
if (Input.IsJustPressed(Keys.R))
{
if (ObjectRadar.Active)
@@ -157,9 +157,17 @@ namespace EvilSatellites.Screens
ObjectRadar.Start();
}
}
if (Input.IsJustPressed(Keys.O))
if (Input.IsJustPressed(Keys.T))
{
Tolk.Speak(Objects.Count.ToString());
if (ObjectRadar.Filter == ObjectType.Satellite)
{
ObjectRadar.SetObjectType(ObjectType.Debris);
Tolk.Output("Debris");
} else
{
ObjectRadar.SetObjectType(ObjectType.Satellite);
Tolk.Output("Satellites");
}
}
}