Esempio n. 1
0
        public void restartCallback(CCObject pSender)
        {
            CCScene s = new TransitionsTestScene();
            CCLayer pLayer = new TestLayer2();
            s.addChild(pLayer);

            CCScene pScene = TransitionsTestScene.createTransition(TransitionsTestScene.s_nSceneIdx, TransitionsTestScene.TRANSITION_DURATION, s);
            if (pScene != null)
            {
                CCDirector.sharedDirector().replaceScene(pScene);
            }
        }
Esempio n. 2
0
        public void restartCallback(CCObject pSender)
        {
            CCScene s = new TransitionsTestScene();

            CCLayer pLayer = new TestLayer1();
            s.addChild(pLayer);

            CCScene pScene = TransitionsTestScene.createTransition(TransitionsTestScene.s_nSceneIdx, TransitionsTestScene.TRANSITION_DURATION, s);

            if (pScene != null)
            {
                CCDirector.sharedDirector().replaceScene(pScene);
            }
        }
Esempio n. 3
0
        public void backCallback(CCObject pSender)
        {
            TransitionsTestScene.s_nSceneIdx--;
            int total = TransitionsTestScene.MAX_LAYER;
            if (TransitionsTestScene.s_nSceneIdx < 0)
                TransitionsTestScene.s_nSceneIdx += total;

            CCScene s = new TransitionsTestScene();

            CCLayer pLayer = new TestLayer1();
            s.addChild(pLayer);

            CCScene pScene = TransitionsTestScene.createTransition(TransitionsTestScene.s_nSceneIdx, TransitionsTestScene.TRANSITION_DURATION, s);
            
            if (pScene != null)
            {
                CCDirector.sharedDirector().replaceScene(pScene);
            }
        }
Esempio n. 4
0
        public void nextCallback(CCObject pSender)
        {
            s_nSceneIdx++;
            s_nSceneIdx = s_nSceneIdx % MAX_LAYER;

            CCScene s = new TransitionsTestScene();

            CCLayer pLayer = new TestLayer1();
            s.addChild(pLayer);
            CCScene pScene = TransitionsTestScene.createTransition(s_nSceneIdx, TRANSITION_DURATION, s);

            if (pScene != null)
            {
                CCDirector.sharedDirector().replaceScene(pScene);
            }
        }