Пример #1
0
    void CoinSpawn()
    {
        //coins
        if (score_value <= 200)
        {
            return;
        }
        if ((Time.time - lastCoinSpawnTime) >= coinDeltaTime)
        {
            lastCoinSpawnTime = Time.time;
            float spawnYpos = Random.Range(coinSPawnMinY, coinSpawnMaxY);

            spawnYpos /= 10;
            coinGenerator.Spawn(new Vector3(transform.position.x + 5, spawnYpos, transform.position.z));
        }
    }