Advertisement
Guest User

Untitled

a guest
May 29th, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1.  
  2. using UnityEngine;
  3. using System.Collections;
  4.  
  5. #if UNITY_EDITOR
  6. using UnityEditor;
  7. #endif
  8.  
  9. namespace AC
  10. {
  11.  
  12.  
  13.  
  14. [System.Serializable]
  15. public class ChangeNarrationTextSound : Action
  16. {
  17.  
  18. public string CharacterNarrating = null;
  19.  
  20. public ChangeNarrationTextSound ()
  21. {
  22. this.isDisplayed = true;
  23. category = ActionCategory.Custom;
  24. title = "Change Narration Text Sound";
  25. description = "Changes the sound used when generating narration text.";
  26. }
  27.  
  28. override public float Run ()
  29. {
  30.  
  31. string CharacterNarrating = param AudioClip AC.KickStarter.speechManager.narrationTextScrollClip;
  32.  
  33. if (CharacterNarrating = "Sarah")
  34. {
  35. param AudioClip AC.KickStarter.speechManager.narrationTextScrollClip = SarahNarrator.ogg
  36. }
  37.  
  38. if (CharacterNarrating = "Arthur")
  39. {
  40. param AudioClip AC.KickStarter.speechManager.narrationTextScrollClip = ArthurNarrator.ogg
  41. }
  42.  
  43. else
  44. {
  45. isRunning = false;
  46. return 0f;
  47. }
  48. }
  49.  
  50.  
  51. #if UNITY_EDITOR
  52.  
  53. override public void ShowGUI ()
  54. {
  55. AfterRunningOption ();
  56. }
  57.  
  58.  
  59. public override string SetLabel ()
  60. {
  61.  
  62. string labelAdd = "";
  63. return labelAdd;
  64. }
  65.  
  66. #endif
  67.  
  68. }
  69.  
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement