added water area scene, closes #10

This commit is contained in:
Lilith Schier 2026-08-30 15:08:50 +02:00
parent 9eb3951361
commit a5093e62e4
7 changed files with 140 additions and 48 deletions

View file

@ -258,10 +258,15 @@ public sealed partial class Player : CharacterBody2D, IAttackable, IHitboxOwner,
if (IsOnCeiling()) JumpTimer.Stop();
}
public void OnEnteredWater(Node2D body) => IsInWater = true;
public void OnEnteredWater(Node2D body)
{
GD.Print("Entered water");
IsInWater = true;
}
public void OnLeftWater(Node2D body)
{
GD.Print("Left water");
if (!IsInWater || SubmersedSensor.HasOverlappingBodies()) return;
IsInWater = false;
WaterJumpAllowedTimer.Start();