Esempio n. 1
0
        public static CCTransitionScene createTransition(int nIndex, float t, CCScene s)
        {
            // fix bug #486, without setDepthTest(false), FlipX,Y will flickers
            CCDirector.sharedDirector().setDepthTest(false);

            switch (nIndex)
            {
            case 0: return(CCTransitionJumpZoom.transitionWithDuration(t, s));

            case 1: return(CCTransitionFade.transitionWithDuration(t, s));

            case 2: return(FadeWhiteTransition.transitionWithDuration(t, s));

            case 3: return(FlipXLeftOver.transitionWithDuration(t, s));

            case 4: return(FlipXRightOver.transitionWithDuration(t, s));

            case 5: return(FlipYUpOver.transitionWithDuration(t, s));

            case 6: return(FlipYDownOver.transitionWithDuration(t, s));

            case 7: return(FlipAngularLeftOver.transitionWithDuration(t, s));

            case 8: return(FlipAngularRightOver.transitionWithDuration(t, s));

            case 9: return(ZoomFlipXLeftOver.transitionWithDuration(t, s));

            case 10: return(ZoomFlipXRightOver.transitionWithDuration(t, s));

            case 11: return(ZoomFlipYUpOver.transitionWithDuration(t, s));

            case 12: return(ZoomFlipYDownOver.transitionWithDuration(t, s));

            case 13: return(ZoomFlipAngularLeftOver.transitionWithDuration(t, s));

            case 14: return(ZoomFlipAngularRightOver.transitionWithDuration(t, s));

            case 15: return(CCTransitionShrinkGrow.transitionWithDuration(t, s));

            case 16: return(CCTransitionRotoZoom.transitionWithDuration(t, s));

            //case 17: return CCTransitionMoveInL.transitionWithDuration(t, s);
            //case 18: return CCTransitionMoveInR.transitionWithDuration(t, s);
            //case 19: return CCTransitionMoveInT.transitionWithDuration(t, s);
            //case 20: return CCTransitionMoveInB.transitionWithDuration(t, s);
            case 17: return(CCTransitionSlideInL.transitionWithDuration(t, s));

            case 18: return(CCTransitionSlideInR.transitionWithDuration(t, s));

            case 19: return(CCTransitionSlideInT.transitionWithDuration(t, s));

            case 20: return(CCTransitionSlideInB.transitionWithDuration(t, s));

            case 21:
            {
                if (CCConfiguration.sharedConfiguration().getGlesVersion() <= CCGlesVersion.GLES_VER_1_0)
                {
                    //CCMessageBox("The Opengl ES version is lower than 1.1, and TransitionCrossFade may not run correctly, it is ignored.", "Cocos2d-x Hint");
                    return(null);
                }
                else
                {
                    return(CCTransitionCrossFade.transitionWithDuration(t, s));
                }
            }

            case 22:
            {
                if (CCConfiguration.sharedConfiguration().getGlesVersion() <= CCGlesVersion.GLES_VER_1_0)
                {
                    //CCMessageBox("The Opengl ES version is lower than 1.1, and TransitionRadialCCW may not run correctly, it is ignored.", "Cocos2d-x Hint");
                    return(null);
                }
                else
                {
                    return(CCTransitionRadialCCW.transitionWithDuration(t, s));
                }
            }

            case 23:
            {
                if (CCConfiguration.sharedConfiguration().getGlesVersion() <= CCGlesVersion.GLES_VER_1_0)
                {
                    //CCMessageBox("The Opengl ES version is lower than 1.1, and TransitionRadialCW may not run correctly, it is ignored.", "Cocos2d-x Hint");
                    return(null);
                }
                else
                {
                    return(CCTransitionRadialCW.transitionWithDuration(t, s));
                }
            }

            case 24: return(PageTransitionForward.transitionWithDuration(t, s));

            // case 25: return PageTransitionBackward.transitionWithDuration(t, s);
            case 26: return(CCTransitionFadeTR.transitionWithDuration(t, s));

            case 27: return(CCTransitionFadeBL.transitionWithDuration(t, s));

            case 28: return(CCTransitionFadeUp.transitionWithDuration(t, s));

            case 29: return(CCTransitionFadeDown.transitionWithDuration(t, s));

            case 30: return(CCTransitionTurnOffTiles.transitionWithDuration(t, s));

            case 31: return(CCTransitionSplitRows.transitionWithDuration(t, s));

            case 25: return(CCTransitionSplitCols.transitionWithDuration(t, s));

            default: break;
            }

            return(null);
        }
Esempio n. 2
0
 private void initializeConfiguration()
 {
     m_ccConfiguration = CCConfiguration.GetInstance(m_configurationService.MigrationSource);
 }