/* * 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); }
private bool Init() { // Setup action manager CCBAnimationManager pActionManager = new CCBAnimationManager(); AnimationManager = pActionManager; // Setup resolution scale and container size _actionManager.RootContainerSize = CCDirector.SharedDirector.WinSize; return(true); }
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 CCNode ReadNodeGraphFromData(byte[] bytes, object owner, CCSize parentSize) { _bytes = bytes; _currentByte = 0; _currentBit = 0; _owner = owner; _actionManager.RootContainerSize = parentSize; _actionManager._owner = _owner; _ownerOutletNodes = new List <CCNode>(); _ownerCallbackNodes = new List <CCNode>(); Dictionary <CCNode, CCBAnimationManager> animationManagers = new Dictionary <CCNode, CCBAnimationManager>(); CCNode pNodeGraph = ReadFileWithCleanUp(true, animationManagers); if (pNodeGraph != null && _actionManager.AutoPlaySequenceId != -1 && !_jsControlled) { // Auto play animations _actionManager.RunAnimationsForSequenceIdTweenDuration(_actionManager.AutoPlaySequenceId, 0); } // Assign actionManagers to userObject if (_jsControlled) { _nodesWithAnimationManagers = new List <CCNode>(); _animationManagersForNodes = new List <CCBAnimationManager>(); } foreach (var pElement in animationManagers) { CCNode pNode = pElement.Key; CCBAnimationManager manager = animationManagers[pNode]; pNode.UserObject = manager; if (_jsControlled) { _nodesWithAnimationManagers.Add(pNode); _animationManagersForNodes.Add(manager); } } return(pNodeGraph); }
public CCScene CreateSceneWithNodeGraphFromFile(string fileName, object owner, CCSize parentSize) { CCBAnimationManager dummy = null; return(CreateSceneWithNodeGraphFromFile(fileName, owner, parentSize, ref dummy)); }
public CCNode ReadNodeGraphFromData(byte[] bytes, object owner, CCSize parentSize) { CCBAnimationManager dummy = null; return(ReadNodeGraphFromData(bytes, owner, parentSize, ref dummy)); }
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 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 ReadNodeGraphFromFile(string fileName, object owner, CCSize parentSize) { CCBAnimationManager dummy = null; return(ReadNodeGraphFromFile(fileName, owner, parentSize, ref dummy)); }
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 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 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); }
private bool Init() { // Setup action manager CCBAnimationManager pActionManager = new CCBAnimationManager(); AnimationManager = pActionManager; // Setup resolution scale and container size _actionManager.RootContainerSize = CCDirector.SharedDirector.WinSize; return true; }
public void setAnimationManager(CCBAnimationManager pAnimationManager) { mAnimationManager = pAnimationManager; }