public void openTest(string pCCBFileName, string pCCNodeName, CCNodeLoader pCCNodeLoader) { /* Create an autorelease CCNodeLoaderLibrary. */ CCNodeLoaderLibrary ccNodeLoaderLibrary = new CCNodeLoaderLibrary(); ccNodeLoaderLibrary.RegisterCCNodeLoader("TestHeaderLayer", new Loader<TestHeaderLayer>()); if (pCCNodeName != null && pCCNodeLoader != null) { ccNodeLoaderLibrary.RegisterCCNodeLoader(pCCNodeName, pCCNodeLoader); } /* 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 node = ccbReader.ReadNodeGraphFromFile(pCCBFileName, this); mTestTitleLabelTTF.Text = (pCCBFileName); CCScene scene = new CCScene(Scene); scene.AddChild(node); /* Push the new scene with a fancy transition. */ CCColor3B transitionColor = new CCColor3B(); transitionColor.R = 0; transitionColor.G = 0; transitionColor.B = 0; Scene.Director.PushScene(new CCTransitionFade(0.5f, scene, transitionColor)); }
public override void OnNodeLoaded(CCNode node, CCNodeLoader nodeLoader) { CCRotateBy ccRotateBy = new CCRotateBy (20.0f, 360); CCRepeatForever ccRepeatForever = new CCRepeatForever (ccRotateBy); mBurstSprite.RunAction(ccRepeatForever); }
public void RegisterCCNodeLoader(string pClassName, CCNodeLoader pCCNodeLoader) { _nodeLoaders.Add(pClassName, pCCNodeLoader); }