Comment some no longer needed code.

This commit is contained in:
Dustin 2025-03-15 16:05:51 -07:00
parent 5378033645
commit d1db41c89a
3 changed files with 40 additions and 37 deletions

View File

@ -42,21 +42,22 @@ func _ready() -> void:
sound_effects_dict[i.animation_name + str(i.frame_number)] = i.sound sound_effects_dict[i.animation_name + str(i.frame_number)] = i.sound
print (sound_effects_dict) print (sound_effects_dict)
func _unhandled_input(event: InputEvent) -> void: # Disable to test whether actually needed.
if actor_type == "Player": #func _unhandled_input(event: InputEvent) -> void:
movement_component.process_input(event) # if actor_type == "Player":
movement_state_machine.process_input(event) # movement_component.process_input(event)
# movement_state_machine.process_input(event)
func _physics_process(delta: float) -> void: #
movement_component.process_physics(delta) #func _physics_process(delta: float) -> void:
movement_state_machine.process_physics(delta) # movement_component.process_physics(delta)
# movement_state_machine.process_physics(delta)
func _process(delta: float) -> void: #
if actor_type == "NPC" or actor_type == "Enemy": #func _process(delta: float) -> void:
movement_component.process(delta) # if actor_type == "NPC" or actor_type == "Enemy":
movement_state_machine.process_frame(delta) # movement_component.process(delta)
# PlayerInfo.player_position = global_position # movement_state_machine.process_frame(delta)
#play_sound_frame(movement_animations.animation , movement_animations.frame) ## PlayerInfo.player_position = global_position
# #play_sound_frame(movement_animations.animation , movement_animations.frame)
var last_sound_frame_animation: String = '' var last_sound_frame_animation: String = ''

View File

@ -54,11 +54,12 @@ func enter() -> void:
func exit() -> void: func exit() -> void:
pass pass
func process_input(_event: InputEvent) -> String: # Disable to test whether actually needed.
return '' #func process_input(_event: InputEvent) -> String:
# return ''
func process_frame(_delta: float) -> String: #
return '' #func process_frame(_delta: float) -> String:
# return ''
func process_physics(_delta: float) -> String: #
return '' #func process_physics(_delta: float) -> String:
# return ''

View File

@ -75,17 +75,18 @@ func change_to_known_state(new_state_name: String) -> void:
push_warning(get_parent().name + ": Attempt to switch state to unknown: " + new_state_name) push_warning(get_parent().name + ": Attempt to switch state to unknown: " + new_state_name)
change_state(states_index["default"]) change_state(states_index["default"])
# Pass through functions for the Player to call, # Disable to test whether actually needed.
# handling state changes as needed. ## Pass through functions for the Player to call,
func process_physics(delta: float) -> void: ## handling state changes as needed.
change_to_known_state( current_state.process_physics(delta) ) #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) #func process_input(event: InputEvent) -> void:
if new_state: # var new_state = current_state.process_input(event)
change_state(new_state) # if new_state:
# change_state(new_state)
func process_frame(delta: float) -> void: #
var new_state = current_state.process_frame(delta) #func process_frame(delta: float) -> void:
if new_state: # var new_state = current_state.process_frame(delta)
change_state(new_state) # if new_state:
# change_state(new_state)