Ejemplo n.º 1
0
        private void OnTriggerExit(Collider colliderComponent)
        {
            WaterRaindropsIME component = colliderComponent.gameObject.GetComponent <WaterRaindropsIME>();

            if (component != null)
            {
                this._Simulations.Remove(component);
            }
        }
Ejemplo n.º 2
0
 private void Update()
 {
     for (int i = 0; i < this._Simulations.Count; i++)
     {
         WaterRaindropsIME waterRaindropsIME = this._Simulations[i];
         if (UnityEngine.Random.Range(0f, 1f) < this.Intensity)
         {
             Vector3 velocity = -base.transform.up * this.Force;
             float   num      = this.Size.Random();
             Vector2 vector   = new Vector2(UnityEngine.Random.Range(0f, 1f), UnityEngine.Random.Range(0f, 1f));
             waterRaindropsIME.Spawn(velocity, num, this.Life.Random(), vector.x, vector.y);
             for (int j = 0; j < UnityEngine.Random.Range(0, 20); j++)
             {
                 Vector2 vector2 = new Vector2(UnityEngine.Random.Range(-1f, 1f), UnityEngine.Random.Range(-1f, 1f)) * 0.05f;
                 waterRaindropsIME.Spawn(Vector3.zero, num * 0.2f, 0.5f + UnityEngine.Random.Range(0f, 0.4f), vector.x + vector2.x, vector.y + vector2.y);
             }
         }
     }
 }