Example #1
0
 /// <summary>
 /// Happens before the first frame... use this to create our singleton game object.
 /// </summary>
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     DontDestroyOnLoad(this);
 }
Example #2
0
 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.");
     }
 }