added water area scene, closes #10
This commit is contained in:
parent
9eb3951361
commit
a5093e62e4
7 changed files with 140 additions and 48 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue