remove unnecessary comments and print statements

pull/6/head
John Montagu, the 4th Earl of Sandvich 2023-09-01 01:53:04 -07:00
parent f5d83414eb
commit d04679009a
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
9 changed files with 1 additions and 19 deletions

View File

@ -35,7 +35,6 @@ public partial class ConnectorBox : Area2D
{ {
BodyEntered += (Node2D body) => BodyEntered += (Node2D body) =>
{ {
GD.Print(body.Name + " entered");
if (body is Player && InteractionTrigger is null) if (body is Player && InteractionTrigger is null)
{ {
OnInteraction(); OnInteraction();

View File

@ -30,7 +30,6 @@ public partial class Hurtbox : BoundingBox, IFaction
{ {
InvincibilityTimer.Timeout += () => InvincibilityTimer.Timeout += () =>
{ {
GD.Print("invincibility off");
Monitorable = true; Monitorable = true;
}; };
} }
@ -77,7 +76,6 @@ public partial class Hurtbox : BoundingBox, IFaction
InvincibilityTimer.Start(); InvincibilityTimer.Start();
//Monitorable = false; //Monitorable = false;
SetDeferred("monitorable", false); SetDeferred("monitorable", false);
GD.Print("invincible");
} }
EmitSignal( EmitSignal(

View File

@ -344,7 +344,6 @@ public partial class Character : CharacterBody2D, IFaction
if (this.GetNode("Effects/HurtSound") is AudioStreamPlayer2D sound) if (this.GetNode("Effects/HurtSound") is AudioStreamPlayer2D sound)
{ {
// very small pitch deviation // very small pitch deviation
GD.Print("hurt sound");
sound.At(GlobalPosition).WithPitchDeviation(0.125f).PlayOneShot(); sound.At(GlobalPosition).WithPitchDeviation(0.125f).PlayOneShot();
} }

View File

@ -25,11 +25,6 @@ public sealed partial class Player : Character
public override void _Ready() public override void _Ready()
{ {
InteractionRay = GetNode<InteractionRay>("Direction2D/InteractionRay"); InteractionRay = GetNode<InteractionRay>("Direction2D/InteractionRay");
Death += async (Events.HurtArgs args) =>
{
HurtAnimation.Play("death");
await ToSignal(HurtAnimation, "animation_finished");
};
base._Ready(); base._Ready();
@ -101,8 +96,7 @@ public sealed partial class Player : Character
public override void Die() public override void Die()
{ {
GD.Print("died"); HurtAnimation.Play("death");
//base.Die();
} }
protected override void DrawTarget() protected override void DrawTarget()

View File

@ -71,7 +71,6 @@ public partial class DynamicDoor : StaticBody2D
{ {
if (anim.TrackGetPath(i) == nodePath) if (anim.TrackGetPath(i) == nodePath)
{ {
GD.Print($"Disabled anim for {nodePath}");
anim.TrackSetEnabled(i, isEnabled); anim.TrackSetEnabled(i, isEnabled);
} }
} }

View File

@ -50,7 +50,6 @@ public partial class Inventory : Node2D
{ {
if (child is Item item) if (child is Item item)
{ {
GD.Print("Adding item " + item.Name);
AddItem(item); AddItem(item);
} }
} }

View File

@ -92,7 +92,6 @@ public partial class ProjectileSpawner : Ranged
for (int i = 0; i < ProjectileCount; i++) for (int i = 0; i < ProjectileCount; i++)
{ {
float curDeviation = -i + maxAngleDeviations; float curDeviation = -i + maxAngleDeviations;
GD.Print(curDeviation);
SpawnProjectile(map, target.Rotated(curDeviation * theta)); SpawnProjectile(map, target.Rotated(curDeviation * theta));
} }
} }

View File

@ -23,12 +23,9 @@ public static class Physics
var relVel = relIdle + relDir * speed; var relVel = relIdle + relDir * speed;
var relSpeed = relVel.Length(); var relSpeed = relVel.Length();
GD.Print("Relative velocity: " + relVel);
// get t = time to travel // get t = time to travel
// = (|s2| - |s1|)/(|v2| - |v1|) // = (|s2| - |s1|)/(|v2| - |v1|)
time = position.DistanceTo(targetPosition) / relSpeed; time = position.DistanceTo(targetPosition) / relSpeed;
GD.Print("Time: " + time);
// predict target's position after time t // predict target's position after time t
return targetPosition + targetVelocity * time; return targetPosition + targetVelocity * time;

View File

@ -327,8 +327,6 @@ public partial class World : Node
public void SpawnPlayer() public void SpawnPlayer()
{ {
// TODO: add max health property // TODO: add max health property
//CurrentPlayer.Health = 100;
//CurrentPlayer.Sprite.Visible = true;
if (CurrentMap.SceneFilePath != GlobalState.Stats.SaveMapKey) if (CurrentMap.SceneFilePath != GlobalState.Stats.SaveMapKey)
{ {
LoadScene(GlobalState.Stats.SaveMapKey); LoadScene(GlobalState.Stats.SaveMapKey);