Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        explosions = GameObject.FindGameObjectsWithTag("Explosion");

        GameObject.FindGameObjectWithTag("BackgroundTile").GetComponent <BackgroundTiles>().movementSpeedY = Random.Range(0.4f, 0.7f);

        pointsTextObj       = GameObject.Find("PointsText");
        healthTextObj       = GameObject.Find("HealthText");
        gameOverTextObj     = GameObject.Find("GameOver");
        controlTextObj      = GameObject.Find("ControlsText");
        finisheLevelTextObj = GameObject.Find("FinisheLevel");
        startMenuObj        = GameObject.Find("StartMenu");
        continueButton      = GameObject.Find("ContinueButton").GetComponent <Button>();

        p1       = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>();
        levelBar = GameObject.FindGameObjectWithTag("EndLevel").GetComponent <EndLevel>();

        gameOverTextObj.SetActive(false);
        finisheLevelTextObj.SetActive(false);
        continueButton.gameObject.SetActive(false);
        startMenuObj.SetActive(false);

        init     = true;
        isPaused = false;
        StartCoroutine(turnOffContol(controlDisplayTimer));
        ImmortalGameManager.LoadGameLevel();
    }