public void menuCallback(CCObject pSender)
        {
            CCMenuItemFont pItem = (CCMenuItemFont)pSender;
            int nIndex = pItem.zOrder - BugsTestScene.kItemTagBasic;

            CCScene pScene = CCScene.node();
            CCLayer pLayer = null;

            switch (nIndex)
            {
                case 0:
                    pLayer = new Bug350Layer();
                    pLayer.init();
                    break;
                case 1:
                    pLayer = new Bug422Layer();
                    pLayer.init();
                    break;
                case 2:
                    pLayer = new Bug458Layer();
                    pLayer.init();
                    break;
                case 3:
                    pLayer = new Bug624Layer();
                    pLayer.init();
                    break;
                case 4:
                    pLayer = new Bug886Layer();
                    pLayer.init();
                    break;
                case 5:
                    pLayer = new Bug899Layer();
                    pLayer.init();
                    break;
                case 6:
                    pLayer = new Bug914Layer();
                    pLayer.init();
                    break;
                case 7:
                    pLayer = new Bug1159Layer();
                    pLayer.init();
                    break;
                case 8:
                    pLayer = new Bug1174Layer();
                    pLayer.init();
                    break;
                case 9:
                    pLayer = new CCDefaultCodeBug();
                    pLayer.init();
                    break;
                case 10:
                    pLayer = new DispatcherTest();
                    pLayer.init();
                    break;
                default:
                    break;
            }
            pScene.addChild(pLayer);
            CCDirector.sharedDirector().replaceScene(pScene);
        }
Esempio n. 2
0
        public void switchLayer(float dt)
        {
            //unschedule(schedule_selector(Bug624Layer::switchLayer));

            CCScene scene = CCScene.node();

            scene.addChild(Bug624Layer.node(), 0);
            CCDirector.sharedDirector().replaceScene(CCTransitionFade.transitionWithDuration(2.0f, scene, new ccColor3B {
                r = 255, g = 0, b = 0
            }));
        }
Esempio n. 3
0
        public void menuCallback(object pSender)
        {
            CCMenuItemFont pItem = (CCMenuItemFont)pSender;
            int nIndex = pItem.ZOrder - BugsTestScene.kItemTagBasic;

            CCScene pScene = new CCScene();
            CCLayer pLayer = null;

            switch (nIndex)
            {
                case 0:
                    pLayer = new Bug350Layer();
                    pLayer.Init();
                    break;
                case 1:
                    pLayer = new Bug422Layer();
                    pLayer.Init();
                    break;
                case 2:
                    pLayer = new Bug458Layer();
                    pLayer.Init();
                    break;
                case 3:
                    pLayer = new Bug624Layer();
                    pLayer.Init();
                    break;
                case 4:
                    pLayer = new Bug886Layer();
                    pLayer.Init();
                    break;
                case 5:
                    pLayer = new Bug899Layer();
                    pLayer.Init();
                    break;
                case 6:
                    pLayer = new Bug914Layer();
                    pLayer.Init();
                    break;
                case 7:
                    pLayer = new Bug1159Layer();
                    pLayer.Init();
                    break;
                case 8:
                    pLayer = new Bug1174Layer();
                    pLayer.Init();
                    break;
                default:
                    break;
            }
            pScene.AddChild(pLayer);
            CCDirector.SharedDirector.ReplaceScene(pScene);
        }
        public void menuCallback(object pSender)
        {
            CCMenuItemFont pItem  = (CCMenuItemFont)pSender;
            int            nIndex = pItem.ZOrder - BugsTestScene.kItemTagBasic;

            CCScene pScene = new CCScene(Scene);
            CCLayer pLayer = null;

            switch (nIndex)
            {
            case 0:
                pLayer = new Bug350Layer();
                break;

            case 1:
                pLayer = new Bug422Layer();
                break;

            case 2:
                pLayer = new Bug458Layer();
                break;

            case 3:
                pLayer = new Bug624Layer();
                break;

            case 4:
                pLayer = new Bug886Layer();
                break;

            case 5:
                pLayer = new Bug899Layer();
                break;

            case 6:
                pLayer = new Bug914Layer();
                break;

            case 7:
                pLayer = new Bug1159Layer();
                break;

            case 8:
                pLayer = new Bug1174Layer();
                break;

            default:
                break;
            }
            pScene.AddChild(pLayer);
            Scene.Director.ReplaceScene(pScene);
        }
        public void menuCallback(CCObject pSender)
        {
            CCMenuItemFont pItem  = (CCMenuItemFont)pSender;
            int            nIndex = pItem.zOrder - BugsTestScene.kItemTagBasic;

            CCScene pScene = CCScene.node();
            CCLayer pLayer = null;

            switch (nIndex)
            {
            case 0:
                pLayer = new Bug350Layer();
                pLayer.init();
                break;

            case 1:
                pLayer = new Bug422Layer();
                pLayer.init();
                break;

            case 2:
                pLayer = new Bug458Layer();
                pLayer.init();
                break;

            case 3:
                pLayer = new Bug624Layer();
                pLayer.init();
                break;

            case 4:
                pLayer = new Bug886Layer();
                pLayer.init();
                break;

            case 5:
                pLayer = new Bug899Layer();
                pLayer.init();
                break;

            case 6:
                pLayer = new Bug914Layer();
                pLayer.init();
                break;

            case 7:
                pLayer = new Bug1159Layer();
                pLayer.init();
                break;

            case 8:
                pLayer = new Bug1174Layer();
                pLayer.init();
                break;

            case 9:
                pLayer = new CCDefaultCodeBug();
                pLayer.init();
                break;

            case 10:
                pLayer = new DispatcherTest();
                pLayer.init();
                break;

            default:
                break;
            }
            pScene.addChild(pLayer);
            CCDirector.sharedDirector().replaceScene(pScene);
        }