Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a938b245e | |||
| 52ebc68a02 |
@@ -13,7 +13,7 @@
|
|||||||
transform = Transform3D(-0.1772511, 0.44628847, 0.87715954, 0.49540228, -0.72966087, 0.4713508, 0.85038733, 0.51809436, -0.09175911, 0, 0, 0)
|
transform = Transform3D(-0.1772511, 0.44628847, 0.87715954, 0.49540228, -0.72966087, 0.4713508, 0.85038733, 0.51809436, -0.09175911, 0, 0, 0)
|
||||||
|
|
||||||
[node name="Player" parent="." index="6" unique_id=1309399929]
|
[node name="Player" parent="." index="6" unique_id=1309399929]
|
||||||
transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, -16, 22.91025, -51.458496)
|
transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, -0.5, 0.4102497, 0.5415039)
|
||||||
HasSword = false
|
HasSword = false
|
||||||
HasParry = false
|
HasParry = false
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ item_0/text = "1 - ExampleLevel"
|
|||||||
|
|
||||||
[node name="SceneLister" type="Node" parent="." unique_id=149935027]
|
[node name="SceneLister" type="Node" parent="." unique_id=149935027]
|
||||||
script = ExtResource("3_stdqw")
|
script = ExtResource("3_stdqw")
|
||||||
files = Array[String](["res://maps/gyms/metrics.tscn", "res://maps/zoos/grounded_flying_ennemies.tscn"])
|
files = Array[String](["res://maps/gyms/metrics.tscn", "res://maps/levels/tuto_enemies.tscn", "res://maps/levels/tuto_movement.tscn", "res://maps/levels/tuto_sword_parry.tscn", "res://maps/zoos/grounded_flying_ennemies.tscn"])
|
||||||
directory = "res://maps"
|
directory = "res://maps"
|
||||||
|
|
||||||
[connection signal="item_activated" from="Control/LevelButtonsContainer" to="." method="_on_level_buttons_container_item_activated"]
|
[connection signal="item_activated" from="Control/LevelButtonsContainer" to="." method="_on_level_buttons_container_item_activated"]
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ graph_offset = Vector2(-180.277, 49)
|
|||||||
[node name="MainMenu" unique_id=766584506 instance=ExtResource("1_my8ii")]
|
[node name="MainMenu" unique_id=766584506 instance=ExtResource("1_my8ii")]
|
||||||
script = ExtResource("2_nyjay")
|
script = ExtResource("2_nyjay")
|
||||||
level_select_packed_scene = ExtResource("3_8i6b8")
|
level_select_packed_scene = ExtResource("3_8i6b8")
|
||||||
game_scene_path = "uid://bx3cd2hoaok3k"
|
game_scene_path = "uid://bd0d7gvinx35c"
|
||||||
menu_context = ExtResource("3_ytpwg")
|
menu_context = ExtResource("3_ytpwg")
|
||||||
back_action = ExtResource("4_8i6b8")
|
back_action = ExtResource("4_8i6b8")
|
||||||
|
|
||||||
|
|||||||
@@ -869,7 +869,8 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
var haveEnoughSpeed = hvelProjected.Length() > WallRunSpeedThreshold;
|
var haveEnoughSpeed = hvelProjected.Length() > WallRunSpeedThreshold;
|
||||||
var isCoplanarEnough = Velocity.AngleTo(wallNormal) > Math.PI/4 && Velocity.AngleTo(wallNormal) < 3*Math.PI/4;
|
var isCoplanarEnough = Velocity.AngleTo(wallNormal) > Math.PI/4 && Velocity.AngleTo(wallNormal) < 3*Math.PI/4;
|
||||||
var isGoingDownwards = Velocity.AngleTo(Vector3.Down) < Math.PI/4;
|
var isGoingDownwards = Velocity.AngleTo(Vector3.Down) < Math.PI/4;
|
||||||
return haveEnoughSpeed && isCoplanarEnough && !isGoingDownwards && isIndeedWall && !_coyoteEnabled.Active;
|
var shouldStart = haveEnoughSpeed && isCoplanarEnough && !isGoingDownwards && isIndeedWall;
|
||||||
|
return shouldStart;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float ComputeVerticalSpeedGravity(float delta)
|
public float ComputeVerticalSpeedGravity(float delta)
|
||||||
@@ -1300,12 +1301,12 @@ public partial class PlayerController : CharacterBody3D,
|
|||||||
{
|
{
|
||||||
if (IsTryingToMantle()) _playerState.SendEvent("mantle");
|
if (IsTryingToMantle()) _playerState.SendEvent("mantle");
|
||||||
|
|
||||||
if (ShouldStartWallRun() && Velocity.Y < WallRunUpwardVelocity)
|
// if (ShouldStartWallRun() && Velocity.Y < WallRunUpwardVelocity)
|
||||||
{
|
// {
|
||||||
SetVerticalVelocity(WallRunUpwardVelocity);
|
// SetVerticalVelocity(WallRunUpwardVelocity);
|
||||||
_playerState.SendEvent("wall_run");
|
// _playerState.SendEvent("wall_run");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Update horizontal velocity
|
// Update horizontal velocity
|
||||||
var horizontalVelocity = ComputeHVelocityAir(delta);
|
var horizontalVelocity = ComputeHVelocityAir(delta);
|
||||||
|
|||||||
Reference in New Issue
Block a user