Пример #1
0
        public void Accelerator(float boost)
        {
            if (_rigidbody.velocity.magnitude > _fastest)
            {
                return;
            }

            _rigidbody.AddForce(new Vector3((_addForce + _acceleration) * boost, 0f, 0f));

            if (!_isRunning)
            {
                _easyAnimation.CrossFade(1, 0, 1);
            }

            _isRunning = true;
        }
Пример #2
0
 public void StartRun()
 {
     _isUpdate    = true;
     _updateFrame = 0;
     _easyAnimation.CrossFade(1, 0, 0.5f);
 }