Ended with remapping and removed old junk
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 20s
Create tag and build when new code gets to main / Export (push) Successful in 10m34s

This commit is contained in:
2026-01-12 15:41:43 +01:00
parent 52a9c3f120
commit 1a4b2f4c19
8 changed files with 126 additions and 356 deletions

View File

@@ -14,22 +14,22 @@
[ext_resource type="Script" uid="uid://dd1yrt7eiiyf4" path="res://player_controller/Scripts/CapsuleCollider.cs" id="8_lmtjd"] [ext_resource type="Script" uid="uid://dd1yrt7eiiyf4" path="res://player_controller/Scripts/CapsuleCollider.cs" id="8_lmtjd"]
[ext_resource type="Resource" uid="uid://c3e0ivgaxrsyb" path="res://systems/inputs/base_mode/aim_down.tres" id="8_obsfv"] [ext_resource type="Resource" uid="uid://c3e0ivgaxrsyb" path="res://systems/inputs/base_mode/aim_down.tres" id="8_obsfv"]
[ext_resource type="PackedScene" uid="uid://wq1okogkhc5l" path="res://systems/mantle/mantle_system.tscn" id="8_qu4wy"] [ext_resource type="PackedScene" uid="uid://wq1okogkhc5l" path="res://systems/mantle/mantle_system.tscn" id="8_qu4wy"]
[ext_resource type="Resource" uid="uid://7wm8ywvujwf" path="res://systems/inputs/base_mode/aim_cancel.tres" id="9_5p2qc"]
[ext_resource type="Resource" uid="uid://bebstkm608wxx" path="res://systems/inputs/base_mode/aim_pressed.tres" id="9_nob5r"] [ext_resource type="Resource" uid="uid://bebstkm608wxx" path="res://systems/inputs/base_mode/aim_pressed.tres" id="9_nob5r"]
[ext_resource type="Resource" uid="uid://bdit2jy5gbpts" path="res://systems/inputs/base_mode/jump.tres" id="10_4u7i3"] [ext_resource type="Resource" uid="uid://bdit2jy5gbpts" path="res://systems/inputs/base_mode/jump.tres" id="10_4u7i3"]
[ext_resource type="Script" uid="uid://g8idirw62qe0" path="res://player_controller/Scripts/Bobbing.cs" id="10_7wk1w"] [ext_resource type="Script" uid="uid://g8idirw62qe0" path="res://player_controller/Scripts/Bobbing.cs" id="10_7wk1w"]
[ext_resource type="Resource" uid="uid://b334rau1yxmm7" path="res://systems/inputs/base_mode/slide_down.tres" id="10_nodcl"]
[ext_resource type="Resource" uid="uid://b5gx3q8nvu72e" path="res://systems/inputs/base_mode/hit.tres" id="11_cresl"] [ext_resource type="Resource" uid="uid://b5gx3q8nvu72e" path="res://systems/inputs/base_mode/hit.tres" id="11_cresl"]
[ext_resource type="Resource" uid="uid://bbce5wfwxpns1" path="res://systems/inputs/base_mode/slide_release.tres" id="11_ruloh"]
[ext_resource type="PackedScene" uid="uid://0ysqmqphq6mq" path="res://systems/head/head_system.tscn" id="11_rxwoh"] [ext_resource type="PackedScene" uid="uid://0ysqmqphq6mq" path="res://systems/head/head_system.tscn" id="11_rxwoh"]
[ext_resource type="Resource" uid="uid://d2r0ur8k3cuu3" path="res://systems/inputs/base_mode/dash.tres" id="12_34snm"] [ext_resource type="Resource" uid="uid://d2r0ur8k3cuu3" path="res://systems/inputs/base_mode/dash.tres" id="12_34snm"]
[ext_resource type="Script" uid="uid://b6k73aj5povgv" path="res://player_controller/Scripts/FieldOfView.cs" id="12_m2mxi"] [ext_resource type="Script" uid="uid://b6k73aj5povgv" path="res://player_controller/Scripts/FieldOfView.cs" id="12_m2mxi"]
[ext_resource type="Resource" uid="uid://55b0dsvioj08" path="res://systems/inputs/base_mode/jump_pressed.tres" id="13_nob5r"] [ext_resource type="Resource" uid="uid://55b0dsvioj08" path="res://systems/inputs/base_mode/jump_pressed.tres" id="13_nob5r"]
[ext_resource type="Shape3D" uid="uid://keseacdcooot" path="res://player_controller/resources/PlayerShape.tres" id="13_r7i3q"] [ext_resource type="Shape3D" uid="uid://keseacdcooot" path="res://player_controller/resources/PlayerShape.tres" id="13_r7i3q"]
[ext_resource type="Resource" uid="uid://bw5k2gsv3jqcv" path="res://systems/inputs/base_mode/throw.tres" id="16_nob5r"]
[ext_resource type="Script" uid="uid://b5nk6ntlps3x0" path="res://systems/inputs/input_system.gd" id="16_v31n3"] [ext_resource type="Script" uid="uid://b5nk6ntlps3x0" path="res://systems/inputs/input_system.gd" id="16_v31n3"]
[ext_resource type="Resource" uid="uid://b334rau1yxmm7" path="res://systems/inputs/base_mode/slide.tres" id="17_6lejt"]
[ext_resource type="Resource" uid="uid://htqvokm8mufq" path="res://systems/inputs/base_mode/move.tres" id="17_h6vvl"] [ext_resource type="Resource" uid="uid://htqvokm8mufq" path="res://systems/inputs/base_mode/move.tres" id="17_h6vvl"]
[ext_resource type="PackedScene" uid="uid://cqduhd4opgwvm" path="res://systems/dash/dash_system.tscn" id="18_q5h8a"] [ext_resource type="PackedScene" uid="uid://cqduhd4opgwvm" path="res://systems/dash/dash_system.tscn" id="18_q5h8a"]
[ext_resource type="Resource" uid="uid://bbce5wfwxpns1" path="res://systems/inputs/base_mode/slide_pressed.tres" id="18_q14ux"]
[ext_resource type="Resource" uid="uid://spo3pbqjx0eb" path="res://systems/inputs/base_mode/parry.tres" id="18_ruloh"]
[ext_resource type="Resource" uid="uid://dxy0071ic1wdj" path="res://systems/inputs/base_mode/slam.tres" id="20_nob5r"]
[ext_resource type="PackedScene" uid="uid://dbe5f0p6lvqtr" path="res://systems/tween_queue/tween_queue_system.tscn" id="22_rpwev"] [ext_resource type="PackedScene" uid="uid://dbe5f0p6lvqtr" path="res://systems/tween_queue/tween_queue_system.tscn" id="22_rpwev"]
[ext_resource type="PackedScene" uid="uid://bcwkugn6v3oy7" path="res://addons/godot_state_charts/utilities/state_chart_debugger.tscn" id="24_q5h8a"] [ext_resource type="PackedScene" uid="uid://bcwkugn6v3oy7" path="res://addons/godot_state_charts/utilities/state_chart_debugger.tscn" id="24_q5h8a"]
[ext_resource type="Script" uid="uid://couw105c3bde4" path="res://addons/godot_state_charts/state_chart.gd" id="25_wv70j"] [ext_resource type="Script" uid="uid://couw105c3bde4" path="res://addons/godot_state_charts/state_chart.gd" id="25_wv70j"]
@@ -67,12 +67,14 @@ blend_mode = 1
[node name="Player" type="CharacterBody3D"] [node name="Player" type="CharacterBody3D"]
script = ExtResource("1_poq2x") script = ExtResource("1_poq2x")
WalkSpeed = 7.5 WalkSpeed = 7.5
AccelerationFloor = 4.0
DecelerationFloor = 3.0
AccelerationAir = 0.8 AccelerationAir = 0.8
DecelerationAir = 0.02 DecelerationAir = 0.02
Weight = 4.0 Weight = 4.0
MantlePath = ExtResource("2_6lejt") MantlePath = ExtResource("2_6lejt")
MantleDashStrength = 20.0 MantleDashStrength = 25.0
MantleJumpStartVelocity = 13.0 MantleJumpStartVelocity = 15.0
CoyoteTime = 0.3 CoyoteTime = 0.3
InputBufferFrames = 5 InputBufferFrames = 5
SimpleJumpStartVelocity = 6.0 SimpleJumpStartVelocity = 6.0
@@ -80,13 +82,9 @@ SimpleJumpHangTimeInFrames = 1
SimpleJumpGravityLesseningFactor = 2.0 SimpleJumpGravityLesseningFactor = 2.0
DoubleJumpHangTimeInFrames = 3 DoubleJumpHangTimeInFrames = 3
DoubleJumpGravityLesseningFactor = 1.5 DoubleJumpGravityLesseningFactor = 1.5
MegaJumpStartVelocity = 30.0
MegaJumpHangTimeInFrames = 12
MegaJumpGravityLesseningFactor = 1.2
WallJumpStartVelocity = 8.0 WallJumpStartVelocity = 8.0
MaxNumberOfEmpoweredActions = 3 MaxNumberOfEmpoweredActions = 3
SimpleDashStrength = 15.0 SimpleDashStrength = 15.0
PoweredDashStrength = 30.0
AimedDashTime = 0.2 AimedDashTime = 0.2
PostDashSpeed = 30.0 PostDashSpeed = 30.0
WallHugGravityLesseningFactor = 15.0 WallHugGravityLesseningFactor = 15.0
@@ -107,19 +105,19 @@ move_left = ExtResource("5_q14ux")
move_right = ExtResource("6_q7bng") move_right = ExtResource("6_q7bng")
move_front = ExtResource("7_m8gvy") move_front = ExtResource("7_m8gvy")
move_back = ExtResource("8_jb43f") move_back = ExtResource("8_jb43f")
rotate_y = ExtResource("4_rxwoh") rotate_vertical = ExtResource("4_rxwoh")
rotate_floorplane = ExtResource("5_4u7i3") rotate_floorplane = ExtResource("5_4u7i3")
aim_down = ExtResource("8_obsfv") aim_down = ExtResource("8_obsfv")
aim_pressed = ExtResource("9_nob5r") aim_pressed = ExtResource("9_nob5r")
aim_released = ExtResource("8_lhb11") aim_released = ExtResource("8_lhb11")
jump = ExtResource("10_4u7i3") jump = ExtResource("10_4u7i3")
jump_pressed = ExtResource("13_nob5r") jump_pressed = ExtResource("13_nob5r")
empower_down = ExtResource("10_nodcl") slide = ExtResource("17_6lejt")
empower_released = ExtResource("11_ruloh") slide_pressed = ExtResource("18_q14ux")
aim_canceled = ExtResource("9_5p2qc")
hit = ExtResource("11_cresl") hit = ExtResource("11_cresl")
parry = ExtResource("18_ruloh")
dash = ExtResource("12_34snm") dash = ExtResource("12_34snm")
throw = ExtResource("16_nob5r") slam = ExtResource("20_nob5r")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."] [node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.85, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.85, 0)
@@ -395,28 +393,6 @@ delay_in_seconds = "0.0"
[node name="Canceled" type="Node" parent="StateChart/Root/Aim"] [node name="Canceled" type="Node" parent="StateChart/Root/Aim"]
script = ExtResource("27_34snm") script = ExtResource("27_34snm")
[node name="Empower" type="Node" parent="StateChart/Root"]
script = ExtResource("26_infe6")
initial_state = NodePath("Off")
[node name="Off" type="Node" parent="StateChart/Root/Empower"]
script = ExtResource("27_34snm")
[node name="ToOn" type="Node" parent="StateChart/Root/Empower/Off"]
script = ExtResource("28_n7qhm")
to = NodePath("../../On")
event = &"empower_down"
delay_in_seconds = "0.0"
[node name="On" type="Node" parent="StateChart/Root/Empower"]
script = ExtResource("27_34snm")
[node name="ToOff" type="Node" parent="StateChart/Root/Empower/On"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Off")
event = &"empower_released"
delay_in_seconds = "0.0"
[node name="PowerReserve" type="Node" parent="StateChart/Root"] [node name="PowerReserve" type="Node" parent="StateChart/Root"]
script = ExtResource("26_infe6") script = ExtResource("26_infe6")
initial_state = NodePath("Full") initial_state = NodePath("Full")
@@ -669,7 +645,6 @@ script = ExtResource("27_34snm")
[node name="OnWallHug" type="Node" parent="StateChart/Root/Movement/Airborne/DoubleJumpEnabled"] [node name="OnWallHug" type="Node" parent="StateChart/Root/Movement/Airborne/DoubleJumpEnabled"]
script = ExtResource("28_n7qhm") script = ExtResource("28_n7qhm")
to = NodePath("../../../OnWall/HuggingCoyoteEnabled")
event = &"wall_hug" event = &"wall_hug"
delay_in_seconds = "0.0" delay_in_seconds = "0.0"
@@ -728,18 +703,9 @@ to = NodePath("../../Mantling")
event = &"mantle" event = &"mantle"
delay_in_seconds = "0.0" delay_in_seconds = "0.0"
[node name="HuggingCoyoteEnabled" type="Node" parent="StateChart/Root/Movement/OnWall"] [node name="OnJump" type="Node" parent="StateChart/Root/Movement/OnWall"]
script = ExtResource("27_34snm")
[node name="OnExpiration" type="Node" parent="StateChart/Root/Movement/OnWall/HuggingCoyoteEnabled"]
script = ExtResource("28_n7qhm") script = ExtResource("28_n7qhm")
to = NodePath("../../Hugging") to = NodePath("../../Jump/DoubleJump")
event = &"coyote_expired"
delay_in_seconds = "0.0"
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/OnWall/HuggingCoyoteEnabled"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Jump/DoubleJump")
event = &"jump" event = &"jump"
delay_in_seconds = "0.0" delay_in_seconds = "0.0"
@@ -752,12 +718,6 @@ to = NodePath("../../../Dashing/Dash")
event = &"dash" event = &"dash"
delay_in_seconds = "0.0" delay_in_seconds = "0.0"
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/OnWall/Hugging"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Jump/DoubleJump")
event = &"jump"
delay_in_seconds = "0.0"
[node name="Hanging" type="Node" parent="StateChart/Root/Movement/OnWall"] [node name="Hanging" type="Node" parent="StateChart/Root/Movement/OnWall"]
script = ExtResource("27_34snm") script = ExtResource("27_34snm")
@@ -767,63 +727,31 @@ to = NodePath("../../../Dashing/Dash")
event = &"dash" event = &"dash"
delay_in_seconds = "0.0" delay_in_seconds = "0.0"
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/OnWall/Hanging"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Jump/DoubleJump")
event = &"jump"
delay_in_seconds = "0.0"
[node name="RunningCoyoteEnabled" type="Node" parent="StateChart/Root/Movement/OnWall"]
script = ExtResource("27_34snm")
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/OnWall/RunningCoyoteEnabled"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Jump/DoubleJump")
event = &"jump"
delay_in_seconds = "0.0"
[node name="OnExpiration" type="Node" parent="StateChart/Root/Movement/OnWall/RunningCoyoteEnabled"]
script = ExtResource("28_n7qhm")
to = NodePath("../../Running")
event = &"coyote_expired"
delay_in_seconds = "0.0"
[node name="OnLeaveWall" type="Node" parent="StateChart/Root/Movement/OnWall/RunningCoyoteEnabled"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Airborne/CoyoteEnabled")
event = &"start_falling"
delay_in_seconds = "0.0"
[node name="Running" type="Node" parent="StateChart/Root/Movement/OnWall"] [node name="Running" type="Node" parent="StateChart/Root/Movement/OnWall"]
script = ExtResource("27_34snm") script = ExtResource("27_34snm")
[node name="OnJump" type="Node" parent="StateChart/Root/Movement/OnWall/Running"]
script = ExtResource("28_n7qhm")
to = NodePath("../../../Jump/SimpleJump")
event = &"jump"
delay_in_seconds = "0.0"
[node name="OnLeaveWall" type="Node" parent="StateChart/Root/Movement/OnWall/Running"] [node name="OnLeaveWall" type="Node" parent="StateChart/Root/Movement/OnWall/Running"]
script = ExtResource("28_n7qhm") script = ExtResource("28_n7qhm")
to = NodePath("../../../Airborne/CoyoteEnabled") to = NodePath("../../../Airborne/CoyoteEnabled")
event = &"start_falling" event = &"start_falling"
delay_in_seconds = "0.0" delay_in_seconds = "0.0"
[connection signal="input_aim_canceled" from="InputController" to="." method="OnInputAimCanceled"]
[connection signal="input_aim_down" from="InputController" to="." method="OnInputAimDown"] [connection signal="input_aim_down" from="InputController" to="." method="OnInputAimDown"]
[connection signal="input_aim_pressed" from="InputController" to="." method="OnInputAimPressed"] [connection signal="input_aim_pressed" from="InputController" to="." method="OnInputAimPressed"]
[connection signal="input_aim_released" from="InputController" to="." method="OnInputAimReleased"] [connection signal="input_aim_released" from="InputController" to="." method="OnInputAimReleased"]
[connection signal="input_dash" from="InputController" to="." method="OnInputDashPressed"] [connection signal="input_dash" from="InputController" to="." method="OnInputDashPressed"]
[connection signal="input_device_changed" from="InputController" to="." method="InputDeviceChanged"] [connection signal="input_device_changed" from="InputController" to="." method="InputDeviceChanged"]
[connection signal="input_empower_down" from="InputController" to="." method="OnInputEmpowerDown"]
[connection signal="input_empower_released" from="InputController" to="." method="OnInputEmpowerReleased"]
[connection signal="input_hit" from="InputController" to="." method="OnInputHitPressed"] [connection signal="input_hit" from="InputController" to="." method="OnInputHitPressed"]
[connection signal="input_jump_ended" from="InputController" to="." method="OnInputJumpEnded"] [connection signal="input_jump_ended" from="InputController" to="." method="OnInputJumpEnded"]
[connection signal="input_jump_ongoing" from="InputController" to="." method="OnInputJumpOngoing"] [connection signal="input_jump_ongoing" from="InputController" to="." method="OnInputJumpOngoing"]
[connection signal="input_jump_started" from="InputController" to="." method="OnInputJumpStarted"] [connection signal="input_jump_started" from="InputController" to="." method="OnInputJumpStarted"]
[connection signal="input_move" from="InputController" to="." method="OnInputMove"] [connection signal="input_move" from="InputController" to="." method="OnInputMove"]
[connection signal="input_move_keyboard" from="InputController" to="." method="OnInputMoveKeyboard"] [connection signal="input_move_keyboard" from="InputController" to="." method="OnInputMoveKeyboard"]
[connection signal="input_parry" from="InputController" to="." method="OnInputParryPressed"]
[connection signal="input_rotate_floorplane" from="InputController" to="." method="OnInputRotateFloorplane"] [connection signal="input_rotate_floorplane" from="InputController" to="." method="OnInputRotateFloorplane"]
[connection signal="input_rotate_y" from="InputController" to="." method="OnInputRotateY"] [connection signal="input_rotate_y" from="InputController" to="." method="OnInputRotateY"]
[connection signal="input_throw" from="InputController" to="." method="OnInputThrowPressed"] [connection signal="input_slam" from="InputController" to="." method="OnInputSlamPressed"]
[connection signal="input_slide_ended" from="InputController" to="." method="OnInputSlideEnded"]
[connection signal="input_slide_ongoing" from="InputController" to="." method="OnInputSlideOngoing"]
[connection signal="input_slide_started" from="InputController" to="." method="OnInputSlideStarted"]
[connection signal="WallDetected" from="WallHugSystem" to="." method="OnWallDetected"] [connection signal="WallDetected" from="WallHugSystem" to="." method="OnWallDetected"]

View File

@@ -129,22 +129,10 @@ public partial class PlayerController : CharacterBody3D
[Export(PropertyHint.Range, "1,10,0.1,or_greater")] [Export(PropertyHint.Range, "1,10,0.1,or_greater")]
public float DoubleJumpGravityLesseningFactor { get; set; } = 3f; public float DoubleJumpGravityLesseningFactor { get; set; } = 3f;
// Mega jump
[ExportSubgroup("Mega jump")]
[Export(PropertyHint.Range, "0,100,1,or_greater")]
public float MegaJumpStartVelocity { get; set; } = 10.0f;
[Export(PropertyHint.Range, "0,10,1,or_greater")]
public int MegaJumpHangTimeInFrames { get; set; } = 5;
[Export(PropertyHint.Range, "1,10,0.1,or_greater")]
public float MegaJumpGravityLesseningFactor { get; set; } = 3f;
// Wall jump // Wall jump
[ExportSubgroup("Wall jump")] [ExportSubgroup("Wall jump")]
[Export(PropertyHint.Range, "0,100,1,or_greater")] [Export(PropertyHint.Range, "0,100,1,or_greater")]
public float WallJumpStartVelocity { get; set; } = 10.0f; public float WallJumpStartVelocity { get; set; } = 10.0f;
[Export(PropertyHint.Range, "0,100,1,or_greater")]
public float WallMegajumpStartVelocity { get; set; } = 20.0f;
// Dash // Dash
[ExportGroup("Dash")] [ExportGroup("Dash")]
@@ -154,12 +142,6 @@ public partial class PlayerController : CharacterBody3D
[ExportSubgroup("Simple")] [ExportSubgroup("Simple")]
[Export(PropertyHint.Range, "0,50,0.1")] [Export(PropertyHint.Range, "0,50,0.1")]
public float SimpleDashStrength { get; set; } = 10f; public float SimpleDashStrength { get; set; } = 10f;
// Powered Dash
[ExportSubgroup("Powered")]
[Export(PropertyHint.Range, "0,1,0.01,or_greater")]
public float PoweredDashTime { get; set; } = 0.3f;
[Export(PropertyHint.Range, "0,100,0.1")]
public float PoweredDashStrength { get; set; } = 10f;
// Aimed Dash // Aimed Dash
[ExportSubgroup("Special")] [ExportSubgroup("Special")]
[Export(PropertyHint.Range, "0,1,0.01,or_greater")] [Export(PropertyHint.Range, "0,1,0.01,or_greater")]
@@ -217,7 +199,6 @@ public partial class PlayerController : CharacterBody3D
private StateChart _playerState; private StateChart _playerState;
private StateChartState _aiming; private StateChartState _aiming;
private StateChartState _empowerOn;
private StateChartState _powerExpired; private StateChartState _powerExpired;
private StateChartState _powerRecharging; private StateChartState _powerRecharging;
private StateChartState _powerFull; private StateChartState _powerFull;
@@ -227,25 +208,15 @@ public partial class PlayerController : CharacterBody3D
private StateChartState _coyoteEnabled; private StateChartState _coyoteEnabled;
private StateChartState _simpleJump; private StateChartState _simpleJump;
private StateChartState _doubleJump; private StateChartState _doubleJump;
private StateChartState _megaJump;
private StateChartState _mantling; private StateChartState _mantling;
private StateChartState _simpleDash; private StateChartState _simpleDash;
private StateChartState _poweredDash;
private StateChartState _aimedDash; private StateChartState _aimedDash;
private StateChartState _onWall; private StateChartState _onWall;
private StateChartState _onWallHugging; private StateChartState _onWallHugging;
private StateChartState _onWallHuggingCoyoteEnabled;
private StateChartState _onWallHanging; private StateChartState _onWallHanging;
private StateChartState _onWallRunning; private StateChartState _onWallRunning;
private StateChartState _onWallRunningCoyoteEnabled;
private Transition _onJumpFromWallCoyote; private Transition _onJumpFromWall;
private Transition _onJumpFromWallRunCoyote;
private Transition _onJumpFromWall1;
private Transition _onJumpFromWall2;
private Transition _onJumpFromWall3;
private Transition _onMegajumpFromWall;
private Transition _onLeaveWallFromRunCoyote;
private Transition _onLeaveWallFromRun; private Transition _onLeaveWallFromRun;
private int _currentInputBufferFrames; private int _currentInputBufferFrames;
@@ -316,10 +287,8 @@ public partial class PlayerController : CharacterBody3D
_aiming = StateChartState.Of(GetNode("StateChart/Root/Aim/On")); _aiming = StateChartState.Of(GetNode("StateChart/Root/Aim/On"));
_simpleDash = StateChartState.Of(GetNode("StateChart/Root/Movement/Dashing/Dash")); _simpleDash = StateChartState.Of(GetNode("StateChart/Root/Movement/Dashing/Dash"));
_poweredDash = StateChartState.Of(GetNode("StateChart/Root/Movement/Dashing/PoweredDash"));
_aimedDash = StateChartState.Of(GetNode("StateChart/Root/Movement/Dashing/AimedDash")); _aimedDash = StateChartState.Of(GetNode("StateChart/Root/Movement/Dashing/AimedDash"));
// _actionHanging = StateChartState.Of(GetNode("StateChart/Root/Actions/Hanging")); // _actionHanging = StateChartState.Of(GetNode("StateChart/Root/Actions/Hanging"));
_empowerOn = StateChartState.Of(GetNode("StateChart/Root/Empower/On"));
_powerExpired = StateChartState.Of(GetNode("StateChart/Root/PowerReserve/Expired")); _powerExpired = StateChartState.Of(GetNode("StateChart/Root/PowerReserve/Expired"));
_powerRecharging = StateChartState.Of(GetNode("StateChart/Root/PowerReserve/AtLeastOneCharge")); _powerRecharging = StateChartState.Of(GetNode("StateChart/Root/PowerReserve/AtLeastOneCharge"));
_powerFull = StateChartState.Of(GetNode("StateChart/Root/PowerReserve/Full")); _powerFull = StateChartState.Of(GetNode("StateChart/Root/PowerReserve/Full"));
@@ -330,22 +299,13 @@ public partial class PlayerController : CharacterBody3D
// _doubleJumpEnabled = StateChartState.Of(GetNode("StateChart/Root/Movement/Airborne/DoubleJumpEnabled")); // _doubleJumpEnabled = StateChartState.Of(GetNode("StateChart/Root/Movement/Airborne/DoubleJumpEnabled"));
_simpleJump = StateChartState.Of(GetNode("StateChart/Root/Movement/Jump/SimpleJump")); _simpleJump = StateChartState.Of(GetNode("StateChart/Root/Movement/Jump/SimpleJump"));
_doubleJump = StateChartState.Of(GetNode("StateChart/Root/Movement/Jump/DoubleJump")); _doubleJump = StateChartState.Of(GetNode("StateChart/Root/Movement/Jump/DoubleJump"));
_megaJump = StateChartState.Of(GetNode("StateChart/Root/Movement/Jump/MegaJump"));
_mantling = StateChartState.Of(GetNode("StateChart/Root/Movement/Mantling")); _mantling = StateChartState.Of(GetNode("StateChart/Root/Movement/Mantling"));
_onJumpFromWallCoyote = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/HuggingCoyoteEnabled/OnJump")); _onJumpFromWall = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/OnJump"));
_onJumpFromWallRunCoyote = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/RunningCoyoteEnabled/OnJump"));
_onJumpFromWall1 = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/Hugging/OnJump"));
_onJumpFromWall2 = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/Hanging/OnJump"));
_onJumpFromWall3 = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/Running/OnJump"));
_onMegajumpFromWall = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/OnMegajump"));
_onWall = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall")); _onWall = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall"));
_onWallHuggingCoyoteEnabled = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/HuggingCoyoteEnabled"));
_onWallHugging = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Hugging")); _onWallHugging = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Hugging"));
_onWallHanging = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Hanging")); _onWallHanging = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Hanging"));
_onWallRunning = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Running")); _onWallRunning = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/Running"));
_onWallRunningCoyoteEnabled = StateChartState.Of(GetNode("StateChart/Root/Movement/OnWall/RunningCoyoteEnabled"));
_onLeaveWallFromRun = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/Running/OnLeaveWall")); _onLeaveWallFromRun = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/Running/OnLeaveWall"));
_onLeaveWallFromRunCoyote = Transition.Of(GetNode("StateChart/Root/Movement/OnWall/RunningCoyoteEnabled/OnLeaveWall"));
// State timers // State timers
_powerCooldownTimer = GetNode<Timer>("PowerCooldown"); _powerCooldownTimer = GetNode<Timer>("PowerCooldown");
_timeScaleAimInAirTimer = GetNode<Timer>("TimeScaleAimInAir"); _timeScaleAimInAirTimer = GetNode<Timer>("TimeScaleAimInAir");
@@ -405,19 +365,12 @@ public partial class PlayerController : CharacterBody3D
_doubleJump.StateEntered += OnDoubleJumpStarted; _doubleJump.StateEntered += OnDoubleJumpStarted;
_doubleJump.StatePhysicsProcessing += HandleDoubleJump; _doubleJump.StatePhysicsProcessing += HandleDoubleJump;
_megaJump.StateEntered += OnMegaJumpStarted;
_megaJump.StatePhysicsProcessing += HandleMegaJump;
_mantling.StateEntered += OnMantleStarted; _mantling.StateEntered += OnMantleStarted;
_mantling.StatePhysicsProcessing += HandleMantling; _mantling.StatePhysicsProcessing += HandleMantling;
_simpleDash.StateEntered += OnSimpleDashStarted; _simpleDash.StateEntered += OnSimpleDashStarted;
_simpleDash.StatePhysicsProcessing += HandleSimpleDash; _simpleDash.StatePhysicsProcessing += HandleSimpleDash;
_poweredDash.StateEntered += OnPoweredDashStarted;
_poweredDash.StatePhysicsProcessing += HandlePoweredDash;
_poweredDash.StateExited += OnPoweredDashFinished;
_aimedDash.StateEntered += OnAimedDashStarted; _aimedDash.StateEntered += OnAimedDashStarted;
_aimedDash.StateExited += OnAimedDashFinished; _aimedDash.StateExited += OnAimedDashFinished;
@@ -426,31 +379,12 @@ public partial class PlayerController : CharacterBody3D
_onWall.StateEntered += OnWallStarted; _onWall.StateEntered += OnWallStarted;
_onWall.StateExited += OnWallStopped; _onWall.StateExited += OnWallStopped;
_onWallHuggingCoyoteEnabled.StateEntered += OnWallHuggingStarted;
_onWallHuggingCoyoteEnabled.StatePhysicsProcessing += HandleWallHugging;
_onWallHugging.StatePhysicsProcessing += HandleWallHugging; _onWallHugging.StatePhysicsProcessing += HandleWallHugging;
_onWallHanging.StatePhysicsProcessing += HandleWallHanging; _onWallHanging.StatePhysicsProcessing += HandleWallHanging;
_onWallRunningCoyoteEnabled.StateEntered += OnWallRunningStarted;
_onWallRunningCoyoteEnabled.StatePhysicsProcessing += HandleWallRunning;
_onWallRunning.StatePhysicsProcessing += HandleWallRunning; _onWallRunning.StatePhysicsProcessing += HandleWallRunning;
_onJumpFromWallCoyote.Taken += OnJumpFromWallCoyote; _onJumpFromWall.Taken += OnJumpFromWall;
_onJumpFromWallRunCoyote.Taken += OnJumpFromWallCoyote;
_onJumpFromWall1.Taken += OnJumpFromWall;
_onJumpFromWall2.Taken += OnJumpFromWall;
_onJumpFromWall3.Taken += OnJumpFromWall;
_onMegajumpFromWall.Taken += OnMegajumpFromWall;
_onLeaveWallFromRun.Taken += OnLeaveWallFromRun; _onLeaveWallFromRun.Taken += OnLeaveWallFromRun;
_onLeaveWallFromRunCoyote.Taken += OnLeaveWallFromRun;
}
public void OnGroundDetected(Node3D _)
{
GD.Print("Ground-like");
}
public void OnGroundLost(Node3D _)
{
GD.Print("Ground-less");
} }
public void SetAllowedInputsAll() public void SetAllowedInputsAll()
@@ -595,20 +529,8 @@ public partial class PlayerController : CharacterBody3D
if (IsTryingToMantle()) _playerState.SendEvent("mantle"); if (IsTryingToMantle()) _playerState.SendEvent("mantle");
} }
public void OnWallHuggingStarted()
{
GetTree().CreateTimer(CoyoteTime).Timeout += CoyoteExpired;
}
public void OnWallRunningStarted()
{
GetTree().CreateTimer(CoyoteTime).Timeout += CoyoteExpired;
}
public void OnWallDetected() public void OnWallDetected()
{ {
FinishPoweredDash();
if (!_onWall.Active) if (!_onWall.Active)
return; return;
@@ -713,12 +635,6 @@ public partial class PlayerController : CharacterBody3D
return; return;
} }
if (_empowerOn.Active && CanPerformEmpoweredAction())
{
_playerState.SendEvent("megajump");
return;
}
_playerState.SendEvent("jump"); _playerState.SendEvent("jump");
} }
@@ -752,11 +668,6 @@ public partial class PlayerController : CharacterBody3D
// _canDashAirborne = true; // _canDashAirborne = true;
OnJumpStarted(DoubleJumpStartVelocity); OnJumpStarted(DoubleJumpStartVelocity);
} }
public void OnMegaJumpStarted()
{
PerformEmpoweredAction();
OnJumpStarted(MegaJumpStartVelocity);
}
public void ComputeJumpFromWallHSpeed(float jumpStrength) public void ComputeJumpFromWallHSpeed(float jumpStrength)
{ {
@@ -774,11 +685,6 @@ public partial class PlayerController : CharacterBody3D
SetHorizontalVelocity(currentHorizontalVelocity + wallJumpHorizontalVelocity); SetHorizontalVelocity(currentHorizontalVelocity + wallJumpHorizontalVelocity);
} }
public void OnJumpFromWallCoyote()
{
_isWallJumpAvailable = false;
}
public void OnJumpFromWall() public void OnJumpFromWall()
{ {
if (!IsFacingWall() || (!_isWallJumpAvailable && IsFacingWall())) if (!IsFacingWall() || (!_isWallJumpAvailable && IsFacingWall()))
@@ -790,9 +696,15 @@ public partial class PlayerController : CharacterBody3D
_airborneDashCooldownTimer.Start(); _airborneDashCooldownTimer.Start();
_isWallJumpAvailable = false; _isWallJumpAvailable = false;
} }
public void OnMegajumpFromWall()
public void OnInputSlideStarted()
{
}
public void OnInputSlideOngoing()
{
}
public void OnInputSlideEnded()
{ {
ComputeJumpFromWallHSpeed(WallMegajumpStartVelocity);
} }
public void InputDeviceChanged(bool isUsingGamepad) public void InputDeviceChanged(bool isUsingGamepad)
@@ -963,10 +875,6 @@ public partial class PlayerController : CharacterBody3D
{ {
HandleJump(delta, DoubleJumpGravityLesseningFactor, DoubleJumpHangTimeInFrames); HandleJump(delta, DoubleJumpGravityLesseningFactor, DoubleJumpHangTimeInFrames);
} }
public void HandleMegaJump(float delta)
{
HandleJump(delta, MegaJumpGravityLesseningFactor, MegaJumpHangTimeInFrames);
}
public void PowerRecharging(float delta) public void PowerRecharging(float delta)
{ {
@@ -1035,14 +943,6 @@ public partial class PlayerController : CharacterBody3D
ThrowWeapon(); ThrowWeapon();
} }
} }
public void OnInputEmpowerDown()
{
// _playerState.SendEvent("empower_down");
}
public void OnInputEmpowerReleased()
{
// _playerState.SendEvent("empower_released");
}
public void OnInputDashPressed() public void OnInputDashPressed()
{ {
if (_aiming.Active && CanPerformEmpoweredAction()) if (_aiming.Active && CanPerformEmpoweredAction())
@@ -1052,12 +952,6 @@ public partial class PlayerController : CharacterBody3D
_playerState.SendEvent("cancel_aim"); _playerState.SendEvent("cancel_aim");
return; return;
} }
if (_empowerOn.Active && CanPerformEmpoweredAction())
{
PerformEmpoweredAction();
_playerState.SendEvent("powered_dash");
return;
}
if (_airborne.Active) if (_airborne.Active)
{ {
@@ -1070,11 +964,14 @@ public partial class PlayerController : CharacterBody3D
_bufferedAction = _mantling.Active ? BufferedActions.MantleDash : BufferedActions.Dash; _bufferedAction = _mantling.Active ? BufferedActions.MantleDash : BufferedActions.Dash;
_playerState.SendEvent("dash"); _playerState.SendEvent("dash");
} }
public void OnAimingEntered()
{
if (!CanPerformEmpoweredAction())
return;
public void OnInputSlamPressed()
{
GD.Print("Slam pressed");
}
public void OnInputParryPressed()
{
if (WeaponSystem.FlyingState.Active) if (WeaponSystem.FlyingState.Active)
{ {
DashToFlyingWeapon(); DashToFlyingWeapon();
@@ -1086,10 +983,14 @@ public partial class PlayerController : CharacterBody3D
DashToPlantedWeapon(); DashToPlantedWeapon();
return; return;
} }
}
public void OnAimingEntered()
{
if (!CanPerformEmpoweredAction())
return;
DashSystem.StartPreparingDash(); DashSystem.StartPreparingDash();
DashIndicatorMesh.Visible = true; DashIndicatorMesh.Visible = true;
if (!isOnFloorCustom()) if (!isOnFloorCustom())
ReduceTimeScaleWhileAiming(); ReduceTimeScaleWhileAiming();
} }
@@ -1281,30 +1182,6 @@ public partial class PlayerController : CharacterBody3D
return new Vector3(direction.X, 0, direction.Z).Normalized(); return new Vector3(direction.X, 0, direction.Z).Normalized();
} }
public void OnPoweredDashStarted()
{
Velocity = GetInputGlobalHDirection() * PoweredDashStrength;
GetTree().CreateTimer(PoweredDashTime).Timeout += FinishPoweredDash;
}
public void OnPoweredDashFinished()
{
}
public void FinishPoweredDash()
{
_playerState.SendEvent("dash_finished");
}
public void HandlePoweredDash(float delta)
{
var collision = MoveAndCollide(Velocity * delta, maxCollisions: 10);
if (collision != null)
{
FinishPoweredDash();
}
}
public bool CanPerformEmpoweredAction() public bool CanPerformEmpoweredAction()
{ {
return EmpoweredActionsLeft > 0 && TutorialDone; return EmpoweredActionsLeft > 0 && TutorialDone;
@@ -1334,7 +1211,7 @@ public partial class PlayerController : CharacterBody3D
Vector2 inputLookDir = new Vector2(_inputRotateY, _inputRotateFloorplane); Vector2 inputLookDir = new Vector2(_inputRotateY, _inputRotateFloorplane);
var lookSensitivity = _isUsingGamepad ? _lookSensitivityMultiplier : _mouseSensitivityMultiplier; var lookSensitivity = _isUsingGamepad ? _lookSensitivityMultiplier : _mouseSensitivityMultiplier;
var wallHugContactPoint = _onWallRunning.Active || _onWallRunningCoyoteEnabled.Active ? _currentWallContactPoint : Vector3.Zero; var wallHugContactPoint = _onWallRunning.Active ? _currentWallContactPoint : Vector3.Zero;
var playerVelocity = GetGlobalMoveInput(); var playerVelocity = GetGlobalMoveInput();
HeadSystem.LookAround(delta, inputLookDir, playerVelocity, wallHugContactPoint, lookSensitivity); HeadSystem.LookAround(delta, inputLookDir, playerVelocity, wallHugContactPoint, lookSensitivity);
} }
@@ -1414,7 +1291,7 @@ public partial class PlayerController : CharacterBody3D
Bobbing.CameraBobbingParams cameraBobbingParams = new Bobbing.CameraBobbingParams Bobbing.CameraBobbingParams cameraBobbingParams = new Bobbing.CameraBobbingParams
{ {
Delta = delta, Delta = delta,
IsOnFloorCustom = isOnFloorCustom() || _onWallRunning.Active || _onWallRunningCoyoteEnabled.Active, IsOnFloorCustom = isOnFloorCustom() || _onWallRunning.Active,
Velocity = Velocity, Velocity = Velocity,
SettingsMultiplier = _headBobbingMultiplier SettingsMultiplier = _headBobbingMultiplier
}; };

View File

@@ -1,14 +0,0 @@
[gd_resource type="Resource" script_class="GUIDEAction" load_steps=2 format=3 uid="uid://7wm8ywvujwf"]
[ext_resource type="Script" uid="uid://cluhc11vixkf1" path="res://addons/guide/guide_action.gd" id="1_36r6u"]
[resource]
script = ExtResource("1_36r6u")
name = &""
action_value_type = 0
block_lower_priority_actions = true
emit_as_godot_actions = false
is_remappable = false
display_name = ""
display_category = ""
metadata/_custom_type_script = "uid://cluhc11vixkf1"

View File

@@ -1,4 +1,4 @@
[gd_resource type="Resource" script_class="GUIDEMappingContext" load_steps=159 format=3 uid="uid://bl5crtu1gkrtr"] [gd_resource type="Resource" script_class="GUIDEMappingContext" load_steps=157 format=3 uid="uid://bl5crtu1gkrtr"]
[ext_resource type="Script" uid="uid://cpplm41b5bt6m" path="res://addons/guide/guide_action_mapping.gd" id="1_qmhk6"] [ext_resource type="Script" uid="uid://cpplm41b5bt6m" path="res://addons/guide/guide_action_mapping.gd" id="1_qmhk6"]
[ext_resource type="Resource" uid="uid://htqvokm8mufq" path="res://systems/inputs/base_mode/move.tres" id="2_g6bbx"] [ext_resource type="Resource" uid="uid://htqvokm8mufq" path="res://systems/inputs/base_mode/move.tres" id="2_g6bbx"]
@@ -22,13 +22,13 @@
[ext_resource type="Resource" uid="uid://j1o5ud0plk4" path="res://systems/inputs/base_mode/aim_release.tres" id="16_rvpjj"] [ext_resource type="Resource" uid="uid://j1o5ud0plk4" path="res://systems/inputs/base_mode/aim_release.tres" id="16_rvpjj"]
[ext_resource type="Script" uid="uid://vgjlx6p007lp" path="res://addons/guide/inputs/guide_input_mouse_button.gd" id="17_kxb2c"] [ext_resource type="Script" uid="uid://vgjlx6p007lp" path="res://addons/guide/inputs/guide_input_mouse_button.gd" id="17_kxb2c"]
[ext_resource type="Script" uid="uid://biiggjw6tv4uq" path="res://addons/guide/triggers/guide_trigger_released.gd" id="17_s8kjn"] [ext_resource type="Script" uid="uid://biiggjw6tv4uq" path="res://addons/guide/triggers/guide_trigger_released.gd" id="17_s8kjn"]
[ext_resource type="Resource" uid="uid://bbce5wfwxpns1" path="res://systems/inputs/base_mode/slide_release.tres" id="19_li5ak"]
[ext_resource type="Script" uid="uid://rvttn472ix6v" path="res://addons/guide/inputs/guide_input_joy_button.gd" id="19_qkgmj"] [ext_resource type="Script" uid="uid://rvttn472ix6v" path="res://addons/guide/inputs/guide_input_joy_button.gd" id="19_qkgmj"]
[ext_resource type="Resource" uid="uid://bdit2jy5gbpts" path="res://systems/inputs/base_mode/jump.tres" id="21_818lq"] [ext_resource type="Resource" uid="uid://bdit2jy5gbpts" path="res://systems/inputs/base_mode/jump.tres" id="21_818lq"]
[ext_resource type="Resource" uid="uid://b5gx3q8nvu72e" path="res://systems/inputs/base_mode/hit.tres" id="22_2hs2y"] [ext_resource type="Resource" uid="uid://b5gx3q8nvu72e" path="res://systems/inputs/base_mode/hit.tres" id="22_2hs2y"]
[ext_resource type="Resource" uid="uid://d2r0ur8k3cuu3" path="res://systems/inputs/base_mode/dash.tres" id="23_g6bbx"] [ext_resource type="Resource" uid="uid://d2r0ur8k3cuu3" path="res://systems/inputs/base_mode/dash.tres" id="23_g6bbx"]
[ext_resource type="Script" uid="uid://dsa1dnifd6w32" path="res://addons/guide/guide_mapping_context.gd" id="23_llfhp"] [ext_resource type="Script" uid="uid://dsa1dnifd6w32" path="res://addons/guide/guide_mapping_context.gd" id="23_llfhp"]
[ext_resource type="Resource" uid="uid://b334rau1yxmm7" path="res://systems/inputs/base_mode/slide_down.tres" id="23_rvpjj"] [ext_resource type="Resource" uid="uid://bbce5wfwxpns1" path="res://systems/inputs/base_mode/slide_pressed.tres" id="23_rvpjj"]
[ext_resource type="Resource" uid="uid://b334rau1yxmm7" path="res://systems/inputs/base_mode/slide.tres" id="25_s8kjn"]
[ext_resource type="Resource" uid="uid://55b0dsvioj08" path="res://systems/inputs/base_mode/jump_pressed.tres" id="25_si4d4"] [ext_resource type="Resource" uid="uid://55b0dsvioj08" path="res://systems/inputs/base_mode/jump_pressed.tres" id="25_si4d4"]
[ext_resource type="Resource" uid="uid://dgluj0ql5vth7" path="res://systems/inputs/base_mode/pause.tres" id="29_q86qg"] [ext_resource type="Resource" uid="uid://dgluj0ql5vth7" path="res://systems/inputs/base_mode/pause.tres" id="29_q86qg"]
[ext_resource type="Script" uid="uid://cw71o87tvdx3q" path="res://addons/guide/inputs/guide_input_key.gd" id="30_cvxqo"] [ext_resource type="Script" uid="uid://cw71o87tvdx3q" path="res://addons/guide/inputs/guide_input_key.gd" id="30_cvxqo"]
@@ -229,40 +229,54 @@ action = ExtResource("16_rvpjj")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_bkx7d"), SubResource("Resource_yxj6r")]) input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_bkx7d"), SubResource("Resource_yxj6r")])
metadata/_guide_input_mappings_collapsed = false metadata/_guide_input_mappings_collapsed = false
[sub_resource type="Resource" id="Resource_fykw6"]
script = ExtResource("10_cvxqo")
axis = 5
[sub_resource type="Resource" id="Resource_rvpjj"]
script = ExtResource("15_fykw6")
[sub_resource type="Resource" id="Resource_s8kjn"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_fykw6")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_rvpjj")])
metadata/_guide_triggers_collapsed = false
[sub_resource type="Resource" id="Resource_vibkn"]
script = ExtResource("1_qmhk6")
action = ExtResource("23_rvpjj")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_s8kjn")])
[sub_resource type="Resource" id="Resource_qkgmj"] [sub_resource type="Resource" id="Resource_qkgmj"]
script = ExtResource("10_cvxqo") script = ExtResource("10_cvxqo")
axis = 5 axis = 5
[sub_resource type="Resource" id="Resource_st2ej"] [sub_resource type="Resource" id="Resource_st2ej"]
script = ExtResource("17_s8kjn") script = ExtResource("15_fykw6")
[sub_resource type="Resource" id="Resource_818lq"] [sub_resource type="Resource" id="Resource_s8kjn"]
script = ExtResource("3_yp12v") script = ExtResource("3_yp12v")
input = SubResource("Resource_qkgmj") input = SubResource("Resource_qkgmj")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_st2ej")]) triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_st2ej")])
metadata/_guide_triggers_collapsed = false
[sub_resource type="Resource" id="Resource_wcvib"]
script = ExtResource("30_cvxqo")
key = 4194326
[sub_resource type="Resource" id="Resource_imjft"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_wcvib")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_st2ej")])
metadata/_guide_triggers_collapsed = false
[sub_resource type="Resource" id="Resource_vibkn"]
script = ExtResource("1_qmhk6")
action = ExtResource("23_rvpjj")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_s8kjn"), SubResource("Resource_imjft")])
[sub_resource type="Resource" id="Resource_f3pn5"]
script = ExtResource("10_cvxqo")
axis = 5
[sub_resource type="Resource" id="Resource_818lq"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_f3pn5")
[sub_resource type="Resource" id="Resource_qksfw"]
script = ExtResource("30_cvxqo")
key = 4194326
[sub_resource type="Resource" id="Resource_woy8j"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_qksfw")
[sub_resource type="Resource" id="Resource_2hs2y"] [sub_resource type="Resource" id="Resource_2hs2y"]
script = ExtResource("1_qmhk6") script = ExtResource("1_qmhk6")
action = ExtResource("19_li5ak") action = ExtResource("25_s8kjn")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_818lq")]) input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_818lq"), SubResource("Resource_woy8j")])
[sub_resource type="Resource" id="Resource_1fkas"] [sub_resource type="Resource" id="Resource_1fkas"]
script = ExtResource("19_qkgmj") script = ExtResource("19_qkgmj")
@@ -354,16 +368,16 @@ script = ExtResource("3_yp12v")
input = SubResource("Resource_kx31q") input = SubResource("Resource_kx31q")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_oux88")]) triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_oux88")])
[sub_resource type="Resource" id="Resource_f3pn5"] [sub_resource type="Resource" id="Resource_jk2g8"]
script = ExtResource("17_kxb2c") script = ExtResource("30_cvxqo")
button = 2 key = 70
[sub_resource type="Resource" id="Resource_y7p41"] [sub_resource type="Resource" id="Resource_y7p41"]
script = ExtResource("15_fykw6") script = ExtResource("15_fykw6")
[sub_resource type="Resource" id="Resource_3uxou"] [sub_resource type="Resource" id="Resource_3uxou"]
script = ExtResource("3_yp12v") script = ExtResource("3_yp12v")
input = SubResource("Resource_f3pn5") input = SubResource("Resource_jk2g8")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_y7p41")]) triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_y7p41")])
[sub_resource type="Resource" id="Resource_3frwi"] [sub_resource type="Resource" id="Resource_3frwi"]
@@ -395,22 +409,10 @@ script = ExtResource("3_yp12v")
input = SubResource("Resource_xbeov") input = SubResource("Resource_xbeov")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_rt8uw")]) triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_rt8uw")])
[sub_resource type="Resource" id="Resource_jk2g8"]
script = ExtResource("30_cvxqo")
key = 70
[sub_resource type="Resource" id="Resource_wcvib"]
script = ExtResource("15_fykw6")
[sub_resource type="Resource" id="Resource_imjft"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_jk2g8")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_wcvib")])
[sub_resource type="Resource" id="Resource_0qat1"] [sub_resource type="Resource" id="Resource_0qat1"]
script = ExtResource("1_qmhk6") script = ExtResource("1_qmhk6")
action = ExtResource("23_g6bbx") action = ExtResource("23_g6bbx")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_1rw8g"), SubResource("Resource_hj46p"), SubResource("Resource_imjft")]) input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_1rw8g"), SubResource("Resource_hj46p")])
metadata/_guide_input_mappings_collapsed = false metadata/_guide_input_mappings_collapsed = false
[sub_resource type="Resource" id="Resource_o5yys"] [sub_resource type="Resource" id="Resource_o5yys"]
@@ -425,17 +427,9 @@ script = ExtResource("3_yp12v")
input = SubResource("Resource_o5yys") input = SubResource("Resource_o5yys")
triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_kxb2c")]) triggers = Array[ExtResource("8_2tfaw")]([SubResource("Resource_kxb2c")])
[sub_resource type="Resource" id="Resource_qksfw"]
script = ExtResource("30_cvxqo")
key = 69
[sub_resource type="Resource" id="Resource_woy8j"]
script = ExtResource("3_yp12v")
input = SubResource("Resource_qksfw")
[sub_resource type="Resource" id="Resource_qpgnj"] [sub_resource type="Resource" id="Resource_qpgnj"]
script = ExtResource("30_cvxqo") script = ExtResource("30_cvxqo")
key = 4194326 key = 69
[sub_resource type="Resource" id="Resource_s6d3g"] [sub_resource type="Resource" id="Resource_s6d3g"]
script = ExtResource("3_yp12v") script = ExtResource("3_yp12v")
@@ -444,7 +438,7 @@ input = SubResource("Resource_qpgnj")
[sub_resource type="Resource" id="Resource_vtk18"] [sub_resource type="Resource" id="Resource_vtk18"]
script = ExtResource("1_qmhk6") script = ExtResource("1_qmhk6")
action = ExtResource("32_s8kjn") action = ExtResource("32_s8kjn")
input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_v2ywt"), SubResource("Resource_woy8j"), SubResource("Resource_s6d3g")]) input_mappings = Array[ExtResource("3_yp12v")]([SubResource("Resource_v2ywt"), SubResource("Resource_s6d3g")])
[sub_resource type="Resource" id="Resource_s4bc4"] [sub_resource type="Resource" id="Resource_s4bc4"]
script = ExtResource("30_cvxqo") script = ExtResource("30_cvxqo")

View File

@@ -1,14 +0,0 @@
[gd_resource type="Resource" script_class="GUIDEAction" load_steps=2 format=3 uid="uid://bw5k2gsv3jqcv"]
[ext_resource type="Script" uid="uid://cluhc11vixkf1" path="res://addons/guide/guide_action.gd" id="1_7f0q6"]
[resource]
script = ExtResource("1_7f0q6")
name = &""
action_value_type = 0
block_lower_priority_actions = true
emit_as_godot_actions = false
is_remappable = false
display_name = ""
display_category = ""
metadata/_custom_type_script = "uid://cluhc11vixkf1"

View File

@@ -10,7 +10,7 @@ class_name InputController
@export var move_right:GUIDEAction @export var move_right:GUIDEAction
@export var move_front:GUIDEAction @export var move_front:GUIDEAction
@export var move_back:GUIDEAction @export var move_back:GUIDEAction
@export var rotate_y:GUIDEAction @export var rotate_vertical:GUIDEAction
@export var rotate_floorplane:GUIDEAction @export var rotate_floorplane:GUIDEAction
@export_group("Trigger actions") @export_group("Trigger actions")
@@ -21,13 +21,14 @@ class_name InputController
@export_subgroup("Jump") @export_subgroup("Jump")
@export var jump:GUIDEAction @export var jump:GUIDEAction
@export var jump_pressed:GUIDEAction @export var jump_pressed:GUIDEAction
@export_subgroup("Slide")
@export var slide:GUIDEAction
@export var slide_pressed:GUIDEAction
@export_subgroup("Other") @export_subgroup("Other")
@export var empower_down:GUIDEAction
@export var empower_released:GUIDEAction
@export var aim_canceled:GUIDEAction
@export var hit:GUIDEAction @export var hit:GUIDEAction
@export var parry:GUIDEAction
@export var dash:GUIDEAction @export var dash:GUIDEAction
@export var throw:GUIDEAction @export var slam:GUIDEAction
signal input_device_changed(is_gamepad: bool) signal input_device_changed(is_gamepad: bool)
var _using_gamepad = false var _using_gamepad = false
@@ -46,13 +47,14 @@ signal input_aim_pressed
signal input_aim_down signal input_aim_down
signal input_aim_released signal input_aim_released
signal input_empower_down signal input_slide_started
signal input_empower_released signal input_slide_ongoing
signal input_aim_canceled signal input_slide_ended
signal input_hit signal input_hit
signal input_parry
signal input_dash signal input_dash
signal input_throw signal input_slam
func _ready() -> void: func _ready() -> void:
GUIDE.enable_mapping_context(base_mode) GUIDE.enable_mapping_context(base_mode)
@@ -60,53 +62,50 @@ func _ready() -> void:
aim_down.triggered.connect(on_input_aim_down) aim_down.triggered.connect(on_input_aim_down)
aim_pressed.triggered.connect(on_input_aim_pressed) aim_pressed.triggered.connect(on_input_aim_pressed)
aim_released.triggered.connect(on_input_aim_released) aim_released.triggered.connect(on_input_aim_released)
empower_down.triggered.connect(on_input_empower_down)
empower_released.triggered.connect(on_input_empower_released)
aim_canceled.triggered.connect(on_input_aim_canceled)
jump_pressed.triggered.connect(on_input_jump_started) jump_pressed.triggered.connect(on_input_jump_started)
jump.triggered.connect(on_input_jump_ongoing) jump.triggered.connect(on_input_jump_ongoing)
jump.completed.connect(on_input_jump_ended) jump.completed.connect(on_input_jump_ended)
slide_pressed.triggered.connect(on_input_slide_started)
slide.triggered.connect(on_input_slide_ongoing)
slide.completed.connect(on_input_slide_ended)
hit.triggered.connect(on_input_hit) hit.triggered.connect(on_input_hit)
parry.triggered.connect(on_input_parry)
dash.triggered.connect(on_input_dash) dash.triggered.connect(on_input_dash)
throw.triggered.connect(on_input_throw) slam.triggered.connect(on_input_slam)
func on_input_dash():
input_dash.emit()
func on_input_throw():
input_throw.emit()
func on_input_hit(): func on_input_hit():
input_hit.emit() input_hit.emit()
func on_input_parry():
input_parry.emit()
func on_input_dash():
input_dash.emit()
func on_input_slam():
input_slam.emit()
func on_input_jump_started(): func on_input_jump_started():
input_jump_started.emit() input_jump_started.emit()
func on_input_jump_ongoing(): func on_input_jump_ongoing():
input_jump_ongoing.emit() input_jump_ongoing.emit()
func on_input_jump_ended(): func on_input_jump_ended():
input_jump_ended.emit() input_jump_ended.emit()
func on_input_aim_down(): func on_input_aim_down():
input_aim_down.emit() input_aim_down.emit()
func on_input_aim_pressed(): func on_input_aim_pressed():
input_aim_pressed.emit() input_aim_pressed.emit()
func on_input_aim_released(): func on_input_aim_released():
input_aim_released.emit() input_aim_released.emit()
func on_input_empower_down(): func on_input_slide_started():
input_empower_down.emit() input_slide_started.emit()
func on_input_slide_ongoing():
func on_input_empower_released(): input_slide_ongoing.emit()
input_empower_released.emit() func on_input_slide_ended():
input_slide_ended.emit()
func on_input_aim_canceled():
input_aim_canceled.emit()
func _input(event: InputEvent) -> void: func _input(event: InputEvent) -> void:
if event is InputEventKey: if event is InputEventKey:
@@ -130,5 +129,5 @@ func _process(_delta: float) -> void:
input_move_keyboard.emit(keyboard_input_vector) input_move_keyboard.emit(keyboard_input_vector)
input_move.emit(move.value_axis_3d) input_move.emit(move.value_axis_3d)
input_rotate_y.emit(rotate_y.value_axis_1d) input_rotate_y.emit(rotate_vertical.value_axis_1d)
input_rotate_floorplane.emit(rotate_floorplane.value_axis_1d) input_rotate_floorplane.emit(rotate_floorplane.value_axis_1d)