Compare commits

...

3 Commits

6 changed files with 9 additions and 3 deletions

View File

@ -9,4 +9,5 @@ func _ready() -> void:
#$L1_S5.switch_act_by_id(1)
#$L1_S6.switch_act_by_id(1)
$L1_S7.switch_act_by_id(1)
get_tree().call_group(&"PLAYER_RESPAWN",&"respawn_avatar")

View File

@ -36,9 +36,10 @@ func _init_trans() -> void:
self.add_transition(dash_state,airbone_state,&"exit_on_air")
##用於處理貼在墻面的State流轉
self.add_transition(ANYSTATE,on_wall_state,&"want_to_on_wall")
self.add_transition(ANYSTATE,on_wall_state,&"want_to_on_wall",_can_on_wall)
self.add_transition(on_wall_state,airbone_state,&"exit_on_ground")
self.add_transition(on_wall_state,ground_state,&"exit_on_air")
#self.add_transition(on_wall_state,grap_hook_state,)
##用於處理鈎爪的State流轉
self.add_transition(ANYSTATE,grap_hook_state,&"want_to_grap_hook",_has_move_input)
@ -94,3 +95,6 @@ func _get_dash_exit_enter_state()->LimboState:
func _has_move_input() -> bool:
return agent.get_move_input() != Vector2.ZERO
func _can_on_wall() -> bool:
return not grap_hook_state.is_active()

View File

@ -15,6 +15,7 @@ func _exit() -> void:
agent.locomotion_comp.suspend_climb()
get_root().blackboard.set_var(&"lock_direction_changed",false)
print("离开攀爬")
func _update(delta: float) -> void:
var climb_dir = Input.get_axis("move_up","move_down") as float

File diff suppressed because one or more lines are too long

View File

@ -250,7 +250,7 @@ curve = SubResource("Curve2D_2q2em")
[node name="PathDriveMovePlateform3" parent="." node_paths=PackedStringArray("path2d", "plateform", "player_trigger") instance=ExtResource("24_mxp7a")]
position = Vector2(-520, -1336)
path2d = NodePath("")
path2d = NodePath("Path2D")
plateform = NodePath("MovablePlateform")
player_trigger = NodePath("MovablePlateform/PlayerTriggerVolumn")
move_speed = 300.0