Comment some no longer needed code.
This commit is contained in:
parent
5378033645
commit
d1db41c89a
|
|
@ -42,21 +42,22 @@ func _ready() -> void:
|
|||
sound_effects_dict[i.animation_name + str(i.frame_number)] = i.sound
|
||||
print (sound_effects_dict)
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if actor_type == "Player":
|
||||
movement_component.process_input(event)
|
||||
movement_state_machine.process_input(event)
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
movement_component.process_physics(delta)
|
||||
movement_state_machine.process_physics(delta)
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if actor_type == "NPC" or actor_type == "Enemy":
|
||||
movement_component.process(delta)
|
||||
movement_state_machine.process_frame(delta)
|
||||
# PlayerInfo.player_position = global_position
|
||||
#play_sound_frame(movement_animations.animation , movement_animations.frame)
|
||||
# Disable to test whether actually needed.
|
||||
#func _unhandled_input(event: InputEvent) -> void:
|
||||
# if actor_type == "Player":
|
||||
# movement_component.process_input(event)
|
||||
# movement_state_machine.process_input(event)
|
||||
#
|
||||
#func _physics_process(delta: float) -> void:
|
||||
# movement_component.process_physics(delta)
|
||||
# movement_state_machine.process_physics(delta)
|
||||
#
|
||||
#func _process(delta: float) -> void:
|
||||
# if actor_type == "NPC" or actor_type == "Enemy":
|
||||
# movement_component.process(delta)
|
||||
# movement_state_machine.process_frame(delta)
|
||||
## PlayerInfo.player_position = global_position
|
||||
# #play_sound_frame(movement_animations.animation , movement_animations.frame)
|
||||
|
||||
|
||||
var last_sound_frame_animation: String = ''
|
||||
|
|
|
|||
|
|
@ -54,11 +54,12 @@ func enter() -> void:
|
|||
func exit() -> void:
|
||||
pass
|
||||
|
||||
func process_input(_event: InputEvent) -> String:
|
||||
return ''
|
||||
|
||||
func process_frame(_delta: float) -> String:
|
||||
return ''
|
||||
|
||||
func process_physics(_delta: float) -> String:
|
||||
return ''
|
||||
# Disable to test whether actually needed.
|
||||
#func process_input(_event: InputEvent) -> String:
|
||||
# return ''
|
||||
#
|
||||
#func process_frame(_delta: float) -> String:
|
||||
# return ''
|
||||
#
|
||||
#func process_physics(_delta: float) -> String:
|
||||
# return ''
|
||||
|
|
|
|||
|
|
@ -74,18 +74,19 @@ func change_to_known_state(new_state_name: String) -> void:
|
|||
else:
|
||||
push_warning(get_parent().name + ": Attempt to switch state to unknown: " + new_state_name)
|
||||
change_state(states_index["default"])
|
||||
|
||||
# Pass through functions for the Player to call,
|
||||
# handling state changes as needed.
|
||||
func process_physics(delta: float) -> void:
|
||||
change_to_known_state( current_state.process_physics(delta) )
|
||||
|
||||
func process_input(event: InputEvent) -> void:
|
||||
var new_state = current_state.process_input(event)
|
||||
if new_state:
|
||||
change_state(new_state)
|
||||
|
||||
func process_frame(delta: float) -> void:
|
||||
var new_state = current_state.process_frame(delta)
|
||||
if new_state:
|
||||
change_state(new_state)
|
||||
# Disable to test whether actually needed.
|
||||
## Pass through functions for the Player to call,
|
||||
## handling state changes as needed.
|
||||
#func process_physics(delta: float) -> void:
|
||||
# change_to_known_state( current_state.process_physics(delta) )
|
||||
#
|
||||
#func process_input(event: InputEvent) -> void:
|
||||
# var new_state = current_state.process_input(event)
|
||||
# if new_state:
|
||||
# change_state(new_state)
|
||||
#
|
||||
#func process_frame(delta: float) -> void:
|
||||
# var new_state = current_state.process_frame(delta)
|
||||
# if new_state:
|
||||
# change_state(new_state)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user