Пример #1
0
        /// <summary>
        /// Assigns the default values from the resources file.
        /// </summary>
        private void AssignDefaults()
        {
            minPressure.Text = MinPressure.ToString();
            maxPressure.Text = MaxPressure.ToString();

            minWater.Text = MinWater.ToString();
            maxWater.Text = MaxWater.ToString();

            minSand.Text = MinSand.ToString();
            maxSand.Text = MaxSand.ToString();

            pressureLineColor.BackColor = PressureLineColor;
            waterLineColor.BackColor    = WaterLineColor;
            sandLineColor.BackColor     = SandLineColor;
        }
Пример #2
0
    void OnCollisionEnter2D(Collision2D col)
    {
        lake = col.gameObject;

        if (lake.tag == "Lake")
        {
            MaxWater maxWaterScript = lake.GetComponent <MaxWater> ();
            if (maxWaterScript.currentWater > 0)
            {
                //add to inventory then dec
                ItemsInInventory.num_water++;
                maxWaterScript.waterTaken(1);
                aud.clip = grabWater;
                aud.Play();
            }
        }
    }