// Update is called once per frame void Update() { if (Time.time >= timer) { SpawnHrošč.respawnZlatiHrošč(transform.gameObject); } }
// Update is called once per frame void Update() { //vsaki 2 sekundi(manj zre) je moznost da se eden izmed hroscev spremeni v zlatega if (Time.time >= timer) { if (Random.Range(0.0f, 100.0f) > 98.0f) //random možnost, da se spremeni { SpawnHrošč.upgradeHrošč(transform.gameObject); } timer = Time.time + interval; } }