diff --git a/Assets/Models/boat.blend b/Assets/Models/boat.blend index 86a3bab..5dbfc1f 100644 Binary files a/Assets/Models/boat.blend and b/Assets/Models/boat.blend differ diff --git a/Assets/Models/boat.blend1 b/Assets/Models/boat.blend1 index 2a83809..86a3bab 100644 Binary files a/Assets/Models/boat.blend1 and b/Assets/Models/boat.blend1 differ diff --git a/Assets/Scripts/DayManager.cs b/Assets/Scripts/DayManager.cs index 42b75b6..0e682e8 100644 --- a/Assets/Scripts/DayManager.cs +++ b/Assets/Scripts/DayManager.cs @@ -5,6 +5,11 @@ using UnityEngine; public class DayManager : MonoBehaviour { public int sunSpeed = 30; + private bool night = false; + + public AudioSource mainSource = new AudioSource(); + public AudioClip dayClip; + public AudioClip nigtClip; // Start is called before the first frame update void Start() @@ -15,6 +20,23 @@ public class DayManager : MonoBehaviour // Update is called once per frame void Update() { + float sunRotationX = transform.localEulerAngles.x; + sunRotationX = (sunRotationX > 180) ? sunRotationX - 360 : sunRotationX; + + Debug.Log(sunRotationX.ToString()); + if (sunRotationX < 0 && !night) + { + Debug.Log("It is a Night"); + mainSource.PlayOneShot(nigtClip); + night = true; + } + else if (sunRotationX > 0 && night) + { + Debug.Log("It is a Day"); + mainSource.PlayOneShot(dayClip); + night = false; + } + this.gameObject.transform.Rotate(new Vector3(sunSpeed * Time.deltaTime, 0, 0)); } diff --git a/Assets/Sounds/.gitkeep b/Assets/Sounds/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Assets/Sounds/GGJ20 Night theme Basses.wav b/Assets/Sounds/GGJ20 Night theme Basses.wav new file mode 100644 index 0000000..914aaef Binary files /dev/null and b/Assets/Sounds/GGJ20 Night theme Basses.wav differ diff --git a/Assets/Sounds/GGJ20 Night theme Drums.wav b/Assets/Sounds/GGJ20 Night theme Drums.wav new file mode 100644 index 0000000..c373082 Binary files /dev/null and b/Assets/Sounds/GGJ20 Night theme Drums.wav differ diff --git a/Assets/Sounds/GGJ20 Night theme Glitch.wav b/Assets/Sounds/GGJ20 Night theme Glitch.wav new file mode 100644 index 0000000..3518002 Binary files /dev/null and b/Assets/Sounds/GGJ20 Night theme Glitch.wav differ diff --git a/Assets/Sounds/GGJ20 Night theme Synths.wav b/Assets/Sounds/GGJ20 Night theme Synths.wav new file mode 100644 index 0000000..038ce8f Binary files /dev/null and b/Assets/Sounds/GGJ20 Night theme Synths.wav differ diff --git a/Assets/Sounds/GGJ20 Night theme all tracks.wav b/Assets/Sounds/GGJ20 Night theme all tracks.wav new file mode 100644 index 0000000..b6e86fc Binary files /dev/null and b/Assets/Sounds/GGJ20 Night theme all tracks.wav differ diff --git a/Assets/Sounds/Kill01Mix.wav b/Assets/Sounds/Kill01Mix.wav new file mode 100644 index 0000000..562080a Binary files /dev/null and b/Assets/Sounds/Kill01Mix.wav differ diff --git a/Assets/Sounds/Kill02Mix.wav b/Assets/Sounds/Kill02Mix.wav new file mode 100644 index 0000000..abac7f2 Binary files /dev/null and b/Assets/Sounds/Kill02Mix.wav differ diff --git a/Assets/Sounds/Kill03Mix.wav b/Assets/Sounds/Kill03Mix.wav new file mode 100644 index 0000000..e6b8274 Binary files /dev/null and b/Assets/Sounds/Kill03Mix.wav differ diff --git a/Assets/Sounds/Rooster.wav b/Assets/Sounds/Rooster.wav new file mode 100644 index 0000000..00f0da0 Binary files /dev/null and b/Assets/Sounds/Rooster.wav differ diff --git a/Assets/Sounds/Shotgun01.wav b/Assets/Sounds/Shotgun01.wav new file mode 100644 index 0000000..aec8e0d Binary files /dev/null and b/Assets/Sounds/Shotgun01.wav differ diff --git a/Assets/Sounds/Shotgun02.wav b/Assets/Sounds/Shotgun02.wav new file mode 100644 index 0000000..6058e07 Binary files /dev/null and b/Assets/Sounds/Shotgun02.wav differ diff --git a/Assets/Sounds/Shotgun03.wav b/Assets/Sounds/Shotgun03.wav new file mode 100644 index 0000000..e767473 Binary files /dev/null and b/Assets/Sounds/Shotgun03.wav differ diff --git a/Assets/Sounds/Shotgun04.wav b/Assets/Sounds/Shotgun04.wav new file mode 100644 index 0000000..452352a Binary files /dev/null and b/Assets/Sounds/Shotgun04.wav differ diff --git a/Assets/Sounds/Wolf.wav b/Assets/Sounds/Wolf.wav new file mode 100644 index 0000000..a31c138 Binary files /dev/null and b/Assets/Sounds/Wolf.wav differ diff --git a/Assets/Sprites/Icons/RAW/Spikes.xcf b/Assets/Sprites/Icons/RAW/Spikes.xcf new file mode 100644 index 0000000..c670b96 Binary files /dev/null and b/Assets/Sprites/Icons/RAW/Spikes.xcf differ diff --git a/Assets/Sprites/Icons/Spikes.png b/Assets/Sprites/Icons/Spikes.png new file mode 100644 index 0000000..b75b7c3 Binary files /dev/null and b/Assets/Sprites/Icons/Spikes.png differ