Cleanup anim state receiver script
This commit is contained in:
parent
f54f49704b
commit
41eac6ea9b
|
|
@ -49,8 +49,6 @@ func _process(delta):
|
|||
# Not sure what should be called first here.
|
||||
if has_method('_state_process_' + current_state.name):
|
||||
call('_state_process_' + current_state.name)
|
||||
#TODO: Not sure I want to do modifiers this way anymore
|
||||
#process_state_modifier()
|
||||
|
||||
func _on_animation_finished():
|
||||
if frames.get_animation_loop(animation) == false:
|
||||
|
|
@ -218,16 +216,6 @@ func change_animation(enter_frame := 0, index := 0, suffix := ''):
|
|||
# else:
|
||||
# frame_signal_emitted = false
|
||||
|
||||
#func set_previous_animation( old_state: StateAnimatedActor, new_state: StateAnimatedActor ) -> void:
|
||||
# # added this to help prevent nul index crashes. (Usually because of signal based state changes.)
|
||||
# if old_state.mod_animation_sequence:
|
||||
# new_state.previous_animation_name = old_state.mod_animation_sequence[old_state.current_animation_sequence]
|
||||
# new_state.previous_state_frame_number = old_state.animations.frame
|
||||
# new_state.previous_state_name = old_state.name
|
||||
# new_state.previous_speed_multiplier = old_state.speed_multiplier
|
||||
# #animation_name :String, frame_number : int, animation_sequence :Array
|
||||
# return
|
||||
|
||||
# Handle state change from subscribed state machine.
|
||||
#From signal state_changed(old_state_name, new_state)
|
||||
func _on_state_change(old_state_name:String, new_state :State):
|
||||
|
|
@ -245,7 +233,6 @@ func _on_state_change(old_state_name:String, new_state :State):
|
|||
#print("It's an animated Actor state!")
|
||||
else:
|
||||
push_warning("Received non animated Actor state.")
|
||||
#current_state = new_state
|
||||
|
||||
func _on_modifiers_updated(_modifier_type :int, _modifier_action :int):
|
||||
##TODO: There's so many things I could maybe do here but lets target the
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user