Пример #1
0
    private void FixedUpdate()
    {
        if (!_isHit)
        {
            _notesize.y += _reduceValue * Time.deltaTime; // 일정 값만큼 y를 늘리고
            _notesize.x  = _notesize.y * _sizeratio;      // 그 y의 비례한 값만큼 x를 늘린다

            if (_notesize.x <= _maxnotesize.x)
            {
                _noteImage.rectTransform.sizeDelta = _notesize;
            }

            #region AUTOMODE
            if (PlayMusicInfo.ReturnAutoMode())
            {
                if (_notesize.x >= _maxnotesize.x)
                {
                    Hit("AWESOME");
                }
            }
            else
            {
                if (_notesize.x > _maxnotesize.x + _missRange)
                {
                    Hit("MISS");
                }
            }
            #endregion
        }
    }
Пример #2
0
 private void Awake()
 {
     _toggle = GetComponent <Toggle>();
     if (PlayMusicInfo.ReturnAutoMode())
     {
         _toggle.isOn = true;
     }
 }
Пример #3
0
    private void Init(ShortNote _prefab, Queue <ShortNote> _inputQueue, string _objName, int turnNum)
    {
        ShortNote temp = Instantiate(_prefab, Vector2.zero, Quaternion.identity);

        temp.SetNoteProperties(float.Parse(value[0]), float.Parse(value[1]), PlayMusicInfo.ReturnAutoMode()); // 판정선거리, 감소속도
        temp.transform.SetParent(gameObject.transform, false);
        temp.name = _objName + " (" + turnNum.ToString() + ")";
        _inputQueue.Enqueue(temp);
    }
Пример #4
0
    private void FixedUpdate()
    {
        if (_isMove)
        {
            transform.position = Vector2.Lerp(_departPos, _arrivePos.position, _lerpValue);
            _lerpValue        += 300 * 0.000033f;

            if (PlayMusicInfo.ReturnAutoMode())
            {
                if (Vector2.Distance(_arrivePos.position, transform.position) < 50f)
                {
                    Success();
                }
            }
            if (transform.position == _arrivePos.position)
            {
                FAIL("MISS");
                _isMove = false;
            }
        }
    }
Пример #5
0
 private void FixedUpdate()
 {
     if (!_isJudgeEnd)
     {
         if (!_isTouch)
         {
             _lineSize.x -= _reduceValue * Time.deltaTime;
             _lineSize.y -= _reduceValue * Time.deltaTime;
             _line.rectTransform.sizeDelta = _lineSize;
             #region AUTOMODE
             if (PlayMusicInfo.ReturnAutoMode())
             {
                 if (_line.rectTransform.sizeDelta.x < _circle.rectTransform.sizeDelta.x) // 노트를 놓치는 판정 범위
                 {
                     _line.color = Color.clear;
                     Hit("AWESOME");
                 }
             }
             else
             {
                 if (_line.rectTransform.sizeDelta.x < _circle.rectTransform.sizeDelta.x - _missRange) // 노트를 놓치는 판정 범위
                 {
                     Hit("MISS");
                 }
             }
             #endregion
         }
         else
         {
             _touchTime += Time.deltaTime;
             if (_touchTime > _slashTime)
             {
                 Hit("FAIL");
             }
         }
     }
 }