Inheritance: UnityEngine.MonoBehaviour
コード例 #1
0
ファイル: ActionRunner.cs プロジェクト: Hsantos/roll-ftw
        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);
        }
コード例 #2
0
ファイル: Action.cs プロジェクト: Hsantos/roll-ftw
 public static void Run(Transform targetTransform, Action anAction)
 {
     ActionRunner.Setup(targetTransform, anAction);
 }