more player states?
This commit is contained in:
parent
7846f1a068
commit
4d0ad13bf3
2 changed files with 21 additions and 6 deletions
|
|
@ -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<Input.OnPhysicsProcess>
|
||||
{
|
||||
public Type On(in Input.OnPhysicsProcess input)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
[Meta]
|
||||
public sealed partial record Airborne : Root
|
||||
public sealed partial record Airborne : Root, IGet<Input.OnPhysicsProcess>
|
||||
{
|
||||
public Type On(in Input.OnPhysicsProcess input)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
[Meta]
|
||||
public sealed partial record Diving : Root
|
||||
public sealed partial record Diving : Root, IGet<Input.OnPhysicsProcess>
|
||||
{
|
||||
public Type On(in Input.OnPhysicsProcess input)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue