Exemple #1
0
        public void PlayQueuedAt(apAnimPlayUnit nextPlayUnit, apAnimPlayUnit prevLastPlayUnit, int frame, float tBlend)
        {
            //Debug.LogError(">> AnimRequest <Queued> : " + nextPlayUnit._linkedAnimClip._name + " >> 대기");

            //_tNextPlayStart = -1;//Queued 타입은 플레이 시간을 받지 않는다.
            _tBlend = tBlend;
            _tLive  = 0.0f;

            _isNextUnitPlayed     = false;
            _isNextUnitFrameReset = false;

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

            _prevWaitingPlayUnit = prevLastPlayUnit;

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

            _tActiveStart  = -1.0f;
            _tActiveEnd    = -1.0f;         //<<알 수 없다.
            _tActiveMiddle = -1.0f;

            _status = STATUS.Ready;            //<<일단 대기

            _isNextPlayUnitIsInPrevUnit = false;

            _nextUnitWeight_Overlap = 1.0f;

            //추가 1.15 사용자가 지정한 시작 프레임 > On
            _isResetPlayAtStartFrame = false;
            _frameToStart            = frame;
        }
        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();
            }
        }
        public void PlayQueued(apAnimPlayUnit nextPlayUnit, apAnimPlayUnit prevLastPlayUnit, float tBlend)
        {
            //Debug.LogError(">> AnimRequest <Queued> : " + nextPlayUnit._linkedAnimClip._name + " >> 대기");

            //_tNextPlayStart = -1;//Queued 타입은 플레이 시간을 받지 않는다.
            _tBlend = tBlend;
            _tLive  = 0.0f;

            _isNextUnitPlayed     = false;
            _isNextUnitFrameReset = false;

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

            _prevWaitingPlayUnit = prevLastPlayUnit;

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

            _tActiveStart  = -1.0f;
            _tActiveEnd    = -1.0f;         //<<알 수 없다.
            _tActiveMiddle = -1.0f;

            _status = STATUS.Ready;            //<<일단 대기

            _isNextPlayUnitIsInPrevUnit = false;

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

            _nextUnitWeight_Overlap = 1.0f;

            //이걸 플레이하는 시점에서 지정
            //_isNextPlayUnitIsInPrevUnit = _parentAnimPlayQueue.IsAlreadyAnimUnitPlayed(_nextPlayUnit);

            //_nextUnitWeight_Overlap = 1.0f;
            //if (_isNextPlayUnitIsInPrevUnit)
            //{
            //	_nextUnitWeight_Overlap = _nextPlayUnit.UnitWeight;
            //}
        }
Exemple #4
0
 public void ReleasePlayUnitLink()
 {
     if (_nextPlayUnit != null && _nextPlayUnit.NextOwnerRequest == this)
     {
         _nextPlayUnit.SetOwnerRequest_Next(null);
     }
     //이건 잘 생각해봐야할듯
     //for (int i = 0; i < _prevPlayUnits.Count; i++)
     //{
     //	if (_prevPlayUnits[i] != null && _prevPlayUnits[i].PrevOwnerRequest == this)
     //	{
     //		_prevPlayUnits[i].SetOwnerRequest_Prev(null);
     //	}
     //}
 }
Exemple #5
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();
            }
        }