冲突解决L1S7
This commit is contained in:
commit
51b3734ae2
|
|
@ -9,4 +9,5 @@ func _ready() -> void:
|
||||||
#$L1_S5.switch_act_by_id(1)
|
#$L1_S5.switch_act_by_id(1)
|
||||||
#$L1_S6.switch_act_by_id(1)
|
#$L1_S6.switch_act_by_id(1)
|
||||||
$L1_S7.switch_act_by_id(1)
|
$L1_S7.switch_act_by_id(1)
|
||||||
|
|
||||||
get_tree().call_group(&"PLAYER_RESPAWN",&"respawn_avatar")
|
get_tree().call_group(&"PLAYER_RESPAWN",&"respawn_avatar")
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,10 @@ func _init_trans() -> void:
|
||||||
self.add_transition(dash_state,airbone_state,&"exit_on_air")
|
self.add_transition(dash_state,airbone_state,&"exit_on_air")
|
||||||
|
|
||||||
##用於處理貼在墻面的State流轉
|
##用於處理貼在墻面的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,airbone_state,&"exit_on_ground")
|
||||||
self.add_transition(on_wall_state,ground_state,&"exit_on_air")
|
self.add_transition(on_wall_state,ground_state,&"exit_on_air")
|
||||||
|
#self.add_transition(on_wall_state,grap_hook_state,)
|
||||||
|
|
||||||
##用於處理鈎爪的State流轉
|
##用於處理鈎爪的State流轉
|
||||||
self.add_transition(ANYSTATE,grap_hook_state,&"want_to_grap_hook",_has_move_input)
|
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:
|
func _has_move_input() -> bool:
|
||||||
return agent.get_move_input() != Vector2.ZERO
|
return agent.get_move_input() != Vector2.ZERO
|
||||||
|
|
||||||
|
func _can_on_wall() -> bool:
|
||||||
|
return not grap_hook_state.is_active()
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ func _exit() -> void:
|
||||||
agent.locomotion_comp.suspend_climb()
|
agent.locomotion_comp.suspend_climb()
|
||||||
|
|
||||||
get_root().blackboard.set_var(&"lock_direction_changed",false)
|
get_root().blackboard.set_var(&"lock_direction_changed",false)
|
||||||
|
print("离开攀爬")
|
||||||
|
|
||||||
func _update(delta: float) -> void:
|
func _update(delta: float) -> void:
|
||||||
var climb_dir = Input.get_axis("move_up","move_down") as float
|
var climb_dir = Input.get_axis("move_up","move_down") as float
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -250,6 +250,9 @@ curve = SubResource("Curve2D_2q2em")
|
||||||
|
|
||||||
[node name="PathDriveMovePlateform3" parent="." node_paths=PackedStringArray("plateform", "player_trigger") instance=ExtResource("24_mxp7a")]
|
[node name="PathDriveMovePlateform3" parent="." node_paths=PackedStringArray("plateform", "player_trigger") instance=ExtResource("24_mxp7a")]
|
||||||
position = Vector2(-520, -1336)
|
position = Vector2(-520, -1336)
|
||||||
|
|
||||||
|
path2d = NodePath("Path2D")
|
||||||
|
|
||||||
plateform = NodePath("MovablePlateform")
|
plateform = NodePath("MovablePlateform")
|
||||||
player_trigger = NodePath("MovablePlateform/PlayerTriggerVolumn")
|
player_trigger = NodePath("MovablePlateform/PlayerTriggerVolumn")
|
||||||
move_speed = 300.0
|
move_speed = 300.0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue