public static CCTransitionZoomFlipAngular transitionWithDuration(float t, CCScene s, tOrientation o) { CCTransitionZoomFlipAngular pScene = new CCTransitionZoomFlipAngular(); pScene.initWithDuration(t, s, o); return pScene; }
public static CCScene Scene(int score) { var scene = new CCScene (); var layer = new HighScoreLayer (score); scene.AddChild(layer); return scene; }
public void onAnimationsTestClicked(object pSender, CCControlEvent pCCControlEvent) { // Load node graph (TestAnimations is a sub class of CCLayer) and retrieve the ccb action manager CCBAnimationManager actionManager = null; /* Create an autorelease CCNodeLoaderLibrary. */ CCNodeLoaderLibrary ccNodeLoaderLibrary = CCNodeLoaderLibrary.NewDefaultCCNodeLoaderLibrary(); ccNodeLoaderLibrary.RegisterCCNodeLoader("TestHeaderLayer", new Loader<TestHeaderLayer>()); ccNodeLoaderLibrary.RegisterCCNodeLoader("TestAnimationsLayer", new Loader<AnimationsTestLayer>()); /* Create an autorelease CCBReader. */ var ccbReader = new CCBReader(ccNodeLoaderLibrary); /* Read a ccbi file. */ // Load the scene from the ccbi-file, setting this class as // the owner will cause lblTestTitle to be set by the CCBReader. // lblTestTitle is in the TestHeader.ccbi, which is referenced // from each of the test scenes. CCNode animationsTest = ccbReader.ReadNodeGraphFromFile("ccb/ccb/TestAnimations.ccbi", this, ref actionManager); ((AnimationsTestLayer) animationsTest).setAnimationManager(actionManager); mTestTitleLabelTTF.Label = ("TestAnimations.ccbi"); CCScene scene = new CCScene(); scene.AddChild(animationsTest); /* Push the new scene with a fancy transition. */ CCColor3B transitionColor; transitionColor.R = 0; transitionColor.G = 0; transitionColor.B = 0; CCDirector.SharedDirector.PushScene(new CCTransitionFade(0.5f, scene, transitionColor)); }
/// <summary> /// Creates a base transition with duration and incoming scene. /// If back is true then the effect is reversed to appear as if the incoming /// scene is being turned from left over the outgoing scene. /// </summary> public static CCTransitionPageTurn transitionWithDuration(float t, CCScene scene, bool backwards) { CCTransitionPageTurn pTransition = new CCTransitionPageTurn(); pTransition.initWithDuration(t, scene, backwards); return pTransition; }
public static CCTransitionFlipY transitionWithDuration(float t, CCScene s, tOrientation o) { CCTransitionFlipY pScene = new CCTransitionFlipY(); pScene.initWithDuration(t, s, o); return pScene; }
public static new CCTransitionRadialCCW transitionWithDuration(float t, CCScene scene) { CCTransitionRadialCCW pScene = new CCTransitionRadialCCW(); pScene.initWithDuration(t, scene); return pScene; }
/// <summary> /// initializes the transition with a duration and with an RGB color /// </summary> public virtual bool InitWithDuration(float duration, CCScene scene, CCColor3B color) { if (base.InitWithDuration(duration, scene)) { m_tColor = new CCColor4B {R = color.R, G = color.G, B = color.B, A = 0}; } return true; }
public virtual void MainMenuCallback(object pSender) { CCScene pScene = new CCScene(); CCLayer pLayer = new TestController(); pScene.AddChild(pLayer); CCDirector.SharedDirector.ReplaceScene(pScene); }
public void switchLayer(float dt) { //unschedule(Bug624Layer.switchLayer); CCScene scene = new CCScene(); scene.AddChild(new Bug624Layer2(), 0); CCDirector.SharedDirector.ReplaceScene(new CCTransitionFade(2.0f, scene, new CCColor3B { R = 255, G = 255, B = 255 })); }
public static void runTableViewTest() { var pScene = new CCScene(); var pLayer = new TableViewTestLayer(); pLayer.Init(); pScene.AddChild(pLayer); CCDirector.SharedDirector.ReplaceScene(pScene); }
/// <summary> /// initializes a transition with duration and incoming scene /// </summary> /// <param name="t"></param> /// <param name="scene"></param> /// <param name="orientation"></param> /// <returns></returns> public virtual bool initWithDuration(float t, CCScene scene, tOrientation orientation) { if (base.initWithDuration(t, scene)) { m_eOrientation = orientation; } return true; }
public static CCScene scene() { CCScene pScene = new CCScene(); TextureTest layer = new TextureTest(false, PerformanceTextureTest.TEST_COUNT, PerformanceTextureTest.s_nTexCurCase); pScene.AddChild(layer); return pScene; }
public static CCScene scene() { CCScene pScene = new CCScene(); //Bug1159Layer layer = Bug1159Layer.node(); //pScene.addChild(layer); return pScene; }
//DECLEAR_TRANSITIONWITHDURATION(CCTransitionMoveInT); public static new CCTransitionMoveInR transitionWithDuration(float t, CCScene scene) { CCTransitionMoveInR pScene = new CCTransitionMoveInR(); if (pScene != null && pScene.initWithDuration(t, scene)) { return pScene; } pScene = null; return null; }
//public DECLEAR_TRANSITIONWITHDURATION(CCTransitionSplitCols); public static new CCTransitionSplitCols transitionWithDuration(float t, CCScene scene) { CCTransitionSplitCols pScene = new CCTransitionSplitCols(); if (pScene != null && pScene.initWithDuration(t, scene)) { return pScene; } pScene = null; return null; }
//DECLEAR_TRANSITIONWITHDURATION(CCTransitionTurnOffTiles); public static new CCTransitionTurnOffTiles transitionWithDuration(float t, CCScene scene) { CCTransitionTurnOffTiles pScene = new CCTransitionTurnOffTiles(); if (pScene.initWithDuration(t, scene)) { return pScene; } return null; }
public static void runTouchesTest() { s_nTouchCurCase = 0; CCScene pScene = new CCScene(); CCLayer pLayer = new TouchesPerformTest1(true, TEST_COUNT, s_nTouchCurCase); pScene.AddChild(pLayer); CCDirector.SharedDirector.ReplaceScene(pScene); }
//DECLEAR_TRANSITIONWITHDURATION(CCTransitionShrinkGrow); public static new CCTransitionShrinkGrow transitionWithDuration(float t, CCScene scene) { CCTransitionShrinkGrow pScene = new CCTransitionShrinkGrow(); if (pScene != null && pScene.initWithDuration(t, scene)) { return pScene; } pScene = null; return null; }
//DECLEAR_TRANSITIONWITHDURATION(CCTransitionRotoZoom); public static CCTransitionRotoZoom transitionWithDuration(float t, CCScene scene) { CCTransitionRotoZoom pScene = new CCTransitionRotoZoom(); if (pScene != null && pScene.initWithDuration(t, scene)) { return pScene; } pScene = null; return null; }
//public DECLEAR_TRANSITIONWITHDURATION(CCTransitionFadeTR) public static new CCTransitionFadeTR transitionWithDuration(float t, CCScene scene) { CCTransitionFadeTR pScene = new CCTransitionFadeTR(); if (pScene.initWithDuration(t, scene)) { return pScene; } return null; }
//DECLEAR_TRANSITIONWITHDURATION(CCTransitionSplitRows) public new static CCTransitionSplitRows transitionWithDuration(float t, CCScene scene) { CCTransitionSplitRows pScene = new CCTransitionSplitRows(); if (pScene.initWithDuration(t, scene)) { return pScene; } return null; }
//public DECLEAR_TRANSITIONWITHDURATION(CCTransitionFadeDown) CCTransitionFadeDown transitionWithDuration(float t, CCScene scene) { CCTransitionFadeDown pScene = new CCTransitionFadeDown(); if (pScene != null && pScene.initWithDuration(t, scene)) { return pScene; } pScene = null; return null; }
//public override bool init() //{ // if (!base.init()) // { // return false; // } // this.m_bIsTouchEnabled = true; // var sp = CCSprite.spriteWithFile("pic_guide_06"); // var size = Director.SharedDirector.DisplaySize; // sp.position = new CCPoint(size.Width / 2, size.Height / 2); // pSprite = sp; // this.addChild(sp); // var act = new CCRotateBy(); // act.initWithDuration(3.0f, 360); // var repeat = new CCRepeatForever(); // repeat.initWithAction(act); // sp.runAction(repeat); // return true; //} //CCSprite pSprite; //public override void onEnter() //{ // base.onEnter(); // this.isTouchEnabled = true; //} //public override void registerWithTouchDispatcher() //{ // CCTouchDispatcher.sharedDispatcher().addTargetedDelegate(this, 0, false); // CCTouchDispatcher.sharedDispatcher().addStandardDelegate(this, 0); //} public static CCScene scene() { //CCScene scene = CCScene.node(); //CCLayer layer = HelloCocos2dScene.node(); //scene.addChild(layer); //return scene; CCScene scene = new CCScene(); scene.addChild(new HelloCocos2dScene()); return scene; }
/// <summary> /// initializes the transition with a duration and with an RGB color /// </summary> /// <param name="t"></param> /// <param name="scene"></param> /// <param name="color"></param> /// <returns></returns> public virtual bool initWithDuration(float duration, CCScene scene, ccColor3B color) { if (base.initWithDuration(duration, scene)) { m_tColor.r = color.r; m_tColor.g = color.g; m_tColor.b = color.b; m_tColor.a = 0; } return true; }
public static CCScene sceneWithTitle(string title) { CCScene pScene = new CCScene(); var controlLayer = new CCControlSwitchTest(); if (controlLayer != null && controlLayer.Init()) { controlLayer.getSceneTitleLabel().Label = (title); pScene.AddChild(controlLayer); } return pScene; }
public static new CCTransitionCrossFade transitionWithDuration(float t, CCScene scene) { CCTransitionCrossFade pScene = new CCTransitionCrossFade(); if (pScene != null && pScene.initWithDuration(t, scene)) { //pScene->autorelease(); return pScene; } pScene = null; return null; }
public static new CCScene node() { CCScene pRet = new CCScene(); if (pRet.init()) { return pRet; } else { return null; } }
/// <summary> /// Creates a base transition with duration and incoming scene. /// If back is true then the effect is reversed to appear as if the incoming /// scene is being turned from left over the outgoing scene. /// </summary> public virtual bool initWithDuration(float t, CCScene scene, bool backwards) { // XXX: needed before [super init] m_bBack = backwards; if (base.initWithDuration(t, scene)) { // do something } return true; }
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 static CCScene scene() { // 'scene' is an autorelease object. CCScene pScene = new CCScene(); // 'layer' is an autorelease object. //Bug914Layer layer = Bug914Layer.node(); // add layer as a child to scene //pScene.addChild(layer); // return the scene return pScene; }
public override bool initWithDuration(float t, CCScene scene) { this.initWithDuration(t, scene, new ccColor3B(Color.Black)); return(true); }
public new static CCTransitionScene transitionWithDuration(float t, CCScene scene) { return(transitionWithDuration(t, scene, new ccColor3B())); }