Exemplo n.º 1
0
 public CCSpeedState (CCSpeed action, CCNode target) : base (action, target)
 {
     InnerActionState = (CCFiniteTimeActionState)action.InnerAction.StartAction (target);
     Speed = action.Speed;
 }
Exemplo n.º 2
0
        public override void OnEnter()
        {
            base.OnEnter();

            var s = Layer.VisibleBoundsWorldspace.Size;

            // rotate and jump
            var jump1 = new CCJumpBy (4, new CCPoint(-s.Width + 80, 0), 100, 4);
            var jump2 = jump1.Reverse();
            var rot1 = new CCRotateBy (4, 360 * 2);
            var rot2 = rot1.Reverse();

            var seq3_1 = new CCSequence(jump2, jump1);
            var seq3_2 = new CCSequence(rot1, rot2);
            var spawn = new CCSpawn(seq3_1, seq3_2);

            speedAction1 = new CCSpeed(new CCRepeatForever (spawn), 1.0f);
            speedAction2 = new CCSpeed(new CCRepeatForever (spawn), 2.0f);
            speedAction3 = new CCSpeed(new CCRepeatForever (spawn), 0.5f);

            m_grossini.RunAction(speedAction1);
			m_tamara.RunAction(speedAction2);
			m_kathia.RunAction(speedAction3);
        }