Example #1
0
    private void Awake()
    {
        playerController = GameObject.FindWithTag("Player").GetComponent <PlayerController>();
        HUDManager       = GameObject.Find("HUD").GetComponent <HUDManagerMinigame01>();
        pauseMenu        = GameObject.Find("Canvas-Pause-Menu").GetComponent <PauseMenu>();
        sceneManager     = GameObject.Find("SceneManagerScript").GetComponent <SceneManager>();

        backG1 = this.transform.GetChild(0).transform.gameObject;
        backG2 = this.transform.GetChild(1).transform.gameObject;
    }
Example #2
0
    private void Start()
    {
        rigid2D              = GetComponent <Rigidbody2D>();
        rigid2D.constraints  = RigidbodyConstraints2D.FreezeRotation;
        rigid2D.gravityScale = 0.0f;
        rigid2D.drag         = SPEED; // removes inertia

        hudManager      = GameObject.Find("HUD").GetComponent <HUDManagerMinigame01>();
        miniGameManager = GameObject.Find("Minigame").GetComponent <MiniGameManager>();
        audioManager    = GameObject.Find("Audio").GetComponent <AudioManager>();
    }