private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; HideSubtitle(); } }
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); } }
public void explode(SubtitleController STBL) { TEvent.Trigger(STBL); explode(); }
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); } }
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); } }