Ejemplo n.º 1
0
    private IEnumerator ReloadLevel(TimedObjectActivator.Entry entry)
    {
        yield return(new WaitForSeconds(entry.delay));

        Application.LoadLevel(Application.loadedLevel);
        yield break;
    }
Ejemplo n.º 2
0
    private IEnumerator Deactivate(TimedObjectActivator.Entry entry)
    {
        yield return(new WaitForSeconds(entry.delay));

        entry.target.SetActive(false);
        yield break;
    }
Ejemplo n.º 3
0
    private void Awake()
    {
        TimedObjectActivator.Entry[] array = this.entries.entries;
        for (int i = 0; i < array.Length; i++)
        {
            TimedObjectActivator.Entry entry = array[i];
            switch (entry.action)
            {
            case TimedObjectActivator.Action.Activate:
                base.StartCoroutine(this.Activate(entry));
                break;

            case TimedObjectActivator.Action.Deactivate:
                base.StartCoroutine(this.Deactivate(entry));
                break;

            case TimedObjectActivator.Action.Destroy:
                UnityEngine.Object.Destroy(entry.target, entry.delay);
                break;

            case TimedObjectActivator.Action.ReloadLevel:
                base.StartCoroutine(this.ReloadLevel(entry));
                break;
            }
        }
    }
Ejemplo n.º 4
0
 private IEnumerator Activate(TimedObjectActivator.Entry entry)
 {
     TimedObjectActivator.< Activate > c__Iterator125 <Activate> c__Iterator = new TimedObjectActivator.< Activate > c__Iterator125();