made it that inputting a direction when hanging makes us leave the wall
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 22s
Create tag and build when new code gets to main / Test (push) Successful in 7m25s
Create tag and build when new code gets to main / Export (push) Successful in 8m55s
Create tag and build when new code gets to main / ReleaseName (push) Successful in 3s
Create tag and build when new code gets to main / Release (push) Successful in 16m7s
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 22s
Create tag and build when new code gets to main / Test (push) Successful in 7m25s
Create tag and build when new code gets to main / Export (push) Successful in 8m55s
Create tag and build when new code gets to main / ReleaseName (push) Successful in 3s
Create tag and build when new code gets to main / Release (push) Successful in 16m7s
This commit is contained in:
@@ -1154,6 +1154,12 @@ delay_in_seconds = "0.0"
|
|||||||
[node name="Hanging" type="Node" parent="StateChart/Root/Movement/OnWall" unique_id=1208015492]
|
[node name="Hanging" type="Node" parent="StateChart/Root/Movement/OnWall" unique_id=1208015492]
|
||||||
script = ExtResource("27_34snm")
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
|
[node name="OnMove" type="Node" parent="StateChart/Root/Movement/OnWall/Hanging" unique_id=751408886]
|
||||||
|
script = ExtResource("28_n7qhm")
|
||||||
|
to = NodePath("../../Hugging")
|
||||||
|
event = &"move"
|
||||||
|
delay_in_seconds = "0.0"
|
||||||
|
|
||||||
[node name="Running" type="Node" parent="StateChart/Root/Movement/OnWall" unique_id=766545186]
|
[node name="Running" type="Node" parent="StateChart/Root/Movement/OnWall" unique_id=766545186]
|
||||||
script = ExtResource("27_34snm")
|
script = ExtResource("27_34snm")
|
||||||
|
|
||||||
|
|||||||
@@ -1200,10 +1200,8 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private float _timeOnWall;
|
|
||||||
public void OnWallStarted()
|
public void OnWallStarted()
|
||||||
{
|
{
|
||||||
_timeOnWall = 0f;
|
|
||||||
if (_simpleDashCooldownTimer.IsStopped())
|
if (_simpleDashCooldownTimer.IsStopped())
|
||||||
_canDash = true;
|
_canDash = true;
|
||||||
else
|
else
|
||||||
@@ -1219,7 +1217,6 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
}
|
}
|
||||||
public void OnWallStopped()
|
public void OnWallStopped()
|
||||||
{
|
{
|
||||||
_timeOnWall = 0f;
|
|
||||||
}
|
}
|
||||||
public void OnLeaveWallFromRun()
|
public void OnLeaveWallFromRun()
|
||||||
{
|
{
|
||||||
@@ -1229,7 +1226,6 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
{
|
{
|
||||||
// _canDash = true;
|
// _canDash = true;
|
||||||
// _canDashAirborne = true;
|
// _canDashAirborne = true;
|
||||||
_timeOnWall += delta;
|
|
||||||
|
|
||||||
if (IsInputTowardsWall(_wallHugStartNormal))
|
if (IsInputTowardsWall(_wallHugStartNormal))
|
||||||
WallHug(delta);
|
WallHug(delta);
|
||||||
@@ -1264,7 +1260,6 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
{
|
{
|
||||||
// _canDash = false;
|
// _canDash = false;
|
||||||
// _canDashAirborne = false;
|
// _canDashAirborne = false;
|
||||||
_timeOnWall += delta;
|
|
||||||
|
|
||||||
// Find horizontal velocity projected on the current wall
|
// Find horizontal velocity projected on the current wall
|
||||||
var hvel = new Vector3(Velocity.X, 0, Velocity.Z);
|
var hvel = new Vector3(Velocity.X, 0, Velocity.Z);
|
||||||
@@ -1393,9 +1388,10 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
}
|
}
|
||||||
public void WallHang(float delta)
|
public void WallHang(float delta)
|
||||||
{
|
{
|
||||||
_timeOnWall += 1; // Consider we've already spent quite some time on wall
|
|
||||||
Velocity = Vector3.Zero;
|
Velocity = Vector3.Zero;
|
||||||
GlobalPosition = _wallHugStartLocation;
|
GlobalPosition = _wallHugStartLocation;
|
||||||
|
if (GetGlobalMoveInput().Length() > Mathf.Epsilon)
|
||||||
|
_playerState.SendEvent("move");
|
||||||
}
|
}
|
||||||
public bool IsFacingWall()
|
public bool IsFacingWall()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user