示例#1
0
    public void TriggerStarPower()
    {
        if (!starPower)
        {
            //hard codet for ikke at clogge inspector
            playerAnim.SetTrigger("Starpower");
            scoreDisplay.StarPower();
            multiplierDisplay.StarPower();
            background.SetStarPowerBackground();

            //scroll1.scrollSpeed = -0.003f;
            //scroll1.scrollSpeed = -0.003f;
            //scroll2.scrollSpeed = -0.02f;
            //scroll2.scrollSpeed2 = -0.02f;
            //scroll1.setTexture(1);
            //scroll2.setTexture(1);
            //scrollRend1 = scroll1.gameObject.GetComponent<Renderer>();
            //scrollRend2 = scroll2.gameObject.GetComponent<Renderer>();
            //originalColor1 = scrollRend1.material.color;
            //originalColor2 = scrollRend2.material.color;
            //scrollRend1.material.color = new Color(0.8f, 0.8f, 1f) ;
            //scrollRend2.material.color = new Color(0.8f, 0.8f, 1f);
            SetSpeed(starPowGameSpeed, starPowAcc, starPowSpawnrate, starPowRotSpeed);
            audioManager.StarPower();
            punyModsCounter = punyModsPerStarPower;
            Module.starPowerEndCountdown = punyModsPerStarPower;
            foreach (GameObject g in spawnedMods)
            {
                if (g && punyModsCounter > 0)
                {
                    Module m = g.GetComponent <Module>();
                    m.SetPuny(true);
                    punyModsCounter--;
                }
            }
            starPower = true;
        }
        backgroundLight.intensity = intensity;
    }