Advertisement
Guest User

Untitled

a guest
Dec 7th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.16 KB | None | 0 0
  1. public class ActionSay : ActionSpeech
  2. {
  3.     public ActionSay()
  4.     {
  5.         this.isDisplayed = true;
  6.         category = ActionCategory.Custom;
  7.         title = "Say";
  8.         description = "Say by Manifest.CharacterType";
  9.     }
  10.  
  11.     public Manifest.CharacterType manifestSpeaker;
  12.     public string words;
  13.  
  14. #if UNITY_EDITOR
  15.     public override void ShowGUI(List<ActionParameter> parameters)
  16.     {
  17.         manifestSpeaker = (Manifest.CharacterType)EditorGUILayout.EnumPopup("Speaker:", manifestSpeaker);
  18.  
  19.         EditorGUILayout.BeginHorizontal();
  20.         EditorGUILayout.LabelField("Line text:", GUILayout.Width(65f));
  21.         EditorStyles.textField.wordWrap = true;
  22.         words = EditorGUILayout.TextArea(words, GUILayout.MaxWidth(400f));
  23.         EditorGUILayout.EndHorizontal();
  24.  
  25.         AfterRunningOption();
  26.     }
  27. #endif
  28.  
  29.     override public void AssignValues(List<ActionParameter> parameters)
  30.     {
  31.         speaker = CharactersManager.I.FindCharacterByType(manifestSpeaker);
  32.  
  33.         base.AssignValues(parameters);
  34.     }
  35.  
  36.     override public void AssignParentList(ActionList actionList)
  37.     {
  38.         base.AssignParentList(actionList);
  39.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement