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) =>
{
GD.Print(body.Name + " entered");
if (body is Player && InteractionTrigger is null)
{
OnInteraction();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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