Ejemplo n.º 1
0
    void SimulateStartingKopa()
    {
        if (IsPlugged)
        {
            WaterPlug.GetComponent <KopaWaterplug>().enabled = true;
            WaterCopaClue.SetActive(true);
            WaterParticle.SetActive(false);

            if (WaterContainer.GetComponent <WaterContainerHeight>())
            {
                WaterContainer.GetComponent <WaterContainerHeight>().AbsorbWater(timeToAbsorbWater);
            }
        }
        else
        {
            WaterPlug.GetComponent <KopaWaterplug>().enabled = false;
            WaterCopaClue.SetActive(false);
            WaterParticle.SetActive(true);

            if (WaterContainer.GetComponent <WaterContainerHeight>())
            {
                WaterContainer.GetComponent <WaterContainerHeight>().FillWater(timeToFillWater);
            }

            particleStartSpeed    = 7.5f;
            particleStartLifetime = 0.7f;

            AkSoundEngine.PostEvent("waterfall_loop", gameObject);
            StartCoroutine(stopSFX(timeToStopSFX));
        }
    }
Ejemplo n.º 2
0
 void Awake()
 {
     WaterPlug.GetComponent <KopaWaterplug>().enabled = true;
     WaterCopaClue.SetActive(true);
     WaterParticle.SetActive(false);
 }