public static void Setup(Transform inTarget, Action anAction) { ActionRunner runner = inTarget.GetComponent <ActionRunner>(); if (runner == null) { runner = inTarget.gameObject.AddComponent <ActionRunner>(); runner.actionsToRun = new List <Action>(); } runner.actionsToRun.Add(anAction); }
public static void Run(Transform targetTransform, Action anAction) { ActionRunner.Setup(targetTransform, anAction); }