Example #1
0
    public void StartGame()
    {
        GameObject.Find("Title").GetComponent <TitleScreen>().DisplayNextLevel();
        gamestate = GameState.Ingame;
        GameObject PlayerShip = Instantiate(PlayerPrefab, new Vector3(0, 0, 0), Quaternion.identity) as GameObject;

        PlayerShip.name = "PlayerShip";
        PlayerShip.gameObject.SetActive(true);
        health = GameObject.Find("HealthBar").GetComponent <Health>();
        health.ShowAll();
        title.HideElements();
        obstacle.StartGame();
        obstacle2.SetBehind();
        obstacle2.StartGame();
    }