Beispiel #1
0
        /** Returns the singleton of the control scene manager. */

        public static Scale9SpriteSceneManager sharedSprite9SceneManager()
        {
            if (sharedInstance == null)
            {
                sharedInstance = new Scale9SpriteSceneManager();
            }
            return(sharedInstance);
        }
        /** Returns the singleton of the control scene manager. */

        public static Scale9SpriteSceneManager sharedSprite9SceneManager()
        {
            if (sharedInstance == null)
            {
                sharedInstance = new Scale9SpriteSceneManager();
            }
            return sharedInstance;
        }
        public void menuCallback(object pSender)
        {
            var pItem  = (CCMenuItemFont)pSender;
            var nIndex = pItem.ZOrder - ExtensionsTestScene.kItemTagBasic;

            switch (nIndex)
            {
            //case TEST_NOTIFICATIONCENTER:
            //    runNotificationCenterTest();
            //    break;
            case ExtensionsTestScene.TEST_CCCONTROLBUTTON:
                var pManager = CCControlSceneManager.sharedControlSceneManager();
                Scene.Director.ReplaceScene(pManager.currentControlScene());
                break;

            case ExtensionsTestScene.TEST_COCOSBUILDER:
                var pScene = new CocosBuilderTest();
                if (pScene != null)
                {
                    pScene.runThisTest();
                }
                break;

            //case TEST_HTTPCLIENT:
            //    runHttpClientTest();
            //    break;
            //#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
            //case TEST_EDITBOX:
            //    runEditBoxTest();
            //    break;
            //#endif
            case ExtensionsTestScene.TEST_TABLEVIEW:
                TableViewTestLayer.runTableViewTest();
                break;

            case ExtensionsTestScene.TEST_Scale9Sprite:
                var Manager = Scale9SpriteSceneManager.sharedSprite9SceneManager();
                Scene.Director.ReplaceScene(Manager.currentControlScene());
                break;

            default:
                break;
            }
        }
 public override void nextCallback(object sender)
 {
     CCDirector.SharedDirector.ReplaceScene(
         Scale9SpriteSceneManager.sharedSprite9SceneManager().nextControlScene());
 }
Beispiel #5
0
 public override void restartCallback(object sender)
 {
     Scene.Director.ReplaceScene(
         Scale9SpriteSceneManager.sharedSprite9SceneManager().currentControlScene());
 }
Beispiel #6
0
 public override void previousCallback(object sender)
 {
     Scene.Director.ReplaceScene(
         Scale9SpriteSceneManager.sharedSprite9SceneManager().previousControlScene());
 }