Exemplo n.º 1
0
 private void Awake()
 {
     if (Instance != null && Instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         DontDestroyOnLoad(gameObject);
         Instance = this;
     }
 }
Exemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        GameObject g = GameObject.FindGameObjectWithTag("GM_Info");

        GMI = g.GetComponent <GM_Info>();

        gameMode     = gameObject.GetComponent <GM_GameMode>();
        playerAmount = gameObject.GetComponent <GM_PlayerAmount>();

        gameMode.GameModeFuctionTest();
        playerAmount.PlayerAmountFuctionTest();

        playerAmount.PlayerSpawn(GM_Info.Instance.playerAmount);
        gameMode.setGameModeBool(GM_Info.Instance.gameModeBool);
        gameMode.setGameModePoints(GM_Info.Instance.gameValue);
    }