Esempio n. 1
0
        private bool Init()
        {
            // Setup action manager
            CCBAnimationManager pActionManager = new CCBAnimationManager();

            AnimationManager = pActionManager;

            // Setup resolution scale and container size
            _actionManager.RootContainerSize = Layer.VisibleBoundsWorldspace.Size;

            HasScriptingOwner = false;

            return(true);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        private bool Init()
        {
            // Setup action manager
            CCBAnimationManager pActionManager = new CCBAnimationManager();
            AnimationManager = pActionManager;

            // Setup resolution scale and container size
            _actionManager.RootContainerSize = Layer.VisibleBoundsWorldspace.Size;

			HasScriptingOwner = false;

            return true;
        }
Esempio n. 4
0
 public void setAnimationManager(CCBAnimationManager pAnimationManager)
 {
     mAnimationManager = pAnimationManager;
 }