void Start() { liczba_domow_startowych = 1; liczba_grzybiarzy_startowych = 3; liczba_grzybow_startowych = 0; czas_spawnu_grzyba = 0; cooldown_spawnu_grzyba = 1; lista_domow = new List <House> (); lista_grzybow = new List <Shroom> (); lista_grzybiarzy = new List <Shroomer> (); for (int i = 0; i < liczba_domow_startowych; i++) { spawn_Domku(); } for (int i = 0; i < liczba_grzybiarzy_startowych; i++) { spawn_Grzybiarza(); } for (int i = 0; i < liczba_grzybow_startowych; i++) { spawn_Grzyba(); } najlepszy_grzybiarz = lista_grzybiarzy [0]; }
public void nagrodzNajlepszego(Shroomer shr) { if (shr.GetLicznikGrzybow > najlepszy_grzybiarz.GetLicznikGrzybow || najlepszy_grzybiarz == shr) { // Debug.Log ("Zmieniam kolory"); if (!najlepszy_grzybiarz.GetSetDead) { najlepszy_grzybiarz.zmienKolor(def); } najlepszy_grzybiarz = shr; shr.zmienKolor(lead); } }
private IEnumerator ExecuteCmd(string input) { if (Tuna.Caught) { yield break; } var cmd = input; if (input.Contains(" ")) { var index = input.IndexOf(" "); cmd = input.Substring(0, index).Trim(); var msg = input.Remove(0, index).Trim(); StartCoroutine(ShowMessage(string.Format("#{0}: {1}", cmd, msg))); } else { StartCoroutine(ShowMessage("#" + cmd)); } Debug.Log("Starting " + cmd); switch (cmd) { case "invert": Player.Invert = true; yield return(new WaitForSeconds(5f)); Player.Invert = false; break; case "shake": iTween.ShakePosition(Camera.main.gameObject, new Vector3(1.5f, 1.5f), 3f); yield return(new WaitForSeconds(5f)); break; case "invisible": Tuna.Invisible = true; yield return(new WaitForSeconds(5f)); Tuna.Invisible = false; break; case "slow": Player.Slow = true; yield return(new WaitForSeconds(5f)); Player.Slow = false; break; case "fisheye": UnityStandardAssets.ImageEffects.Fisheye.Active = true; yield return(new WaitForSeconds(5f)); UnityStandardAssets.ImageEffects.Fisheye.Active = false; break; case "reddit": Shroomer.Activate(); yield return(new WaitForSeconds(5f)); break; } Debug.Log("Done with " + cmd); yield return(new WaitForSeconds(1)); isExecuting = false; yield break; }
public void spawn_Grzybiarza() { Shroomer grzybiarz = Instantiate(shroomerPrefab, wylosuj_Pozycje(0), Quaternion.identity).GetComponent <Shroomer>(); lista_grzybiarzy.Add(grzybiarz); }