diff --git a/src/game.tscn b/src/game.tscn index ee8f6ac..e8f182c 100644 --- a/src/game.tscn +++ b/src/game.tscn @@ -172,6 +172,7 @@ texture_repeat = 2 texture = ExtResource("5_wqvko") region_enabled = true region_rect = Rect2(0, 0, 10000, 10000) +metadata/_edit_lock_ = true [node name="Level" type="Node2D" parent="World" unique_id=1470134692] @@ -221,3 +222,4 @@ offset_bottom = 34.0 mouse_filter = 2 script = ExtResource("6_pk08u") Player = NodePath("../../../World/Player") +metadata/_edit_use_anchors_ = true diff --git a/src/player/Player.cs b/src/player/Player.cs index 39b4993..605aff5 100644 --- a/src/player/Player.cs +++ b/src/player/Player.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Collections.Specialized; using Chickensoft.LogicBlocks; @@ -42,7 +43,7 @@ public sealed partial class Player : CharacterBody2D, IAttackable, IHitboxOwner, public float JumpAscentSpeed { get; set; } = 200.0f; [Export(PropertyHint.None, "suffix:s")] - public float LateJumpTimeLimit { get; set; } = 0.15f; + public float LateJumpTimeLimit { get; set; } = 0.1f; [Export(PropertyHint.None, "suffix:s")] public float SlashSpeedBoost { get; set; } = 90.0f; @@ -335,11 +336,11 @@ public sealed partial class Player : CharacterBody2D, IAttackable, IHitboxOwner, private bool IsInputVecDown(Vector2 vec) { - return Mathf.Abs(vec.AngleTo(Vector2.Down)) < DownInputAngle && vec.Length() > 0.1f; + return Mathf.Abs(vec.AngleTo(Vector2.Down)) < DownInputAngle && vec.Length() > 0.01f; } private bool IsInputVecSide(Vector2 vec) { - return vec.Length() > 0.1f + return vec.Length() > 0.01f && (Mathf.Abs(vec.AngleTo(Vector2.Left)) < SideInputAngle || Mathf.Abs(vec.AngleTo(Vector2.Right)) < SideInputAngle) ; } @@ -394,16 +395,28 @@ public sealed partial class Player : CharacterBody2D, IAttackable, IHitboxOwner, public abstract partial record Root : LogicBlockState { [Meta] - public sealed partial record Grounded : Root + public sealed partial record Grounded : Root, IGet { + public Type On(in Input.OnPhysicsProcess input) + { + throw new NotImplementedException(); + } } [Meta] - public sealed partial record Airborne : Root + public sealed partial record Airborne : Root, IGet { + public Type On(in Input.OnPhysicsProcess input) + { + throw new NotImplementedException(); + } } [Meta] - public sealed partial record Diving : Root + public sealed partial record Diving : Root, IGet { + public Type On(in Input.OnPhysicsProcess input) + { + throw new NotImplementedException(); + } } } }