add sound files & fix stat bug

master
tigerchen 6 years ago
parent ab7d054959
commit 7eeb994548
  1. 13
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scenes/DarkSea.unity
  2. 14
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/StatManager.cs
  3. 2
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Scripts/tuio_event.cs
  4. BIN
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Sounds/darksea_sound_loop.wav
  5. 22
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Sounds/darksea_sound_loop.wav.meta
  6. BIN
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Sounds/darksea_sound_nohorse.wav
  7. 22
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Sounds/darksea_sound_nohorse.wav.meta
  8. BIN
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Sounds/darksea_sound_withhorse.wav
  9. 22
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Sounds/darksea_sound_withhorse.wav.meta
  10. 2
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Videos/BG.DShowClip.asset
  11. 2
      08_DarkSea/Unity-19050-08-DarkSea/19050-08-DarkSea/Assets/Videos/Horse.DShowClip.asset

@ -328,13 +328,15 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b44ad6717e6ec8641a8aead6800d2fdf, type: 3} m_Script: {fileID: 11500000, guid: b44ad6717e6ec8641a8aead6800d2fdf, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
fade_sec: 1 fade_sec: 0.1
loop_to_trigger: 1 loop_to_trigger: 2
use_horse_sound: 1
idle_player: {fileID: 540220394} idle_player: {fileID: 540220394}
h_player: {fileID: 1232323602} h_player: {fileID: 1232323602}
h_grp: {fileID: 229700563} h_grp: {fileID: 229700563}
s_grp: {fileID: 1191269363} s_grp: {fileID: 1191269363}
horse_clip: {fileID: 8300000, guid: 10adc664ed6fa7641bc9be8e020216cf, type: 3} horse_clip: {fileID: 8300000, guid: 7f663a424351913438835f015d8aa264, type: 3}
no_horse_clip: {fileID: 8300000, guid: c1da6f06eb9f1ca4baa7c6ac35fe6d13, type: 3}
--- !u!4 &388490436 --- !u!4 &388490436
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -359,7 +361,7 @@ AudioSource:
m_Enabled: 1 m_Enabled: 1
serializedVersion: 4 serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0} OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 1320bfe591757af4ca58ba59f1dda347, type: 3} m_audioClip: {fileID: 8300000, guid: afaccb6a8f9a540449985ee7c91957b7, type: 3}
m_PlayOnAwake: 1 m_PlayOnAwake: 1
m_Volume: 1 m_Volume: 1
m_Pitch: 1 m_Pitch: 1
@ -868,10 +870,9 @@ MonoBehaviour:
VisualizeTouches: 0 VisualizeTouches: 0
frame_gap: 30 frame_gap: 30
delta_threshold: 100 delta_threshold: 100
snow_size: 256 snow_size: 512
img_fade_speed: 0.02 img_fade_speed: 0.02
img_wait_sec: 2 img_wait_sec: 2
audio_volume: 1
--- !u!114 &914806967 --- !u!114 &914806967
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

@ -16,18 +16,22 @@ public class StatManager : MonoBehaviour
[Range(1, 10)] [Range(1, 10)]
public int loop_to_trigger = 1; public int loop_to_trigger = 1;
[Config]
public bool use_horse_sound = true;
public DShowMoviePlayer idle_player; public DShowMoviePlayer idle_player;
public DShowMoviePlayer h_player; public DShowMoviePlayer h_player;
public CanvasGroup h_grp; public CanvasGroup h_grp;
public CanvasGroup s_grp; public CanvasGroup s_grp;
public AudioClip horse_clip; public AudioClip horse_clip;
public AudioClip no_horse_clip;
AudioSource aud; AudioSource aud;
int loop_count; int loop_count;
float h_lerp_val; float h_lerp_val;
float s_lerp_val; float s_lerp_val;
float h_total_time = 30f; float h_total_time = 30f;
float i_total_time = 8f; float i_total_time = 30f;
float trigger_time; float trigger_time;
float m_timer; float m_timer;
@ -101,10 +105,14 @@ public class StatManager : MonoBehaviour
} }
else if (m_timer > trigger_time) else if (m_timer > trigger_time)
{ {
aud = gameObject.AddComponent<AudioSource>(); if(aud == null)
aud = gameObject.AddComponent<AudioSource>();
aud.loop = false; aud.loop = false;
aud.playOnAwake = false; aud.playOnAwake = false;
aud.clip = horse_clip; if (use_horse_sound)
aud.clip = horse_clip;
else
aud.clip = no_horse_clip;
aud.Play(); aud.Play();
h_player.Play(); h_player.Play();
//m_timer = 0f; //m_timer = 0f;

@ -70,7 +70,6 @@ public class tuio_event : MonoBehaviour
if (Time.frameCount % frame_gap == 0) if (Time.frameCount % frame_gap == 0)
{ {
var rt = movie.transform as RectTransform; var rt = movie.transform as RectTransform;
//rt.anchoredPosition = touches[id].position;
float delta_pos = Vector2.Distance(pre_pos[id], rt.anchoredPosition); float delta_pos = Vector2.Distance(pre_pos[id], rt.anchoredPosition);
//Debug.Log(delta_pos); //Debug.Log(delta_pos);
if (delta_pos > delta_threshold) if (delta_pos > delta_threshold)
@ -98,6 +97,7 @@ public class tuio_event : MonoBehaviour
movies[id].stat = 3; movies[id].stat = 3;
movies[id].destroy_timer = Time.time; movies[id].destroy_timer = Time.time;
movies.Remove(id); movies.Remove(id);
pre_pos.Remove(id);
} }
} }
} }

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: afaccb6a8f9a540449985ee7c91957b7
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: c1da6f06eb9f1ca4baa7c6ac35fe6d13
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 7f663a424351913438835f015d8aa264
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

@ -13,5 +13,5 @@ MonoBehaviour:
m_Name: BG.DShowClip m_Name: BG.DShowClip
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_VideoLocation: 1 m_VideoLocation: 1
m_VideoPath: ..\..\..\..\_Deploy_PC\08_DarkSea\UnityBuild-19050-08_DarkSea\Material\darksea_loop.avi m_VideoPath: ../../../../_Deploy_PC/08_DarkSea/UnityBuild-19050-08_DarkSea/Material/darksea_loop_nosound.avi
animationClip: {fileID: 0} animationClip: {fileID: 0}

@ -13,5 +13,5 @@ MonoBehaviour:
m_Name: Horse.DShowClip m_Name: Horse.DShowClip
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_VideoLocation: 1 m_VideoLocation: 1
m_VideoPath: ..\..\..\..\_Deploy_PC\08_DarkSea\UnityBuild-19050-08_DarkSea\Material\darksea_nokk_2.avi m_VideoPath: ../../../../_Deploy_PC/08_DarkSea/UnityBuild-19050-08_DarkSea/Material/darksea_nokk_nosound.avi
animationClip: {fileID: 0} animationClip: {fileID: 0}

Loading…
Cancel
Save