Exemplo n.º 1
0
        protected override void Awake()
        {
            base.Awake();

            _playingSound  = GetComponent <PlayingSound>();
            _cameraShaking = Camera.main.GetComponent <CameraShaking>();
        }
Exemplo n.º 2
0
        protected void Awake()
        {
            _animator        = GetComponent <Animator>();
            _spriteRenderer  = transform.GetChild(0).GetComponent <SpriteRenderer>();
            _capsuleCollider = GetComponent <CapsuleCollider2D>();
            _rigbody         = GetComponent <Rigidbody2D>();

            _character     = GameObject.FindGameObjectWithTag("Player").GetComponent <Character>();
            _cameraShaking = Camera.main.GetComponent <CameraShaking>();
        }