示例#1
0
    //void Start () {
    //textMesh = gameObject.GetComponent<TextMesh>();
    //textMesh.text = "";
    //

    /// <summary>
    /// Complete this instance.
    /// </summary>
    public bool Complete()
    {
        if (!complete && Active)
        {
            complete = true;
            foreach (TriggerableEvent TEvent in Events)
            {
                TEvent.Trigger(subtitleController);
            }
            return(true);
        }
        return(false);
    }
示例#2
0
    //void Start () {
    //textMesh = gameObject.GetComponent<TextMesh>();
    //textMesh.text = "";
    //

    /// <summary>
    /// Complete this instance.
    /// </summary>
    public bool Complete()
    {
        if (!complete && Active)
        {
            if (!Reuseable)
            {
                complete = true;
            }
            foreach (TriggerableEvent TEvent in Events)
            {
                TEvent.Trigger(subtitleController);
            }
            if (transform.FindChild("ObjectiveMarker") != null)
            {
                transform.FindChild("ObjectiveMarker").gameObject.renderer.enabled = false;
            }
            return(true);
        }
        return(false);
    }
 public void Trigger(SubtitleController TextDisplay)
 {
     foreach (Detonator explosion in explosions)
     {
         if (explosion != null)
         {
             explosion.Explode();
         }
     }
     foreach (TriggerableEvent TEvent in events)
     {
         TEvent.Trigger(TextDisplay);
     }
     if (sound != null && soundSource != null)
     {
         soundSource.PlayOneShot(sound);
     }
     if (showText)
     {
         TextDisplay.setLines(Text);
     }
 }
示例#4
0
    public void Trigger(SubtitleController TextDisplay)
    {
        foreach (ExplosiveDamage explosion in explosions)
        {
            if (explosion != null)
            {
                explosion.explode(TextDisplay);
            }
            try {
                if (explosion.GetComponent <Detonator>() != null)
                {
                    explosion.GetComponent <Detonator>().Explode();
                }
            } catch (SystemException e) {
                Debug.LogError("Explosion Failed. DAMNIT IT!");
                Debug.LogError(e.ToString());
            }
        }


        if (QTSEController != null)
        {
            QTSEController.Queue(Spam);
        }
        if (sound != null && soundSource != null)
        {
            soundSource.PlayOneShot(sound);
        }
        if (showText)
        {
            TextDisplay.setLines(Text);
        }
        if (instantiableObject != null)
        {
            for (int i = 0; i < number; i++)
            {
                MonoBehaviour.Instantiate(instantiableObject, (UnityEngine.Random.value * tolerance) + place, new Quaternion(0, 0, 0, 1));
            }
        }

        if (radioWriteStyle == editSettings.append)
        {
            foreach (AudioClip clip in RadioSounds)
            {
                radio.clips.Add(clip);
            }
        }
        if (radioWriteStyle == editSettings.overwrite)
        {
            radio.clips = RadioSounds;
        }
        foreach (DoorControl d in doors)
        {
            d.d.setState(d.open);
        }
        foreach (ObjectManipulation OM in OMs)
        {
            OM.use();
        }
        foreach (UniqueEffect ue in UE)
        {
            ue.trigger();
        }
        foreach (TriggerableEvent TEvent in events)
        {
            TEvent.Trigger(TextDisplay);
        }
    }