Beispiel #1
0
    // Start is called before the first frame update
    void Start()
    {
        GameObject gameManagerObject = GameObject.FindWithTag("GameController");

        if (gameManagerObject != null)
        {
            gamemanager = gameManagerObject.GetComponent <GameManagment_Script>();
        }
    }
Beispiel #2
0
    // Start is called before the first frame update
    void Start()
    {
        startPos = CueBall.transform.position;

        GameObject gameManagerObject = GameObject.FindWithTag("GameController");

        if (gameManagerObject != null)
        {
            gamemanager = gameManagerObject.GetComponent <GameManagment_Script>();
        }
    }
 // Start is called before the first frame update
 void Start()
 {
     pos = transform.position;
     rb2d = GetComponent<Rigidbody2D>();
     GameObject gameManagerObject = GameObject.FindWithTag("GameController");
     if (gameManagerObject != null)
     {
         gamemanager = gameManagerObject.GetComponent<GameManagment_Script>();
     }
     GameObject gameoverText = GameObject.FindWithTag("GameOver");
     if (gameoverText != null)
     {
         gameOver = gameoverText.GetComponent<Text>();
     }
 }
    // Start is called before the first frame update
    void Start()
    {
        mySource = GetComponent <AudioSource>();

        GameObject gameManagerObject = GameObject.FindWithTag("GameController");

        if (gameManagerObject != null)
        {
            gamemanager = gameManagerObject.GetComponent <GameManagment_Script>();
        }

        rb2d = GetComponent <Rigidbody2D>();
        heart1.SetActive(true);
        heart2.SetActive(true);
        heart3.SetActive(true);
        Lifes = 3;
        gameoverText.enabled = false;
    }