Exemplo n.º 1
0
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         _instance = this;
         HideSubtitle();
     }
 }
Exemplo n.º 2
0
 void Awake()
 {
     levelController = FindObjectOfType <LevelController>();
     alliesList      = new List <Figure>();
     AddAlly(ally1);
     AddAlly(ally2);
     AddAlly(ally3);
     AddAlly(ally4);
     caster        = GetComponent <Figure>();
     coolDownTimer = coolDown;
     sub           = GetComponentInChildren <SubtitleController>();
     //Skill Infos
     skillName   = "Call Backup";
     description = "When cast, call " + alliesList.Count + " allies for "
                   + backupDuration + " seconds at specific position to aid caster on combat";
     castAnimationName = "Throw";
 }
 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);
     }
 }
Exemplo n.º 4
0
 public void explode(SubtitleController STBL)
 {
     TEvent.Trigger(STBL);
     explode();
 }
Exemplo n.º 5
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);
        }
    }
Exemplo n.º 6
0
 public void explode(SubtitleController STBL)
 {
     TEvent.Trigger(STBL);
     explode();
 }
Exemplo n.º 7
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);
        }
    }