FPS Controller
This commit is contained in:
12
demo/assets/scripts/player/states/standing_state.gd
Normal file
12
demo/assets/scripts/player/states/standing_state.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
extends PlayerState
|
||||
|
||||
|
||||
func _on_standing_state_physics_processing(delta: float) -> void:
|
||||
player_controller.camera.update_camera_height(delta, 1)
|
||||
|
||||
if Input.is_action_pressed("crouch") and player_controller.is_on_floor():
|
||||
player_controller.state_chart.send_event("onCrouching")
|
||||
|
||||
|
||||
func _on_standing_state_entered() -> void:
|
||||
player_controller.stand()
|
||||
Reference in New Issue
Block a user