コード例 #1
0
        public MTSpawn(params MTFiniteTimeAction[] actions)
        {
            MTFiniteTimeAction prev = actions [0];
            MTFiniteTimeAction next = null;

            if (actions.Length == 1)
            {
                next = new MTExtraAction();
            }
            else
            {
                // We create a nested set of MTSpawnActions out of all of the actions
                for (int i = 1; i < actions.Length - 1; i++)
                {
                    prev = new MTSpawn(prev, actions [i]);
                }

                next = actions [actions.Length - 1];
            }

            // Can't call base(duration) because we need to determine max duration
            // Instead call base's init method here
            if (prev != null && next != null)
            {
                Duration = Math.Max(prev.Duration, next.Duration);
                InitMTSpawn(prev, next);
            }
        }
コード例 #2
0
ファイル: MTSpawn.cs プロジェクト: jyzgo/MTActionLib
        public MTSpawn(params MTFiniteTimeAction[] actions)
        {
            MTFiniteTimeAction prev = actions [0];
            MTFiniteTimeAction next = null;

            if (actions.Length == 1)
            {
                next = new MTExtraAction ();
            }
            else
            {
                // We create a nested set of MTSpawnActions out of all of the actions
                for (int i = 1; i < actions.Length - 1; i++)
                {
                    prev = new MTSpawn (prev, actions [i]);
                }

                next = actions [actions.Length - 1];
            }

            // Can't call base(duration) because we need to determine max duration
            // Instead call base's init method here
            if (prev != null && next != null)
            {
                Duration = Math.Max (prev.Duration, next.Duration);
                InitMTSpawn (prev, next);
            }
        }
コード例 #3
0
ファイル: MTExtraAction.cs プロジェクト: jyzgo/MTActionLib
 public MTExtraActionState(MTExtraAction action, GameObject target)
     : base(action, target)
 {
 }
コード例 #4
0
 public MTExtraActionState(MTExtraAction action, GameObject target)
     : base(action, target)
 {
 }