Exemplo n.º 1
0
    private void CheckOrbit()
    {
        if (Mathf.Abs(_pivot.Rotation - _orbitStart) > 2 * Mathf.Pi)
        {
            _curCycle--;
            _sprite.Modulate = _gradient.Interpolate((float)_curCycle / _maxCycle);
            _label.Text      = $"{_curCycle}";
            if (_curCycle <= 0)
            {
                _jumper.Die();
                _jumper = null;
                Implode();
            }

            _orbitStart = _pivot.Rotation;
        }
    }
Exemplo n.º 2
0
    public void CheckOrbits()
    {
        if (Math.Abs(_pivot.Rotation - _orbitStart) > 2 * Math.PI)
        {
            _currentOrbits -= 1;
            if (GameSettings.Instance().EnableSound)
            {
                _beepPlayer.Play();
            }

            _label.Text = _currentOrbits.ToString();

            if (_currentOrbits <= 0)
            {
                _jumper.Die();
                _jumper = null;
                Implode();
            }


            _orbitStart = _pivot.Rotation;
        }
    }