Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 public CCNode ReadNodeGraphFromFile(string fileName, object owner, ref CCBAnimationManager animationManager)
 {
     return ReadNodeGraphFromFile(fileName, owner, CCDirector.SharedDirector.WinSize, ref animationManager);
 }
Esempio n. 3
0
        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;
        }
Esempio n. 4
0
        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;
        }
Esempio n. 5
0
        /*
        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;
        }
Esempio n. 6
0
 public void setAnimationManager(CCBAnimationManager pAnimationManager)
 {
     mAnimationManager = pAnimationManager;
 }