Browse Source

Added audiosource component directly to audio custom tags #84

This avoids having to maintain 2 game objects for every custom tagged
audio effect.
master
chrisgregan 10 years ago
parent
commit
422fa05dfa
  1. 13
      Assets/Fungus/Dialog/Editor/DialogMenuItems.cs
  2. 116
      Assets/Fungus/Dialog/Resources/FungusAudioTag.prefab
  3. 4
      Assets/Fungus/Dialog/Resources/FungusAudioTag.prefab.meta
  4. 1
      Assets/Fungus/Dialog/Resources/FungusCharacter.prefab
  5. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Angry.wav
  6. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Angry.wav.meta
  7. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Annoyed.wav
  8. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Annoyed.wav.meta
  9. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Answer.wav
  10. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Answer.wav.meta
  11. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Clue.wav
  12. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Clue.wav.meta
  13. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Confused.wav
  14. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Confused.wav.meta
  15. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Furious.wav
  16. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Furious.wav.meta
  17. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Pleased.wav
  18. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Pleased.wav.meta
  19. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Question.wav
  20. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Question.wav.meta
  21. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Realize.wav
  22. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Realize.wav.meta
  23. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Scared.wav
  24. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Scared.wav.meta
  25. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Shocked.wav
  26. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Shocked.wav.meta
  27. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Shout.wav
  28. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Shout.wav.meta
  29. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Worried.wav
  30. 0
      Assets/FungusExamples/Sherlock/Audio/Emote/Worried.wav.meta
  31. 0
      Assets/FungusExamples/Sherlock/Audio/GUI/Paper.wav
  32. 0
      Assets/FungusExamples/Sherlock/Audio/GUI/Paper.wav.meta
  33. 0
      Assets/FungusExamples/Sherlock/Audio/GUI/SpeechCheck-Fail.wav
  34. 0
      Assets/FungusExamples/Sherlock/Audio/GUI/SpeechCheck-Fail.wav.meta
  35. 0
      Assets/FungusExamples/Sherlock/Audio/GUI/SpeechCheck-Pass.wav
  36. 0
      Assets/FungusExamples/Sherlock/Audio/GUI/SpeechCheck-Pass.wav.meta
  37. 0
      Assets/FungusExamples/Sherlock/Audio/GUI/Stat-0.wav
  38. 0
      Assets/FungusExamples/Sherlock/Audio/GUI/Stat-0.wav.meta
  39. 0
      Assets/FungusExamples/Sherlock/Audio/GUI/Stat-100.wav
  40. 0
      Assets/FungusExamples/Sherlock/Audio/GUI/Stat-100.wav.meta
  41. 0
      Assets/FungusExamples/Sherlock/Audio/GUI/Stat-Decrease.wav
  42. 0
      Assets/FungusExamples/Sherlock/Audio/GUI/Stat-Decrease.wav.meta
  43. 0
      Assets/FungusExamples/Sherlock/Audio/GUI/Stat-Increase.wav
  44. 0
      Assets/FungusExamples/Sherlock/Audio/GUI/Stat-Increase.wav.meta
  45. 2218
      Assets/FungusExamples/Sherlock/TheExperiment.unity

13
Assets/Fungus/Dialog/Editor/DialogMenuItems.cs

@ -43,7 +43,7 @@ namespace Fungus
} }
[MenuItem("GameObject/Fungus/Dialog/Tag")] [MenuItem("GameObject/Fungus/Dialog/Tag")]
static void CreateTagDialog() static void CreateTag()
{ {
GameObject go = Resources.Load<GameObject>("FungusTag"); GameObject go = Resources.Load<GameObject>("FungusTag");
if (go != null) if (go != null)
@ -53,6 +53,17 @@ namespace Fungus
} }
} }
[MenuItem("GameObject/Fungus/Dialog/AudioTag")]
static void CreateAudioTag()
{
GameObject go = Resources.Load<GameObject>("FungusAudioTag");
if (go != null)
{
GameObject spawnedGO = PrefabUtility.InstantiatePrefab(go) as GameObject;
spawnedGO.name = "AudioTag";
}
}
[MenuItem("GameObject/Fungus/Portrait/Stage")] [MenuItem("GameObject/Fungus/Portrait/Stage")]
static void CreateStage() static void CreateStage()
{ {

116
Assets/Fungus/Dialog/Resources/FungusAudioTag.prefab

@ -0,0 +1,116 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &177196
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 477196}
- 114: {fileID: 11477196}
- 82: {fileID: 8249370}
m_Layer: 0
m_Name: FungusAudioTag
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &477196
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 177196}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!82 &8249370
AudioSource:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 177196}
m_Enabled: 1
serializedVersion: 3
m_audioClip: {fileID: 0}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
--- !u!114 &11477196
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 177196}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 335e04fbdd5260043abb299a991dcbe8, type: 3}
m_Name:
m_EditorClassIdentifier:
tagStartSymbol: '{customName}'
tagEndSymbol: '{/customName}'
replaceTagStartWith: '{color=blue}'
replaceTagEndWith: '{/color}'
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 177196}
m_IsPrefabParent: 1
m_IsExploded: 1

4
Assets/Fungus/Dialog/Resources/FungusAudioTag.prefab.meta

@ -0,0 +1,4 @@
fileFormatVersion: 2
guid: 8a19432eef4e44247949edb78c590f64
NativeFormatImporter:
userData:

1
Assets/Fungus/Dialog/Resources/FungusCharacter.prefab

@ -44,6 +44,7 @@ MonoBehaviour:
soundEffect: {fileID: 0} soundEffect: {fileID: 0}
profileSprite: {fileID: 0} profileSprite: {fileID: 0}
portraits: [] portraits: []
portraitsFace: 0
notes: notes:
--- !u!1001 &100100000 --- !u!1001 &100100000
Prefab: Prefab:

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_angry.wav → Assets/FungusExamples/Sherlock/Audio/Emote/Angry.wav

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_angry.wav.meta → Assets/FungusExamples/Sherlock/Audio/Emote/Angry.wav.meta

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_annoyed.wav → Assets/FungusExamples/Sherlock/Audio/Emote/Annoyed.wav

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_annoyed.wav.meta → Assets/FungusExamples/Sherlock/Audio/Emote/Annoyed.wav.meta

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_answer.wav → Assets/FungusExamples/Sherlock/Audio/Emote/Answer.wav

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_answer.wav.meta → Assets/FungusExamples/Sherlock/Audio/Emote/Answer.wav.meta

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_clue.wav → Assets/FungusExamples/Sherlock/Audio/Emote/Clue.wav

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_clue.wav.meta → Assets/FungusExamples/Sherlock/Audio/Emote/Clue.wav.meta

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_confused.wav → Assets/FungusExamples/Sherlock/Audio/Emote/Confused.wav

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_confused.wav.meta → Assets/FungusExamples/Sherlock/Audio/Emote/Confused.wav.meta

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_furious.wav → Assets/FungusExamples/Sherlock/Audio/Emote/Furious.wav

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_furious.wav.meta → Assets/FungusExamples/Sherlock/Audio/Emote/Furious.wav.meta

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_pleased.wav → Assets/FungusExamples/Sherlock/Audio/Emote/Pleased.wav

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_pleased.wav.meta → Assets/FungusExamples/Sherlock/Audio/Emote/Pleased.wav.meta

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_question.wav → Assets/FungusExamples/Sherlock/Audio/Emote/Question.wav

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_question.wav.meta → Assets/FungusExamples/Sherlock/Audio/Emote/Question.wav.meta

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_realize.wav → Assets/FungusExamples/Sherlock/Audio/Emote/Realize.wav

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_realize.wav.meta → Assets/FungusExamples/Sherlock/Audio/Emote/Realize.wav.meta

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_scared.wav → Assets/FungusExamples/Sherlock/Audio/Emote/Scared.wav

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_scared.wav.meta → Assets/FungusExamples/Sherlock/Audio/Emote/Scared.wav.meta

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_shocked.wav → Assets/FungusExamples/Sherlock/Audio/Emote/Shocked.wav

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_shocked.wav.meta → Assets/FungusExamples/Sherlock/Audio/Emote/Shocked.wav.meta

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_shout.wav → Assets/FungusExamples/Sherlock/Audio/Emote/Shout.wav

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_shout.wav.meta → Assets/FungusExamples/Sherlock/Audio/Emote/Shout.wav.meta

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_worried.wav → Assets/FungusExamples/Sherlock/Audio/Emote/Worried.wav

0
Assets/FungusExamples/Sherlock/audio/emote/EMOTE_worried.wav.meta → Assets/FungusExamples/Sherlock/Audio/Emote/Worried.wav.meta

0
Assets/FungusExamples/Sherlock/audio/gui/UI_Paper.wav → Assets/FungusExamples/Sherlock/Audio/GUI/Paper.wav

0
Assets/FungusExamples/Sherlock/audio/gui/UI_Paper.wav.meta → Assets/FungusExamples/Sherlock/Audio/GUI/Paper.wav.meta

0
Assets/FungusExamples/Sherlock/audio/gui/UI_SpeechCheck-Fail.wav → Assets/FungusExamples/Sherlock/Audio/GUI/SpeechCheck-Fail.wav

0
Assets/FungusExamples/Sherlock/audio/gui/UI_SpeechCheck-Fail.wav.meta → Assets/FungusExamples/Sherlock/Audio/GUI/SpeechCheck-Fail.wav.meta

0
Assets/FungusExamples/Sherlock/audio/gui/UI_SpeechCheck-Pass.wav → Assets/FungusExamples/Sherlock/Audio/GUI/SpeechCheck-Pass.wav

0
Assets/FungusExamples/Sherlock/audio/gui/UI_SpeechCheck-Pass.wav.meta → Assets/FungusExamples/Sherlock/Audio/GUI/SpeechCheck-Pass.wav.meta

0
Assets/FungusExamples/Sherlock/audio/gui/UI_Stat-0.wav → Assets/FungusExamples/Sherlock/Audio/GUI/Stat-0.wav

0
Assets/FungusExamples/Sherlock/audio/gui/UI_Stat-0.wav.meta → Assets/FungusExamples/Sherlock/Audio/GUI/Stat-0.wav.meta

0
Assets/FungusExamples/Sherlock/audio/gui/UI_Stat-100.wav → Assets/FungusExamples/Sherlock/Audio/GUI/Stat-100.wav

0
Assets/FungusExamples/Sherlock/audio/gui/UI_Stat-100.wav.meta → Assets/FungusExamples/Sherlock/Audio/GUI/Stat-100.wav.meta

0
Assets/FungusExamples/Sherlock/audio/gui/UI_Stat-Decrease.wav → Assets/FungusExamples/Sherlock/Audio/GUI/Stat-Decrease.wav

0
Assets/FungusExamples/Sherlock/audio/gui/UI_Stat-Decrease.wav.meta → Assets/FungusExamples/Sherlock/Audio/GUI/Stat-Decrease.wav.meta

0
Assets/FungusExamples/Sherlock/audio/gui/UI_Stat-Increase.wav → Assets/FungusExamples/Sherlock/Audio/GUI/Stat-Increase.wav

0
Assets/FungusExamples/Sherlock/audio/gui/UI_Stat-Increase.wav.meta → Assets/FungusExamples/Sherlock/Audio/GUI/Stat-Increase.wav.meta

2218
Assets/FungusExamples/Sherlock/TheExperiment.unity

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save