Browse Source

Refactored image names. Added character name fallback.

master
chrisgregan 11 years ago
parent
commit
dc8af573d4
  1. BIN
      Assets/Example/Scenes/Example.unity
  2. 0
      Assets/Example/Sprites/Ciara.psd
  3. 1
      Assets/Example/Sprites/Ciara.psd.meta
  4. 0
      Assets/Example/Sprites/CiaraHead.psd
  5. 1
      Assets/Example/Sprites/CiaraHead.psd.meta
  6. 0
      Assets/Example/Sprites/Shay.psd
  7. 1
      Assets/Example/Sprites/Shay.psd.meta
  8. 0
      Assets/Example/Sprites/ShayHead.psd
  9. 1
      Assets/Example/Sprites/ShayHead.psd.meta
  10. 0
      Assets/Example/Sprites/SkipperHead.psd
  11. 1
      Assets/Example/Sprites/SkipperHead.psd.meta
  12. 2
      Assets/Fungus/Dialog/Editor/CharacterEditor.cs
  13. 10
      Assets/Fungus/Dialog/Scripts/Dialog.cs

BIN
Assets/Example/Scenes/Example.unity

Binary file not shown.

0
Assets/Example/Sprites/UrchinGirl.psd → Assets/Example/Sprites/Ciara.psd

1
Assets/Example/Sprites/UrchinGirl.psd.meta → Assets/Example/Sprites/Ciara.psd.meta

@ -3,6 +3,7 @@ guid: c784f0adc2ce544be915fc26a2b4b510
TextureImporter:
fileIDToRecycleName:
21300000: UrchinGirl
21300002: Ciara
serializedVersion: 2
mipmaps:
mipMapMode: 0

0
Assets/Example/Sprites/UrchinGirlProfile.psd → Assets/Example/Sprites/CiaraHead.psd

1
Assets/Example/Sprites/UrchinGirlProfile.psd.meta → Assets/Example/Sprites/CiaraHead.psd.meta

@ -3,6 +3,7 @@ guid: 05ccd53483a554ca9b31f685fa76154a
TextureImporter:
fileIDToRecycleName:
21300000: UrchinGirlProfile
21300002: CiaraHead
serializedVersion: 2
mipmaps:
mipMapMode: 0

0
Assets/Example/Sprites/Roamer.psd → Assets/Example/Sprites/Shay.psd

1
Assets/Example/Sprites/Roamer.psd.meta → Assets/Example/Sprites/Shay.psd.meta

@ -3,6 +3,7 @@ guid: 6b100daff28d04f69a49015f83966425
TextureImporter:
fileIDToRecycleName:
21300000: Roamer
21300002: Shay
serializedVersion: 2
mipmaps:
mipMapMode: 0

0
Assets/Example/Sprites/RoamerProfile.psd → Assets/Example/Sprites/ShayHead.psd

1
Assets/Example/Sprites/RoamerProfile.psd.meta → Assets/Example/Sprites/ShayHead.psd.meta

@ -3,6 +3,7 @@ guid: f7484a661774243b193bebc6e3ae5120
TextureImporter:
fileIDToRecycleName:
21300000: RoamerProfile
21300002: ShayHead
serializedVersion: 2
mipmaps:
mipMapMode: 0

0
Assets/Example/Sprites/SkipperProfile.psd → Assets/Example/Sprites/SkipperHead.psd

1
Assets/Example/Sprites/SkipperProfile.psd.meta → Assets/Example/Sprites/SkipperHead.psd.meta

@ -3,6 +3,7 @@ guid: 3c64e30cbefbe4e768ef68d85c85061e
TextureImporter:
fileIDToRecycleName:
21300000: SkipperProfile
21300002: SkipperHead
serializedVersion: 2
mipmaps:
mipMapMode: 0

2
Assets/Fungus/Dialog/Editor/CharacterEditor.cs

@ -34,7 +34,7 @@ namespace Fungus.Script
string characterName = EditorGUILayout.TextField(new GUIContent("Name Text", "Name of the character display in the dialog"),
t.characterName);
Color characterColor = EditorGUILayout.ColorField(new GUIContent("Text Color", "Color of name text display in the dialog"),
Color characterColor = EditorGUILayout.ColorField(new GUIContent("Name Color", "Color of name text display in the dialog"),
t.characterColor);
Sprite characterImage = EditorGUILayout.ObjectField(new GUIContent("Image", "Character image sprite to display in the dialog"),

10
Assets/Fungus/Dialog/Scripts/Dialog.cs

@ -72,7 +72,15 @@ namespace Fungus.Script
else
{
SetCharacterImage(character.characterImage);
SetCharacterName(character.name, character.characterColor);
string characterName = character.characterName;
if (characterName == "")
{
// Use game object name as default
characterName = character.name;
}
SetCharacterName(characterName, character.characterColor);
}
}

Loading…
Cancel
Save