Пример #1
0
 // Start is called before the first frame update
 void Start()
 {
     _circleCollider2d      = GetComponent <CircleCollider2D>();
     _bodyCapsuleCollider2D = GetComponent <CapsuleCollider2D>();
     _animator                = GetComponent <Animator>();
     _rigidbody2D             = GetComponent <Rigidbody2D>();
     _player                  = GetComponent <Player>();
     _groundedRaycastDetector = GetComponent <GroundedRaycastDetector>();
     _gameSound               = FindObjectOfType <GameSound>();
 }
Пример #2
0
    // Start is called before the first frame update
    void Start()
    {
        _joystick              = FindObjectOfType <Joystick>();
        _animator              = GetComponent <Animator>();
        _rigidbody2D           = GetComponent <Rigidbody2D>();
        _bodyCapsuleCollider2D = GetComponent <CapsuleCollider2D>();
        _dustParticleSystem    = transform.GetChild(2).gameObject.GetComponent <ParticleSystem>();
        _player = GetComponent <Player>();
        _groundedRaycastDetector = GetComponent <GroundedRaycastDetector>();

        isSliding = false;
    }