19 lines
224 B
GDScript3
19 lines
224 B
GDScript3
|
class_name TriggerBase
|
||
|
extends Node
|
||
|
|
||
|
|
||
|
func triggerNodePath( nodePath:NodePath ):
|
||
|
|
||
|
var a:Action = get_node( nodePath );
|
||
|
|
||
|
triggerAction( a )
|
||
|
|
||
|
|
||
|
|
||
|
func triggerAction( a:Action ):
|
||
|
|
||
|
if a == null:
|
||
|
return
|
||
|
|
||
|
a.onTrigger()
|