예제 #1
0
        public CCSpawn(params CCFiniteTimeAction[] actions)
        {
            CCFiniteTimeAction prev = actions [0];
            CCFiniteTimeAction next = null;

            if (actions.Length == 1)
            {
                next = new CCExtraAction();
            }
            else
            {
                // We create a nested set of CCSpawnActions out of all of the actions
                for (int i = 1; i < actions.Length - 1; i++)
                {
                    prev = new CCSpawn(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);
                InitCCSpawn(prev, next);
            }
        }
예제 #2
0
파일: CCSpawn.cs 프로젝트: h7ing/CocosSharp
        public CCSpawn (params CCFiniteTimeAction[] actions)
        {
            CCFiniteTimeAction prev = actions [0];
            CCFiniteTimeAction next = null;

            if (actions.Length == 1)
            {
                next = new CCExtraAction ();
            }
            else
            {
                // We create a nested set of CCSpawnActions out of all of the actions
                for (int i = 1; i < actions.Length - 1; i++)
                {
                    prev = new CCSpawn (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);
                InitCCSpawn (prev, next);
            }
        }
예제 #3
0
 public CCExtraActionState(CCExtraAction action, CCNode target)
     : base(action, target)
 {
 }
예제 #4
0
 public CCExtraActionState (CCExtraAction action, CCNode target)
     : base (action, target)
 {
 }