added ambient/jingles for weather. Fixed kingbumper

This commit is contained in:
Kazinski 2022-05-01 16:56:29 -05:00
parent 2724ceffb1
commit 97dd7735dd
4 changed files with 26 additions and 9 deletions

View File

@ -100,7 +100,7 @@ MonoBehaviour:
target: {x: 0, y: 0, z: 0}
isLive: 0
dir: {x: 0, y: 0, z: 0}
speed: 135
speed: 150
bumpPower: 25
--- !u!114 &2287528990630677962
MonoBehaviour:

View File

@ -67376,6 +67376,14 @@ PrefabInstance:
propertyPath: m_Name
value: WeatherWheel
objectReference: {fileID: 0}
- target: {fileID: 6861462054085696516, guid: cb8332a22eb05c44686906967b43b48a, type: 3}
propertyPath: RainAmbi
value:
objectReference: {fileID: 980634330}
- target: {fileID: 6861462054085696516, guid: cb8332a22eb05c44686906967b43b48a, type: 3}
propertyPath: windAmbi
value:
objectReference: {fileID: 994807984}
- target: {fileID: 6861462054085696516, guid: cb8332a22eb05c44686906967b43b48a, type: 3}
propertyPath: fogJingle
value:
@ -147993,7 +148001,7 @@ AudioSource:
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 1bc9d8dad6d9ced4a8fe887d5521196f, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Volume: 0.65
m_Pitch: 1
Loop: 0
Mute: 0
@ -154968,7 +154976,7 @@ AudioSource:
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: a6abd788f7a7ded498e53e1778ee151f, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Volume: 0.65
m_Pitch: 1
Loop: 0
Mute: 0
@ -203437,7 +203445,7 @@ AudioSource:
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 7f227bc6a7115b2468188c5f89a58ffa, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Volume: 0.8
m_Pitch: 1
Loop: 0
Mute: 0
@ -311365,7 +311373,7 @@ AudioSource:
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 40e71d8bd1a193f4ca1fd7928c1b6e5d, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Volume: 0.8
m_Pitch: 1
Loop: 0
Mute: 0

View File

@ -17,6 +17,12 @@ public class WeatherWheel : NetworkBehaviour {
private float weatherDuration = 20f;
private float postWeatherCooldown = 10f;
public AudioSource snowJingle;
public AudioSource fogJingle;
public AudioSource RainAmbi;
public AudioSource windAmbi;
void Start() {
gameObject.GetComponent<Image>().enabled = false;
pointer.SetActive(false);
@ -84,7 +90,7 @@ public class WeatherWheel : NetworkBehaviour {
{
// Snow
SpawnWeatherServerRPC(PlayerStats.Weather.Snow);
snowJingle.Play();
// Set angle back to centered
transform.localRotation = Quaternion.Euler(0, 0, 90);
}
@ -100,7 +106,7 @@ public class WeatherWheel : NetworkBehaviour {
{
// Fog
SpawnWeatherServerRPC(PlayerStats.Weather.Fog);
fogJingle.Play();
// Set angle back to centered
transform.localRotation = Quaternion.Euler(0, 0, 270);
}
@ -118,7 +124,8 @@ public class WeatherWheel : NetworkBehaviour {
// Stop weather after duration
StopWeatherServerRPC();
RainAmbi.Stop();
windAmbi.Stop();
// Post weather cool down
for (int i = 0; i < postWeatherCooldown; i++) {
yield return new WaitForSecondsRealtime(1f);
@ -156,6 +163,7 @@ public class WeatherWheel : NetworkBehaviour {
foreach(GameObject go in Rains) {
go.GetComponent<ParticleSystem>().Play();
}
RainAmbi.Play();
break;
case PlayerStats.Weather.Snow:
GameObject[] Snows = GameObject.FindGameObjectsWithTag("SnowSystem");
@ -171,6 +179,7 @@ public class WeatherWheel : NetworkBehaviour {
// Also store the wind direction
go.GetComponent<WindDirection>().windDireciton = windDir;
}
windAmbi.Play();
break;
case PlayerStats.Weather.Fog:
GameObject[] Fogs = GameObject.FindGameObjectsWithTag("FogSystem");

View File

@ -27,7 +27,7 @@ EditorUserSettings:
value: 22424703114646680e0b0227036c6f1f05033f2b212d68252320092a
flags: 0
RecentlyUsedScenePath-7:
value: 22424703114646680e0b0227036c78111b125507233d28242c20137df7ee3d2cfb
value: 22424703114646680e0b0227036c6f1f05033f2b212d68252320092a
flags: 0
RecentlyUsedScenePath-8:
value: 22424703114646680e0b0227036c6f02131b172b282d347e38271427fb