Ejemplo n.º 1
0
        /// <summary> 今やっているモーションを直ちに完全に停止します。 </summary>
        public void StopCurrentMotion()
        {
            _currentMotionItem        = null;
            _currentMotionName        = "";
            _currentMotionElapsedTime = 0f;
            _shouldUpdate             = false;

            _isErasingCurrentClip = false;
        }
Ejemplo n.º 2
0
        private bool StartMotion(string motionName)
        {
            if (_currentMotionName == motionName.ToLower())
            {
                //すでに実行してる = 不要
                return(false);
            }

            StopCurrentMotion();
            if (!_clips.TryGetValue(motionName.ToLower(), out var item))
            {
                return(false);
            }

            source.SetUsedFlags(item.UsedFlags);
            _currentMotionItem               = item;
            _currentMotionElapsedTime        = 0f;
            _currentMotionName               = item.MotionLowerName;
            _currentMotionItem.Motion.Target = source;
            _shouldUpdate = true;

            return(true);
        }