public void PlayNew(apAnimPlayUnit nextPlayUnit, float tBlend)
        {
            //Debug.LogError(">> AnimRequest <New> : " + nextPlayUnit._linkedAnimClip._name + " >> 바로 시작한다");

            //_tNextPlayStart = tNextPlay;//<<이게 필요한가?
            _tBlend = tBlend;
            _tLive  = 0.0f;

            _isNextUnitPlayed     = false;
            _isNextUnitFrameReset = false;

            _requestType  = REQUEST_TYPE.New;
            _nextPlayUnit = nextPlayUnit;
            _nextPlayUnit.SetOwnerRequest_Next(this);

            _prevWaitingPlayUnit = null;

            _requestWeight  = 0.0f;
            _nextUnitWeight = 1.0f;
            _prevUnitWeight = 1.0f;

            _tActiveStart  = 0.0f;
            _tActiveEnd    = _tBlend;
            _tActiveMiddle = _tBlend * 0.5f;

            _status = STATUS.Active;            //<<바로 시작

            _isNextPlayUnitIsInPrevUnit = false;

            //이전 코드
            //for (int i = 0; i < _prevPlayUnits.Count; i++)
            //{
            //	if (nextPlayUnit == _prevPlayUnits[i]
            //		&& _prevPlayUnits[i].UnitWeight > 0.05f)
            //	{
            //		_isNextPlayUnitIsInPrevUnit = true;
            //		break;
            //	}
            //}


            _isNextPlayUnitIsInPrevUnit = _parentAnimPlayQueue.IsAlreadyAnimUnitPlayed(_nextPlayUnit);

            _nextUnitWeight_Overlap = 1.0f;


            if (_isNextPlayUnitIsInPrevUnit)
            {
                _nextUnitWeight_Overlap = _nextPlayUnit.UnitWeight;
                if (!_nextPlayUnit.IsLoop)
                {
                    _nextPlayUnit.ResetPlay();
                }
            }
            else
            {
                _nextPlayUnit.ResetPlay();
            }
        }
Exemple #2
0
        public void PlayNew(apAnimPlayUnit nextPlayUnit, float tBlend)
        {
            _tBlend = tBlend;
            _tLive  = 0.0f;

            _isNextUnitPlayed     = false;
            _isNextUnitFrameReset = false;

            _requestType  = REQUEST_TYPE.New;
            _nextPlayUnit = nextPlayUnit;
            _nextPlayUnit.SetOwnerRequest_Next(this);

            _prevWaitingPlayUnit = null;

            _requestWeight  = 0.0f;
            _nextUnitWeight = 1.0f;
            _prevUnitWeight = 1.0f;

            _tActiveStart  = 0.0f;
            _tActiveEnd    = _tBlend;
            _tActiveMiddle = _tBlend * 0.5f;

            _status = STATUS.Active;            //<<바로 시작

            _isNextPlayUnitIsInPrevUnit = false;

            _isNextPlayUnitIsInPrevUnit = _parentAnimPlayQueue.IsAlreadyAnimUnitPlayed(_nextPlayUnit);

            _nextUnitWeight_Overlap = 1.0f;

            //추가 1.15 사용자가 지정한 시작 프레임 > Off
            _isResetPlayAtStartFrame = true;
            _frameToStart            = -1;


            if (_isNextPlayUnitIsInPrevUnit)
            {
                _nextUnitWeight_Overlap = _nextPlayUnit.UnitWeight;
                if (!_nextPlayUnit.IsLoop)
                {
                    _nextPlayUnit.ResetPlay();
                }
            }
            else
            {
                _nextPlayUnit.ResetPlay();
            }
        }