Exemple #1
0
        private void Start()
        {
            rigidbody2d    = GetComponent <Rigidbody2D>();
            spriteRenderer = GetComponent <SpriteRenderer>();
            animator       = GetComponent <Animator>();
            gameManager    = GetComponentInParent <MinigameManager>();
            boxCollider2d  = GetComponent <BoxCollider2D>();
            audioSource    = gameManager.AudioSource;

            screenSize.y = gameManager.CurrentCamera.orthographicSize * 2;
            screenSize.x = gameManager.CurrentCamera.orthographicSize * gameManager.CurrentCamera.aspect * 2;

            currentHit = LeftHit;
            subscribeToEvents();
        }