Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (Time.time >= timer)
     {
         SpawnHrošč.respawnZlatiHrošč(transform.gameObject);
     }
 }
Exemplo n.º 2
0
    // 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;
        }
    }