remove unnecessary comments and print statements
parent
f5d83414eb
commit
d04679009a
|
@ -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();
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -71,7 +71,6 @@ public partial class DynamicDoor : StaticBody2D
|
|||
{
|
||||
if (anim.TrackGetPath(i) == nodePath)
|
||||
{
|
||||
GD.Print($"Disabled anim for {nodePath}");
|
||||
anim.TrackSetEnabled(i, isEnabled);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,6 @@ public partial class Inventory : Node2D
|
|||
{
|
||||
if (child is Item item)
|
||||
{
|
||||
GD.Print("Adding item " + item.Name);
|
||||
AddItem(item);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue