private void Bind()
            {
                if (_frame != null)
                    _frame.NameChanged -= UpdateText;

                _frame = _keyFrame.FrameReference > -1 ? _characterDefinition.Frames[_keyFrame.FrameReference] : null;

                if (_frame != null)
                    _frame.NameChanged += UpdateText;

                UpdateText();
            }
Example #2
0
        public CharDef()
        {
            _animations = new Animation[64];
            for (var i = 0; i < _animations.Length; i++)
                _animations[i] = new Animation();

            _frames = new Frame[512];
            for (var i = 0; i < _frames.Length; i++)
                _frames[i] = new Frame();

            Path = "guy";
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CharacterDefinition"/> class.
        /// </summary>
        public CharacterDefinition()
        {
            animations = new Animation[64];
            for (int i = 0; i < animations.Length; i++)
            {
                animations[i] = new Animation();
            }
            frames = new Frame[512];
            for (int i = 0; i < frames.Length; i++)
            {
                frames[i] = new Frame();
            }

            Path = "charName";
        }