Пример #1
0
        public MainLayer()
        {
            base.isTouchEnabled = true;

            CCSprite sprite = CCSprite.spriteWithFile(ClickAndMoveTest.s_pPathGrossini);

            CCLayer layer = CCLayerColor.layerWithColor(new ccColor4B(255, 255, 0, 255));

            addChild(layer, -1);

            addChild(sprite, 0, ClickAndMoveTest.kTagSprite);
            sprite.position = new CCPoint(20, 150);

            sprite.runAction(CCJumpTo.actionWithDuration(4, new CCPoint(300, 48), 100, 4));

            layer.runAction(CCRepeatForever.actionWithAction(
                                (CCActionInterval)(CCSequence.actions(
                                                       CCFadeIn.actionWithDuration(1),
                                                       CCFadeOut.actionWithDuration(1)))
                                ));
        }