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 = new CCNodeLoaderLibrary(); 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); ((AnimationsTestLayer)animationsTest).setAnimationManager(ccbReader.AnimationManager); mTestTitleLabelTTF.Text = ("TestAnimations.ccbi"); CCScene scene = new CCScene(Scene); scene.AddChild(animationsTest); /* 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 void setAnimationManager(CCBAnimationManager pAnimationManager) { mAnimationManager = pAnimationManager; }