public CCNode ReadNodeGraphFromFile(string fileName, object owner, CCSize parentSize, ref CCBAnimationManager animationManager) { string pPath = CCFileUtils.FullPathFromRelativePath(fileName); byte[] pBytes = CCFileUtils.GetFileBytes(pPath); CCNode ret = ReadNodeGraphFromData(pBytes, owner, parentSize, ref animationManager); return ret; }
public CCNode ReadNodeGraphFromFile(string fileName, object owner, ref CCBAnimationManager animationManager) { return ReadNodeGraphFromFile(fileName, owner, CCDirector.SharedDirector.WinSize, ref animationManager); }
public CCNode ReadNodeGraphFromData(byte[] bytes, object owner, CCSize parentSize, ref CCBAnimationManager animationManager) { InitWithData(bytes, owner); mActionManager.RootContainerSize = parentSize; CCNode pNodeGraph = ReadFileWithCleanUp(true); if (pNodeGraph != null && mActionManager.AutoPlaySequenceId != -1) { // Auto play animations mActionManager.RunAnimations(mActionManager.AutoPlaySequenceId, 0); } // Return action manager by reference animationManager = mActionManager; return pNodeGraph; }
public bool InitWithData(byte[] bytes, object owner) { // Setup action manager var pActionManager = new CCBAnimationManager(); AnimationManager = pActionManager; // Setup byte array mBytes = bytes; mCurrentByte = 0; mCurrentBit = 0; mOwner = owner; // Setup resolution scale and container size mActionManager.RootContainerSize = CCDirector.SharedDirector.WinSize; return true; }
/* public CCScene createSceneWithNodeGraphFromFile(string pCCBFileName, object owner, ref CCBAnimationManager animationManager) { } */ public CCScene CreateSceneWithNodeGraphFromFile(string fileName, object owner, CCSize parentSize, ref CCBAnimationManager animationManager) { CCNode node = ReadNodeGraphFromFile(fileName, owner, parentSize, ref animationManager); CCScene pScene = new CCScene(); pScene.AddChild(node); return pScene; }
public void setAnimationManager(CCBAnimationManager pAnimationManager) { mAnimationManager = pAnimationManager; }