예제 #1
0
        /************************************************************************************************************************/

        /// <summary>
        /// Adds a new port and uses <see cref="AnimancerState.SetParent"/> to connect the `state` to it.
        /// </summary>
        public void AddChild(AnimancerState state)
        {
            if (state.Parent == this)
            {
                return;
            }

            var index = States.Count;

            States.Add(null);
            _Playable.SetInputCount(index + 1);
            state.SetParent(this, index);
        }
예제 #2
0
        /************************************************************************************************************************/

        /// <summary>
        /// Adds a new port and uses <see cref="AnimancerState.SetParent"/> to connect the `state` to it.
        /// </summary>
        public void AddChild(AnimancerState state)
        {
            if (state.Parent == this)
            {
                return;
            }

            state.SetRoot(Root);

            var index = States.Count;

            States.Add(null);// OnAddChild will assign the state.
            _Playable.SetInputCount(index + 1);
            state.SetParent(this, index);
        }