Browse Source

Fixed whitespaces

master
FeniXb3 9 years ago
parent
commit
82527b84b8
  1. 16
      Assets/Fungus/Narrative/Editor/CharacterEditor.cs
  2. 16
      Assets/Fungus/Narrative/Scripts/Character.cs
  3. 12
      Assets/Fungus/Narrative/Scripts/Commands/Say.cs

16
Assets/Fungus/Narrative/Editor/CharacterEditor.cs

@ -16,9 +16,9 @@ namespace Fungus
protected SerializedProperty portraitsProp; protected SerializedProperty portraitsProp;
protected SerializedProperty portraitsFaceProp; protected SerializedProperty portraitsFaceProp;
protected SerializedProperty descriptionProp; protected SerializedProperty descriptionProp;
protected SerializedProperty setSayDialogProp; protected SerializedProperty setSayDialogProp;
protected virtual void OnEnable() protected virtual void OnEnable()
{ {
nameTextProp = serializedObject.FindProperty ("nameText"); nameTextProp = serializedObject.FindProperty ("nameText");
nameColorProp = serializedObject.FindProperty ("nameColor"); nameColorProp = serializedObject.FindProperty ("nameColor");
@ -26,8 +26,8 @@ namespace Fungus
portraitsProp = serializedObject.FindProperty ("portraits"); portraitsProp = serializedObject.FindProperty ("portraits");
portraitsFaceProp = serializedObject.FindProperty ("portraitsFace"); portraitsFaceProp = serializedObject.FindProperty ("portraitsFace");
descriptionProp = serializedObject.FindProperty ("description"); descriptionProp = serializedObject.FindProperty ("description");
setSayDialogProp = serializedObject.FindProperty("setSayDialog"); setSayDialogProp = serializedObject.FindProperty("setSayDialog");
} }
public override void OnInspectorGUI() public override void OnInspectorGUI()
{ {
@ -38,11 +38,11 @@ namespace Fungus
EditorGUILayout.PropertyField(nameTextProp, new GUIContent("Name Text", "Name of the character display in the dialog")); EditorGUILayout.PropertyField(nameTextProp, new GUIContent("Name Text", "Name of the character display in the dialog"));
EditorGUILayout.PropertyField(nameColorProp, new GUIContent("Name Color", "Color of name text display in the dialog")); EditorGUILayout.PropertyField(nameColorProp, new GUIContent("Name Color", "Color of name text display in the dialog"));
EditorGUILayout.PropertyField(soundEffectProp, new GUIContent("Sound Effect", "Sound to play when the character is talking. Overrides the setting in the Dialog.")); EditorGUILayout.PropertyField(soundEffectProp, new GUIContent("Sound Effect", "Sound to play when the character is talking. Overrides the setting in the Dialog."));
EditorGUILayout.PropertyField(setSayDialogProp); EditorGUILayout.PropertyField(setSayDialogProp);
EditorGUILayout.PropertyField(descriptionProp, new GUIContent("Description", "Notes about this story character (personality, attibutes, etc.)")); EditorGUILayout.PropertyField(descriptionProp, new GUIContent("Description", "Notes about this story character (personality, attibutes, etc.)"));
if (t.portraits != null && if (t.portraits != null &&
t.portraits.Count > 0) t.portraits.Count > 0)
{ {
t.profileSprite = t.portraits[0]; t.profileSprite = t.portraits[0];
} }

16
Assets/Fungus/Narrative/Scripts/Character.cs

@ -15,13 +15,13 @@ namespace Fungus
public AudioClip soundEffect; public AudioClip soundEffect;
public Sprite profileSprite; public Sprite profileSprite;
public List<Sprite> portraits; public List<Sprite> portraits;
public FacingDirection portraitsFace; public FacingDirection portraitsFace;
public PortraitState state; public PortraitState state;
[Tooltip("Sets the active Say dialog with a reference to a Say Dialog object in the scene. All story text will now display using this Say Dialog.")]
public SayDialog setSayDialog;
[FormerlySerializedAs("notes")] [Tooltip("Sets the active Say dialog with a reference to a Say Dialog object in the scene. All story text will now display using this Say Dialog.")]
public SayDialog setSayDialog;
[FormerlySerializedAs("notes")]
[TextArea(5,10)] [TextArea(5,10)]
public string description; public string description;
@ -34,7 +34,7 @@ namespace Fungus
activeCharacters.Add(this); activeCharacters.Add(this);
} }
} }
protected virtual void OnDisable() protected virtual void OnDisable()
{ {
activeCharacters.Remove(this); activeCharacters.Remove(this);
@ -43,7 +43,7 @@ namespace Fungus
// //
// ILocalizable implementation // ILocalizable implementation
// //
public virtual string GetStandardText() public virtual string GetStandardText()
{ {
return nameText; return nameText;
@ -58,7 +58,7 @@ namespace Fungus
{ {
return description; return description;
} }
public virtual string GetStringId() public virtual string GetStringId()
{ {
// String id for character names is CHARACTER.<Character Name> // String id for character names is CHARACTER.<Character Name>

12
Assets/Fungus/Narrative/Scripts/Commands/Say.cs

@ -57,13 +57,13 @@ namespace Fungus
executionCount++; executionCount++;
// Override the active say dialog if needed // Override the active say dialog if needed
if (character != null && character.setSayDialog != null) if (character != null && character.setSayDialog != null)
{ {
SayDialog.activeSayDialog = character.setSayDialog; SayDialog.activeSayDialog = character.setSayDialog;
} }
if (setSayDialog != null) if (setSayDialog != null)
{ {
SayDialog.activeSayDialog = setSayDialog; SayDialog.activeSayDialog = setSayDialog;
} }

Loading…
Cancel
Save