Пример #1
0
 public Weather()
 {
     currentStormType   = StormType.Tranquil;
     perciptation       = 0f;
     timeSinceLastStorm = 0f;
     temperature        = 70;
 }
Пример #2
0
 public Cloud()
 {
     LightningChance = 0.0f;
     MaxRainDrops    = 0;
     RainDrops       = null;
     TypeofStorm     = StormType.RainStorm;
 }
Пример #3
0
    public void OnWatered(StormType storm)
    {
        // Bail if already watered or if there is no bad effects from miswatering
        if (isWatered)
        {
            return;
        }

        if (storm == requiredStorm)
        {
            // Hide the dry stuff
            foreach (GameObject go in dryVisuals)
            {
                go.SetActive(false);
            }

            // Show the wet stuff
            foreach (GameObject go in wetVisuals)
            {
                go.SetActive(true);
            }

            // Award score
            GameManager.Instance.AddScore(pointValue);

            // Prevent further interaction
            isWatered = true;
        }
        else if (System.Array.IndexOf(damagingStorms, storm) != -1)
        {
            // Hide the dry stuff
            foreach (GameObject go in dryVisuals)
            {
                go.SetActive(false);
            }

            // Show the damaged stuff
            foreach (GameObject go in damagedVisuals)
            {
                go.SetActive(true);
            }

            // Deal damage
            GameManager.Instance.LoseHealth();

            // Prevent further interaction
            isWatered = true;
        }
    }
Пример #4
0
 public Cloud()
 {
     MaxRainDrops = 0;
     RainDrops    = null;
     TypeofStorm  = StormType.RainStorm;
 }
Пример #5
0
 public Storm()
 {
     IsInitialized = false;
     TypeofStorm   = StormType.RainStorm;
 }
Пример #6
0
 public void IslandInit(StormType storm)
 {
     requiredStorm = storm;
 }