Example #1
0
    private void NextLevel()
    {
        shipController.ResetCoinsCollected();
        level++;

        if (level > 1)
        {
            attackController.IncreaseAggression();
            shipController.speed *= 1.2f;
        }

        // spawn coins
        GameObject coinInitEmpty = new GameObject();
        coinInitEmpty.name = "CoinInitEmpty";
        CoinInit coinInit = coinInitEmpty.AddComponent<CoinInit>();
        coinInit.count = 100;
        coinInit.element = Resources.Load<GameObject>("Coin");
        coinInit.radius = 30;
        coinInit.height = 1;
        coinInit.rotation = new Vector3(90, 0, 0);
    }