Files
EGJ25/addons/guide/triggers/guide_trigger_chorded_action.gd
minimata 9a79715e47
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 6s
Create tag and build when new code gets to main / Export (push) Successful in 3m16s
feat: made sure the aspect ration fit a pixel art game and added useful addons
2025-06-27 15:19:12 +02:00

29 lines
968 B
GDScript

## Fires, when the given action is currently triggering. This trigger is implicit,
## so it will prevent the action from triggering even if other triggers are successful.
@tool
class_name GUIDETriggerChordedAction
extends GUIDETrigger
@export var action:GUIDEAction
func _get_trigger_type() -> GUIDETriggerType:
return GUIDETriggerType.IMPLICIT
func _update_state(input:Vector3, delta:float, value_type:GUIDEAction.GUIDEActionValueType) -> GUIDETriggerState:
if action == null:
push_warning("Chorded trigger without action will never trigger.")
return GUIDETriggerState.NONE
if action.is_triggered():
return GUIDETriggerState.TRIGGERED
return GUIDETriggerState.NONE
func _editor_name() -> String:
return "Chorded Action"
func _editor_description() -> String:
return "Fires, when the given action is currently triggering. This trigger is implicit,\n" + \
"so it will prevent the action from triggering even if other triggers are successful."