Ejemplo n.º 1
0
 private void Trigger()
 {
     hoursRemaining = UnityEngine.Random.Range(minimumHoursBetween, maxmumHoursBetween);
     TriggeredEvent[] components = GetComponents <TriggeredEvent>();
     if (components.Length != 0)
     {
         TriggeredEvent triggeredEvent = components[UnityEngine.Random.Range(0, components.Length)];
         if (!(triggeredEvent == null))
         {
             triggeredEvent.SendMessage("RunEvent", SendMessageOptions.DontRequireReceiver);
         }
     }
 }
Ejemplo n.º 2
0
    private void Trigger()
    {
        this.hoursRemaining = UnityEngine.Random.Range(this.minimumHoursBetween, this.maxmumHoursBetween);
        TriggeredEvent[] components = base.GetComponents <TriggeredEvent>();
        if (components.Length == 0)
        {
            return;
        }
        TriggeredEvent triggeredEvent = components[UnityEngine.Random.Range(0, (int)components.Length)];

        if (triggeredEvent == null)
        {
            return;
        }
        triggeredEvent.SendMessage("RunEvent", SendMessageOptions.DontRequireReceiver);
    }