Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        if (GameObject.Find("_GameController") != null)
        {
            ref_GameController  = GameObject.Find("_GameController").GetComponent <S_GameController>();
            CharacterController = ref_GameController.CharacterController;
            ref_GameController.SetHUDScript(this);
        }
        else
        {
            Debug.Log("Level spawner : Did not find gamecontroller");
        }

        TooltipsSent = new List <Tooltips>();
    }
Exemplo n.º 2
0
 private void SetupGame()
 {
     LevelSpawned = m_LevelSpawner.SpawnLevel(m_StarterPlanet, m_Planets, m_JoiningPlanets, GameData.NumberOfPlanets);
     if (LevelSpawned)
     {
         ref_Character = m_CharacterSpawner.SpawnCharacter();
         if (ref_Character != null)
         {
             foreach (Transform child in ref_Character.transform)
             {
                 if (child.GetComponent <S_CharacterController>())
                 {
                     CharacterController = child.GetComponent <S_CharacterController>();
                 }
             }
             CharacterSpawned = true;
         }
     }
 }