/// <summary> /// Happens before the first frame... use this to create our singleton game object. /// </summary> void Awake() { if (instance == null) { instance = this; } DontDestroyOnLoad(this); }
void Update() { if (ChampionDBManager.GetInstance().ChampionDBReady) { if (Input.GetKeyDown(KeyCode.A)) { for (int i = 0; i < matchIDs.Length; ++i) { StartCoroutine(getMatch(matchIDs[i])); } } } else { Debug.LogWarning("ChampionDBManager is not ready. Wait a little longer."); } }