Exemple #1
0
    private void Awake()
    {
        GameManager.Initialize();

        GameText.DeactivateEvent();
        GameText.SetInGameTextNowEvent(textAsset);

        playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Starship_Controller>();
        playerCamera     = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Player_Camera_Controller>();

        PlayerStarshipTr = playerController.transform;
    }
Exemple #2
0
    private void Awake()
    {
        GameManager.Initialize();
        SceneController.LoadAdditiveScene(sceneLocationName);

        GameText.DeactivateEvent();
        GameText.SetInGameTextNowEvent(textAsset);

        playerCamera     = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Player_Camera_Controller>();
        playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Starship_Controller>();
        playerController.GetComponent <Health>().OnDeath += RestartGame;
    }
Exemple #3
0
    private void Awake()
    {
        GameManager.Initialize();

        SceneController.LoadAdditiveScene(sceneLocationName);
        GameText.DeactivateEvent();
        GameText.SetInGameTextNowEvent(textAsset);

        playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Starship_Controller>();
        playerCamera     = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Player_Camera_Controller>();
        playerStarship   = playerController.GetComponent <Starship>();
        playerController.GetComponent <Health>().OnDeath += OnPlayerDeath;
        systemStarships = GetComponent <System_Starships>();

        PlayerStarshipTr = playerController.transform;

        EndTrigger.OnPlayerStarshipEnter += PlayerStarshipEnterEndTrigger;
    }
Exemple #4
0
    private void Awake()
    {
        GameManager.Initialize();

        player_Camera_Controller   = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Player_Camera_Controller>();
        player_Starship_Controller = GameObject.FindGameObjectWithTag("Player").GetComponentInParent <Player_Starship_Controller>();
        playerStarship             = player_Starship_Controller.GetComponent <Starship>();
        player_Starship_Controller.GetComponent <Health>().OnDeath += Restart;

        GameText.DeactivateEvent();
        GameText.SetInGameTextNowEvent(textAsset);

        GameAudio.StartAudioEvent(audioClip, 0.7f, true);
        if (StaticSettings.isRestart)
        {
            isRestart = true;
            StaticSettings.isRestart = false;
        }

        EndTrigger.OnPlayerStarshipEnter += OnPlayerStarshipEnterEndTrigger;
    }
Exemple #5
0
    private void Awake()
    {
        GameManager.Initialize();

        SceneController.LoadAdditiveScene(sceneLocation);
        GameText.DeactivateEvent();
        GameText.SetInGameTextNowEvent(textAsset);

        systemStarships = GetComponent <System_Starships>();

        playerController = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Starship_Controller>();
        playerCamera     = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Player_Camera_Controller>();
        playerStarship   = playerController.GetComponent <Starship>();
        playerController.GetComponent <Health>().OnDeath += OnPlayerDeath;

        systemStarships.StarshipsTeams.Add(new System_Starships.StarshipsTeam(playerStarship.GetComponent <Starship>()));
        systemStarships.StarshipsTeams.Add(new System_Starships.StarshipsTeam());

        playerCamera.SetPositionWithOffset(playerController.transform.position);
        screenDark.SetDark(false);
        playerController.SetLockControl(true);
    }
Exemple #6
0
 private void CloseGameMenu()
 {
     GameText.DeactivateEvent();
 }