diff --git a/Assets/1.TeamWorkspace/Module1/Editor.meta b/Assets/1.TeamWorkspace/Module1/Editor.meta
new file mode 100644
index 00000000..84cf9660
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Module1/Editor.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4ca8ca6442e844608aa823d02b6e7b3d
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Module1/Editor/Module1AudioImport.cs b/Assets/1.TeamWorkspace/Module1/Editor/Module1AudioImport.cs
new file mode 100644
index 00000000..0f608bde
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Module1/Editor/Module1AudioImport.cs
@@ -0,0 +1,30 @@
+using System.IO;
+using UnityEditor;
+using UnityEngine;
+
+///
+/// Import settings for Module 1's sounds in Team Assets/Sound/Module1, so they survive a reimport.
+/// The long ambience streams; the other loops stay compressed in memory; one-shots decompress on load
+/// so they start without a hitch. Everything is preloaded with the scene.
+///
+public class Module1AudioImport : AssetPostprocessor
+{
+ const string Folder = "Assets/1.TeamWorkspace/Team Assets/Sound/Module1/";
+
+ void OnPreprocessAudio()
+ {
+ if (!assetPath.StartsWith(Folder)) return;
+ var importer = (AudioImporter)assetImporter;
+ string name = Path.GetFileNameWithoutExtension(assetPath);
+ bool ambience = name.StartsWith("m1_amb_");
+ bool loop = ambience || name.Contains("dragonfly") || name.Contains("sip_") || name.Contains("drink_") || name.Contains("heartbeat");
+
+ var s = importer.defaultSampleSettings;
+ s.loadType = ambience ? AudioClipLoadType.Streaming : loop ? AudioClipLoadType.CompressedInMemory : AudioClipLoadType.DecompressOnLoad;
+ s.compressionFormat = AudioCompressionFormat.Vorbis;
+ s.quality = 0.6f;
+ s.preloadAudioData = true;
+ importer.defaultSampleSettings = s;
+ importer.loadInBackground = ambience;
+ }
+}
diff --git a/Assets/1.TeamWorkspace/Module1/Editor/Module1AudioImport.cs.meta b/Assets/1.TeamWorkspace/Module1/Editor/Module1AudioImport.cs.meta
new file mode 100644
index 00000000..399db0b9
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Module1/Editor/Module1AudioImport.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 99f7acdf8d10f41dc8704714d5b65ac1
\ No newline at end of file
diff --git a/Assets/1.TeamWorkspace/Module1/GameSystem/StereoSoundListener.cs b/Assets/1.TeamWorkspace/Module1/GameSystem/StereoSoundListener.cs
index 3f7286ea..aaea4781 100644
--- a/Assets/1.TeamWorkspace/Module1/GameSystem/StereoSoundListener.cs
+++ b/Assets/1.TeamWorkspace/Module1/GameSystem/StereoSoundListener.cs
@@ -1,29 +1,44 @@
+using System.Collections.Generic;
using UnityEngine;
+// Hand-made stereo for the 2D sounds out in the world (the cars): louder the closer the mosquito is,
+// panned to the side they are on. The player's own sounds (wing buzz on the camera, rain on the rig)
+// are left alone.
public class StereoSoundListener : MonoBehaviour
{
public AudioSource[] Source;
public float HearimgDistance;
+
+ // Each source's volume as authored: how loud it is right next to the player.
+ private readonly Dictionary _fullVolume = new Dictionary();
+
private void Start()
{
- Source = FindObjectsOfType();
+ var world = new List();
+ foreach (AudioSource source in FindObjectsByType(FindObjectsInactive.Include, FindObjectsSortMode.None))
+ {
+ if (source.transform.IsChildOf(transform.root)) continue;
+ // 3D sources (frogs, dragonflies) are placed by Unity itself.
+ if (source.spatialBlend > 0f) continue;
+ world.Add(source);
+ _fullVolume[source] = source.volume;
+ }
+ Source = world.ToArray();
}
+
+ // Distance only sets the volume. Switching a source off out of range restarted a one-shot clip
+ // every time the player came back, left it silent once it had played through, and fought
+ // MovingCar, which switches a car's sound off while the car waits between passes.
private void Update()
{
foreach (AudioSource source in Source)
{
- float dis = Vector3.Distance(transform.position, source.transform.position);
- if (dis < HearimgDistance)
- {
- source.enabled = true;
- source.volume = Mathf.InverseLerp(HearimgDistance, 0, dis);
- float dir = Vector3.Dot(transform.right, (source.transform.position - transform.position).normalized);
- source.panStereo = dir *= -1;
- }
- else if (dis >= HearimgDistance)
- {
- source.enabled = false;
- }
+ if (source == null) continue;
+ Vector3 toSource = source.transform.position - transform.position;
+ float dis = toSource.magnitude;
+ source.volume = _fullVolume[source] * Mathf.InverseLerp(HearimgDistance, 0, dis);
+ // panStereo +1 is the right ear. This used to be negated, swapping left and right.
+ if (dis > 0.001f) source.panStereo = Vector3.Dot(transform.right, toSource / dis);
}
}
-}
\ No newline at end of file
+}
diff --git a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/DragonflyWings.cs b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/DragonflyWings.cs
new file mode 100644
index 00000000..e49c61a5
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/DragonflyWings.cs
@@ -0,0 +1,36 @@
+using UnityEngine;
+
+///
+/// A dragonfly's wing drone, louder and faster while it is chasing the player, so the threat can be
+/// heard closing in. adds it to every roaming dragonfly.
+///
+public class DragonflyWings : MonoBehaviour
+{
+ AudioSource source;
+ DengerSource hunter;
+ float idleVolume, huntVolume, huntPitch;
+
+ public void Init(Module1SoundBank bank)
+ {
+ hunter = GetComponent();
+ idleVolume = bank.DragonflyVolume;
+ huntVolume = bank.DragonflyHuntVolume;
+ huntPitch = bank.DragonflyHuntPitch;
+ source = Module1Sounds.Make3D(gameObject, bank.MaxDistance);
+ source.clip = bank.DragonflyWings;
+ source.loop = true;
+ source.volume = idleVolume;
+ if (source.clip == null) return;
+ // Each dragonfly starts at a different point in the recording so three of them do not phase.
+ source.time = Random.Range(0f, source.clip.length);
+ source.Play();
+ }
+
+ void Update()
+ {
+ if (source == null) return;
+ bool hunting = hunter != null && hunter.inRange;
+ source.volume = Mathf.MoveTowards(source.volume, hunting ? huntVolume : idleVolume, Time.deltaTime);
+ source.pitch = Mathf.MoveTowards(source.pitch, hunting ? huntPitch : 1f, Time.deltaTime);
+ }
+}
diff --git a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/DragonflyWings.cs.meta b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/DragonflyWings.cs.meta
new file mode 100644
index 00000000..a638da6b
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/DragonflyWings.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: a6f4189e656cd484a97f7893d7eff95d
\ No newline at end of file
diff --git a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/FrogCroaks.cs b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/FrogCroaks.cs
new file mode 100644
index 00000000..a0af085f
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/FrogCroaks.cs
@@ -0,0 +1,41 @@
+using System.Collections;
+using UnityEngine;
+
+///
+/// A frog croaking now and then, in short bouts of one to three croaks, so the player hears where the
+/// frogs (predators) are before seeing them. adds it to every frog.
+///
+public class FrogCroaks : MonoBehaviour
+{
+ public AudioClip[] Clips;
+ public float Volume = 0.35f;
+ public Vector2 Interval = new Vector2(3f, 9f);
+
+ AudioSource source;
+
+ public void Init(Module1SoundBank bank)
+ {
+ Clips = bank.FrogCroaks;
+ Volume = bank.FrogVolume;
+ Interval = bank.FrogInterval;
+ source = Module1Sounds.Make3D(gameObject, bank.MaxDistance);
+ }
+
+ IEnumerator Start()
+ {
+ if (source == null || Clips == null || Clips.Length == 0) yield break;
+ // Out of step with the other frogs from the first croak.
+ yield return new WaitForSeconds(Random.Range(0f, Interval.y));
+ while (true)
+ {
+ int croaks = Random.Range(1, 4);
+ for (int i = 0; i < croaks; i++)
+ {
+ source.pitch = Random.Range(0.9f, 1.1f);
+ source.PlayOneShot(Clips[Random.Range(0, Clips.Length)], Volume);
+ yield return new WaitForSeconds(Random.Range(0.35f, 0.6f));
+ }
+ yield return new WaitForSeconds(Random.Range(Interval.x, Interval.y));
+ }
+ }
+}
diff --git a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/FrogCroaks.cs.meta b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/FrogCroaks.cs.meta
new file mode 100644
index 00000000..1d183dea
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/FrogCroaks.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 2f2ef0ac064f64e77bea769856234032
\ No newline at end of file
diff --git a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/GameManager.cs b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/GameManager.cs
index 017b9f5f..f63a022d 100644
--- a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/GameManager.cs
+++ b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/GameManager.cs
@@ -19,12 +19,16 @@ public class GameManager : MonoBehaviour
public GameObject[] Human;
public WaterContainer[] waterContainers;
public bool IsRain;
+ /// True once the whole clutch is laid: the run is won and ends there (see ).
+ public bool Won;
private void Awake()
{
instance = this;
waterContainers = FindObjectsOfType();
// The in-headset HUD (Module 2 style) is built from code; it hides and mirrors the scene's PlayerUI.
if (GetComponent() == null) gameObject.AddComponent();
+ // Ambience, creatures and feedback sounds are added from code too (clips in Resources/Module1/Module1SoundBank).
+ if (GetComponent() == null) gameObject.AddComponent();
}
private void Start()
@@ -121,6 +125,26 @@ public void TimeOut()
DrinkNectarUI.text = DrinkNectarScore.ToString();
Invoke("RestartAble", 1);
}
+
+ ///
+ /// The player completed the life cycle and laid the full clutch. Called by QuestSystem when the
+ /// egg quest latches, so the run ends there instead of leaving the player to fly around until the
+ /// clock runs out. Shows the time-out score card (Module1HUD swaps in a win title) and, like a
+ /// time-out, the next button press goes back to the start menu rather than into a new life.
+ ///
+ public void Victory()
+ {
+ if (Won || player.Death || player.RestartAble) return;
+ Won = true;
+ CancelInvoke("Settime");
+ if (SaveManager.instance != null && SaveManager.instance.a != null)
+ {
+ // PlayerMain's restart sends a saved time of 0 to the menu.
+ SaveManager.instance.a.time = 0;
+ SaveManager.SavePlayerData(SaveManager.instance.a);
+ }
+ TimeOut();
+ }
public void RestartAble()
{
player.RestartAble = true;
diff --git a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1HUD.cs b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1HUD.cs
index 83d7d413..70eaf8be 100644
--- a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1HUD.cs
+++ b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1HUD.cs
@@ -49,6 +49,9 @@ public class Module1HUD : MonoBehaviour
// The blood warning was only ever a picture with the sentence painted in (Warning2 UI.png).
const string BloodWarningText = "ຕ້ອງການໂປຣຕີນ (ເລືອດ) ດ່ວນ!";
+ // The win (GameManager.Won) had no screen in the scene: "mission complete", built on the quest
+ // card's own title ພາລະກິດ. It replaces the time-out title on the same score card.
+ const string WinTitle = "ພາລະກິດສຳເລັດ!";
// Fallbacks, used only if the scene object they normally come from is missing.
const string EnergyWord = "ພະລັງງານ"; // from PlayerMain.DeathMessage "ພະລັງງານໝົດ"
const string BloodWord = "ເລືອດ"; // from the quest "ດື່ມເລືອດ"
@@ -321,6 +324,9 @@ void UpdateEnd(bool dead, bool timedOut)
}
if (showTimeOut)
{
+ string title = gm.Won ? WinTitle : timeOutTitle ?? "";
+ if (timeOutTitleText.text != title) timeOutTitleText.text = title;
+ timeOutTitleText.color = gm.Won ? doneColor : warnColor;
timeOutValuesText.text = gm.score + "\n" + gm.DrinkNectarScore + "\n" + gm.MatingScore + "\n" + gm.DrinkBloodScore + "\n" + gm.LayEggScore;
}
Fade(deathGroup, showDeath);
diff --git a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1SoundBank.cs b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1SoundBank.cs
new file mode 100644
index 00000000..767d9a5a
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1SoundBank.cs
@@ -0,0 +1,54 @@
+using UnityEngine;
+
+///
+/// Every Module 1 sound that plays, with its volume, in one place so the mix
+/// can be balanced without touching the scene. The team's original three sounds (wing buzz, cars) stay
+/// where they were; the rain clip is taken over from the scene so it can fade.
+///
+/// All clips are CC0 from Freesound - see Team Assets/Sound/Module1/CREDITS.md.
+/// Lives at Resources/Module1/Module1SoundBank.
+///
+[CreateAssetMenu(menuName = "AEDES/Module 1 Sound Bank", fileName = "Module1SoundBank")]
+public class Module1SoundBank : ScriptableObject
+{
+ [Header("Atmosphere (2D, on the player)")]
+ public AudioClip Ambience;
+ [Range(0f, 1f)] public float AmbienceVolume = 0.4f;
+ [Tooltip("Ambience level while it rains, as a fraction of AmbienceVolume: the birds go quiet.")]
+ [Range(0f, 1f)] public float AmbienceDuringRain = 0.5f;
+ [Range(0f, 1f)] public float RainVolume = 0.15f;
+ [Tooltip("Seconds the rain takes to fade in or out.")]
+ public float RainFade = 2.5f;
+
+ [Header("Creatures (3D, fade to silence at MaxDistance like the cars)")]
+ public float MaxDistance = 20f;
+ public AudioClip[] FrogCroaks;
+ [Range(0f, 1f)] public float FrogVolume = 0.35f;
+ [Tooltip("Seconds between a frog's bouts of croaking.")]
+ public Vector2 FrogInterval = new Vector2(3f, 9f);
+ public AudioClip DragonflyWings;
+ [Range(0f, 1f)] public float DragonflyVolume = 0.6f;
+ [Tooltip("Wing volume while the dragonfly is chasing the player.")]
+ [Range(0f, 1f)] public float DragonflyHuntVolume = 1f;
+ [Tooltip("Wing pitch while chasing: faster beats.")]
+ public float DragonflyHuntPitch = 1.25f;
+
+ [Header("Feedback (2D, on the player)")]
+ public AudioClip SipNectar;
+ [Range(0f, 1f)] public float SipNectarVolume = 0.16f;
+ public AudioClip DrinkBlood;
+ [Range(0f, 1f)] public float DrinkBloodVolume = 0.35f;
+ public AudioClip BloodFull;
+ [Range(0f, 1f)] public float BloodFullVolume = 0.5f;
+ public AudioClip Mate;
+ [Range(0f, 1f)] public float MateVolume = 0.32f;
+ public AudioClip LayEgg;
+ [Range(0f, 1f)] public float LayEggVolume = 0.6f;
+ public AudioClip Danger;
+ [Range(0f, 1f)] public float DangerVolume = 0.25f;
+ [Tooltip("Eaten or run over. Not played when the mosquito starves.")]
+ public AudioClip DeathHit;
+ [Range(0f, 1f)] public float DeathHitVolume = 0.5f;
+ public AudioClip DeathSting;
+ [Range(0f, 1f)] public float DeathStingVolume = 0.32f;
+}
diff --git a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1SoundBank.cs.meta b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1SoundBank.cs.meta
new file mode 100644
index 00000000..da718aa5
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1SoundBank.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 35c353276a4ef450ea7fafd49ece1108
\ No newline at end of file
diff --git a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1Sounds.cs b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1Sounds.cs
new file mode 100644
index 00000000..b7603f21
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1Sounds.cs
@@ -0,0 +1,156 @@
+using System.Collections;
+using UnityEngine;
+
+///
+/// Module 1's sounds beyond the team's wing buzz and cars: village ambience, rain that fades, frogs and
+/// dragonflies, and feedback for drinking, mating, laying eggs, danger and death. Built from code so the
+/// scene never has to change; clips and volumes come from .
+///
+/// Feedback is read off PlayerMain and GameManager every frame instead of being called from them, so
+/// the team's scripts stay as they are. GameManager adds this component to itself in Awake.
+///
+public class Module1Sounds : MonoBehaviour
+{
+ const string BankPath = "Module1/Module1SoundBank";
+ /// How fast the feedback loops (sipping, drinking, heartbeat) fade in and out, in seconds.
+ const float LoopFade = 0.15f;
+
+ Module1SoundBank bank;
+ GameManager gm;
+ PlayerMain player;
+ AudioSource ambience, rain, sip, drink, heartbeat, oneShots;
+
+ float lastNectar, lastBlood;
+ int lastEggs;
+ bool wasMate, wasDead;
+
+ void Start()
+ {
+ bank = Resources.Load(BankPath);
+ gm = GameManager.instance;
+ player = gm != null ? gm.player : null;
+ if (bank == null || player == null) { enabled = false; return; }
+
+ // 2D sounds ride on the head, inside the player rig, where StereoSoundListener leaves them alone.
+ Transform head = player.mainCamera != null ? player.mainCamera.transform : player.transform;
+ ambience = Make2D(head, "Ambience", bank.Ambience, true);
+ sip = Make2D(head, "SipNectar", bank.SipNectar, true);
+ drink = Make2D(head, "DrinkBlood", bank.DrinkBlood, true);
+ heartbeat = Make2D(head, "Heartbeat", bank.Danger, true);
+ oneShots = Make2D(head, "Feedback", null, false);
+ // PlayOneShot scales by the source's volume, so this one stays at full; each sound brings its own.
+ oneShots.volume = 1f;
+
+ // The scene's rain sound sits on the Rain object, which GameManager switches on and off, so it
+ // cut in and out at full volume. Take its clip and play it here instead, faded and quieter.
+ AudioSource sceneRain = gm.Rain != null ? gm.Rain.GetComponentInChildren(true) : null;
+ rain = Make2D(head, "Rain", sceneRain != null ? sceneRain.clip : null, true);
+ if (sceneRain != null) sceneRain.enabled = false;
+
+ ambience.volume = bank.AmbienceVolume;
+ if (ambience.clip != null)
+ {
+ // Start somewhere in the recording so every round does not open on the same bird.
+ ambience.time = Random.Range(0f, ambience.clip.length * 0.9f);
+ ambience.Play();
+ }
+
+ foreach (var danger in FindObjectsByType(FindObjectsSortMode.None))
+ {
+ if (danger is DragonFlyRoaminh) danger.gameObject.AddComponent().Init(bank);
+ else danger.gameObject.AddComponent().Init(bank);
+ }
+
+ lastNectar = player.Current_Nec;
+ lastBlood = player.Current_Blood;
+ lastEggs = player.EggLayed;
+ wasMate = player.isMate;
+ }
+
+ void Update()
+ {
+ float dt = Time.deltaTime;
+ bool alive = !player.Death;
+
+ // Rain fades with GameManager's rain window; the birds go quiet while it rains.
+ FadeLoop(rain, gm.IsRain ? bank.RainVolume : 0f, bank.RainVolume / Mathf.Max(0.01f, bank.RainFade) * dt);
+ float ambienceTarget = bank.AmbienceVolume * (gm.IsRain ? bank.AmbienceDuringRain : 1f);
+ ambience.volume = Mathf.MoveTowards(ambience.volume, ambienceTarget, bank.AmbienceVolume * dt / 2f);
+
+ // Feeding: the bars only go up while the player is drinking.
+ bool sipping = alive && player.Current_Nec > lastNectar + 0.0001f;
+ bool drinking = alive && player.Current_Blood > lastBlood + 0.0001f;
+ FadeLoop(sip, sipping ? bank.SipNectarVolume : 0f, bank.SipNectarVolume * dt / LoopFade);
+ FadeLoop(drink, drinking ? bank.DrinkBloodVolume : 0f, bank.DrinkBloodVolume * dt / LoopFade);
+ if (lastBlood < player.Max_Blood && player.Current_Blood >= player.Max_Blood)
+ Play(bank.BloodFull, bank.BloodFullVolume);
+
+ if (player.isMate && !wasMate) Play(bank.Mate, bank.MateVolume);
+ if (player.EggLayed > lastEggs) Play(bank.LayEgg, bank.LayEggVolume);
+
+ bool inDanger = alive && gm.DangerUI != null && gm.DangerUI.activeSelf;
+ FadeLoop(heartbeat, inDanger ? bank.DangerVolume : 0f, bank.DangerVolume * dt / 0.3f);
+
+ if (player.Death && !wasDead) StartCoroutine(Died(starved: player.Current_Nec <= 0f));
+
+ lastNectar = player.Current_Nec;
+ lastBlood = player.Current_Blood;
+ lastEggs = player.EggLayed;
+ wasMate = player.isMate;
+ wasDead = player.Death;
+ }
+
+ IEnumerator Died(bool starved)
+ {
+ if (!starved)
+ {
+ Play(bank.DeathHit, bank.DeathHitVolume);
+ yield return new WaitForSeconds(0.25f);
+ }
+ Play(bank.DeathSting, bank.DeathStingVolume);
+ }
+
+ void Play(AudioClip clip, float volume)
+ {
+ if (clip != null) oneShots.PlayOneShot(clip, volume);
+ }
+
+ /// Moves a looping source towards a volume, starting it on the way up and stopping it at silence.
+ static void FadeLoop(AudioSource s, float target, float step)
+ {
+ if (s.clip == null) return;
+ s.volume = Mathf.MoveTowards(s.volume, target, step);
+ if (s.volume > 0f && !s.isPlaying) s.Play();
+ else if (s.volume <= 0f && s.isPlaying) s.Stop();
+ }
+
+ static AudioSource Make2D(Transform parent, string name, AudioClip clip, bool loop)
+ {
+ var go = new GameObject(name);
+ go.transform.SetParent(parent, false);
+ var s = go.AddComponent();
+ s.clip = clip;
+ s.loop = loop;
+ s.playOnAwake = false;
+ s.spatialBlend = 0f;
+ s.volume = 0f;
+ return s;
+ }
+
+ ///
+ /// A sound out in the world that Unity places itself: louder near, from the side it is on, silent
+ /// beyond (the same 20 m as StereoSoundListener's cars).
+ ///
+ public static AudioSource Make3D(GameObject host, float maxDistance)
+ {
+ var s = host.AddComponent();
+ s.playOnAwake = false;
+ s.spatialBlend = 1f;
+ s.rolloffMode = AudioRolloffMode.Linear;
+ s.minDistance = 1f;
+ s.maxDistance = maxDistance;
+ // These creatures barely move; doppler only warbles the dragonfly as it turns.
+ s.dopplerLevel = 0f;
+ return s;
+ }
+}
diff --git a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1Sounds.cs.meta b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1Sounds.cs.meta
new file mode 100644
index 00000000..ad150f1e
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/Module1Sounds.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: d6fb32481313a48ddad580c09b23b951
\ No newline at end of file
diff --git a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/PlayerMain.cs b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/PlayerMain.cs
index b4804b5b..4304aee0 100644
--- a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/PlayerMain.cs
+++ b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/PlayerMain.cs
@@ -81,8 +81,8 @@ public enum Interaction { None, Flower, Human, Mate, FemaleMosquito, Container }
/// Enough blood left for one more egg. Small tolerance so 4 eggs really fit in one meal.
public bool HasBloodForEgg => Current_Blood >= BloodPerEgg - 0.01f;
- /// Alive, with time left and not on a death / time-out screen.
- public bool Playing => !Death && !RestartAble && GameManager.instance != null && GameManager.instance.time > 0;
+ /// Alive, with time left and not on a death / time-out / win screen.
+ public bool Playing => !Death && !RestartAble && GameManager.instance != null && GameManager.instance.time > 0 && !GameManager.instance.Won;
private bool primaryHeldLastFrame;
/// When A was last pressed, so a press can be honoured slightly before arrival.
diff --git a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/QuestSystem.cs b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/QuestSystem.cs
index 7dd4633d..1e26d1ad 100644
--- a/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/QuestSystem.cs
+++ b/Assets/1.TeamWorkspace/Module1/Module1_Main/Script/QuestSystem.cs
@@ -5,6 +5,9 @@
/// The four life-cycle quests: DrinkNectar -> Mating -> DrinkBlood -> LayEgg. Each one latches:
/// once done it stays green and pays out once, even when a bar drains again later (nectar keeps
/// draining, and laying eggs spends the blood).
+///
+/// Laying the full clutch of eggs is the win: it ends the run
+/// (GameManager.Victory).
///
public class QuestSystem : MonoBehaviour
{
@@ -74,6 +77,7 @@ public void SetQuest()
if (i == 3 && !l)
{
l = true;
+ GameManager.instance.Victory();
}
}
Quest_Text[i].text = (Done(i) ? "" : "") + QuestList[i] + "";
diff --git a/Assets/1.TeamWorkspace/Module1/Scene/Main Scene.unity b/Assets/1.TeamWorkspace/Module1/Scene/Main Scene.unity
index c1de9bbe..524238d9 100644
--- a/Assets/1.TeamWorkspace/Module1/Scene/Main Scene.unity
+++ b/Assets/1.TeamWorkspace/Module1/Scene/Main Scene.unity
@@ -45083,6 +45083,10 @@ PrefabInstance:
propertyPath: m_Name
value: DrivingCar (1)
objectReference: {fileID: 0}
+ - target: {fileID: 1056565930225717058, guid: 09bba727647092746bc2a04c2e46c4ec, type: 3}
+ propertyPath: m_Resource
+ value:
+ objectReference: {fileID: 8300000, guid: e271aa506c9e13c4699d872713f62efc, type: 3}
- target: {fileID: 2794378512566543274, guid: 09bba727647092746bc2a04c2e46c4ec, type: 3}
propertyPath: m_LocalPosition.x
value: 5.35
@@ -90456,7 +90460,7 @@ AudioSource:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2102266609}
- m_Enabled: 0
+ m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1.meta
new file mode 100644
index 00000000..d36dc36e
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 196ac748031874c179880005ddf544b1
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/CREDITS.md b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/CREDITS.md
new file mode 100644
index 00000000..69c0276c
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/CREDITS.md
@@ -0,0 +1,22 @@
+# Module 1 sound credits
+
+All clips are from [Freesound](https://freesound.org), downloaded on 2026-10-06 as Freesound's
+high-quality previews. Every one is licensed **Creative Commons 0** (public domain): no attribution is
+required, but the sources are listed here so they can be traced. The `.wav` files were trimmed,
+loudness-normalised and (for loops) given a crossfaded loop point; `m1_amb_village.ogg` is unchanged.
+
+| File | Used for | Freesound | Author | Licence |
+|---|---|---|---|---|
+| `m1_amb_village.ogg` | Village ambience (2D loop) | [Thailand rural village among bamboo huts nearby birds, occasional bg vehicle.flac](https://freesound.org/people/kyles/sounds/177731/) | kyles | CC0 |
+| `m1_frog_croak_1.wav` | Frog croak | [Frog.ogg](https://freesound.org/people/egomassive/sounds/536759/) | egomassive | CC0 |
+| `m1_frog_croak_2.wav` | Frog croak | [frog_quak.mp3](https://freesound.org/people/katzlbt/sounds/361117/) | katzlbt | CC0 |
+| `m1_frog_croak_3.wav` | Frog croak | [Frog croaking sound effect](https://freesound.org/people/betterchinese/sounds/354132/) | betterchinese | CC0 |
+| `m1_dragonfly_wings.wav` | Dragonfly wings (3D loop) | [Dragonfly.wav](https://freesound.org/people/antoineopeng/sounds/447319/) | antoineopeng | CC0 |
+| `m1_sip_nectar.wav` | Drinking nectar (loop) | [Slurpping_Straw.wav](https://freesound.org/people/kmyers1316/sounds/344593/) | kmyers1316 | CC0 |
+| `m1_drink_blood.wav` | Drinking blood (loop) | [slurping and swallowing2.wav](https://freesound.org/people/squashy555/sounds/239007/) | squashy555 | CC0 |
+| `m1_pop_blood_full.wav` | Blood bar full | [Pop (made by DuffyBro)](https://freesound.org/people/DuffyBro/sounds/319107/) | DuffyBro | CC0 |
+| `m1_mate_sparkle.wav` | Mating | [achievement-sparkle](https://freesound.org/people/SkySpeira/sounds/715067/) | SkySpeira | CC0 |
+| `m1_egg_plop.wav` | Laying an egg | [Plop!](https://freesound.org/people/Breviceps/sounds/447910/) | Breviceps | CC0 |
+| `m1_danger_heartbeat.wav` | Danger (loop) | [Heartbeat 97 BPM](https://freesound.org/people/Cloud-10/sounds/688735/) | Cloud-10 | CC0 |
+| `m1_death_splat.wav` | Eaten / run over | [Cartoon Splat](https://freesound.org/people/Breviceps/sounds/445117/) | Breviceps | CC0 |
+| `m1_death_sting.wav` | Death | [Life Lost Game Over](https://freesound.org/people/noirenex/sounds/159408/) | noirenex | CC0 |
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/CREDITS.md.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/CREDITS.md.meta
new file mode 100644
index 00000000..02f1a672
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/CREDITS.md.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 658c481599c02463fb7e4ea620d07c0b
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_amb_village.ogg b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_amb_village.ogg
new file mode 100644
index 00000000..745d6cee
Binary files /dev/null and b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_amb_village.ogg differ
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_amb_village.ogg.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_amb_village.ogg.meta
new file mode 100644
index 00000000..c42498da
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_amb_village.ogg.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: 7625d2c5bf0124ddb9a2b45665d38970
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 8
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 2
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 0.6
+ conversionMode: 0
+ preloadAudioData: 1
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 1
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_danger_heartbeat.wav b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_danger_heartbeat.wav
new file mode 100644
index 00000000..1f0abf34
Binary files /dev/null and b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_danger_heartbeat.wav differ
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_danger_heartbeat.wav.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_danger_heartbeat.wav.meta
new file mode 100644
index 00000000..9b269eb2
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_danger_heartbeat.wav.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: 491ced7f01a774a41bb189b38446ab84
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 8
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 1
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 0.6
+ conversionMode: 0
+ preloadAudioData: 1
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_death_splat.wav b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_death_splat.wav
new file mode 100644
index 00000000..3bd19a11
Binary files /dev/null and b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_death_splat.wav differ
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_death_splat.wav.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_death_splat.wav.meta
new file mode 100644
index 00000000..c28120c5
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_death_splat.wav.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: 171e876adbbcf456699b9d70714d623f
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 8
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 0.6
+ conversionMode: 0
+ preloadAudioData: 1
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_death_sting.wav b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_death_sting.wav
new file mode 100644
index 00000000..a5e52ecf
Binary files /dev/null and b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_death_sting.wav differ
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_death_sting.wav.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_death_sting.wav.meta
new file mode 100644
index 00000000..56863cf1
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_death_sting.wav.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: 8a31298407b9045c9a1ac26c36925b17
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 8
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 0.6
+ conversionMode: 0
+ preloadAudioData: 1
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_dragonfly_wings.wav b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_dragonfly_wings.wav
new file mode 100644
index 00000000..8749c776
Binary files /dev/null and b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_dragonfly_wings.wav differ
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_dragonfly_wings.wav.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_dragonfly_wings.wav.meta
new file mode 100644
index 00000000..ef905e53
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_dragonfly_wings.wav.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: f0d42812d762240c29eaf1f76803f249
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 8
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 1
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 0.6
+ conversionMode: 0
+ preloadAudioData: 1
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_drink_blood.wav b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_drink_blood.wav
new file mode 100644
index 00000000..91e310fd
Binary files /dev/null and b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_drink_blood.wav differ
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_drink_blood.wav.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_drink_blood.wav.meta
new file mode 100644
index 00000000..d0fb1583
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_drink_blood.wav.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: 280c8fc942a094ae691c366ebdef46d5
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 8
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 1
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 0.6
+ conversionMode: 0
+ preloadAudioData: 1
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_egg_plop.wav b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_egg_plop.wav
new file mode 100644
index 00000000..a6dd7e95
Binary files /dev/null and b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_egg_plop.wav differ
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_egg_plop.wav.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_egg_plop.wav.meta
new file mode 100644
index 00000000..8ae07c53
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_egg_plop.wav.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: 13513896af5f344758c40e65cdb47aa6
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 8
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 0.6
+ conversionMode: 0
+ preloadAudioData: 1
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_1.wav b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_1.wav
new file mode 100644
index 00000000..f1992b47
Binary files /dev/null and b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_1.wav differ
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_1.wav.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_1.wav.meta
new file mode 100644
index 00000000..81d38c12
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_1.wav.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: 4ea2670b7359b46fe90e5e1ad347c806
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 8
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 0.6
+ conversionMode: 0
+ preloadAudioData: 1
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_2.wav b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_2.wav
new file mode 100644
index 00000000..9b54ea4a
Binary files /dev/null and b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_2.wav differ
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_2.wav.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_2.wav.meta
new file mode 100644
index 00000000..9ccf06b0
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_2.wav.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: 689bd36131da947a7b1f63a8f3c67cb4
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 8
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 0.6
+ conversionMode: 0
+ preloadAudioData: 1
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_3.wav b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_3.wav
new file mode 100644
index 00000000..acdc1944
Binary files /dev/null and b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_3.wav differ
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_3.wav.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_3.wav.meta
new file mode 100644
index 00000000..5146fb47
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_frog_croak_3.wav.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: ea2b40c287de5472ba188d58e7949656
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 8
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 0.6
+ conversionMode: 0
+ preloadAudioData: 1
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_mate_sparkle.wav b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_mate_sparkle.wav
new file mode 100644
index 00000000..89f844b1
Binary files /dev/null and b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_mate_sparkle.wav differ
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_mate_sparkle.wav.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_mate_sparkle.wav.meta
new file mode 100644
index 00000000..06f26242
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_mate_sparkle.wav.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: 1861b2646b10b46fc956267d7caebdbc
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 8
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 0.6
+ conversionMode: 0
+ preloadAudioData: 1
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_pop_blood_full.wav b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_pop_blood_full.wav
new file mode 100644
index 00000000..d7da957d
Binary files /dev/null and b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_pop_blood_full.wav differ
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_pop_blood_full.wav.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_pop_blood_full.wav.meta
new file mode 100644
index 00000000..b70894ad
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_pop_blood_full.wav.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: eb51cf9fa74be4974b226adf0b96b569
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 8
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 0
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 0.6
+ conversionMode: 0
+ preloadAudioData: 1
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_sip_nectar.wav b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_sip_nectar.wav
new file mode 100644
index 00000000..ecde16ad
Binary files /dev/null and b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_sip_nectar.wav differ
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_sip_nectar.wav.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_sip_nectar.wav.meta
new file mode 100644
index 00000000..55576093
--- /dev/null
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/Module1/m1_sip_nectar.wav.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: ed61ec17aa11f4da9b81e7a57e900f1f
+AudioImporter:
+ externalObjects: {}
+ serializedVersion: 8
+ defaultSettings:
+ serializedVersion: 2
+ loadType: 1
+ sampleRateSetting: 0
+ sampleRateOverride: 44100
+ compressionFormat: 1
+ quality: 0.6
+ conversionMode: 0
+ preloadAudioData: 1
+ platformSettingOverrides: {}
+ forceToMono: 0
+ normalize: 1
+ loadInBackground: 0
+ ambisonic: 0
+ 3D: 1
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/freesound_community-flying-mosquito-105770.mp3.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/freesound_community-flying-mosquito-105770.mp3.meta
index 78c9731c..ccad2c28 100644
--- a/Assets/1.TeamWorkspace/Team Assets/Sound/freesound_community-flying-mosquito-105770.mp3.meta
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/freesound_community-flying-mosquito-105770.mp3.meta
@@ -5,13 +5,13 @@ AudioImporter:
serializedVersion: 8
defaultSettings:
serializedVersion: 2
- loadType: 0
+ loadType: 1
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
- preloadAudioData: 0
+ preloadAudioData: 1
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/freesound_community-inside-car-noise-while-driving-29978.mp3.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/freesound_community-inside-car-noise-while-driving-29978.mp3.meta
index 913d7248..c1554d3d 100644
--- a/Assets/1.TeamWorkspace/Team Assets/Sound/freesound_community-inside-car-noise-while-driving-29978.mp3.meta
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/freesound_community-inside-car-noise-while-driving-29978.mp3.meta
@@ -5,13 +5,13 @@ AudioImporter:
serializedVersion: 8
defaultSettings:
serializedVersion: 2
- loadType: 0
+ loadType: 1
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
- preloadAudioData: 0
+ preloadAudioData: 1
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
diff --git a/Assets/1.TeamWorkspace/Team Assets/Sound/liecio-calming-rain-257596.mp3.meta b/Assets/1.TeamWorkspace/Team Assets/Sound/liecio-calming-rain-257596.mp3.meta
index 01a9eed5..823cf847 100644
--- a/Assets/1.TeamWorkspace/Team Assets/Sound/liecio-calming-rain-257596.mp3.meta
+++ b/Assets/1.TeamWorkspace/Team Assets/Sound/liecio-calming-rain-257596.mp3.meta
@@ -5,13 +5,13 @@ AudioImporter:
serializedVersion: 8
defaultSettings:
serializedVersion: 2
- loadType: 0
+ loadType: 2
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 0.65
conversionMode: 0
- preloadAudioData: 0
+ preloadAudioData: 1
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
diff --git a/Assets/Resources/Module1.meta b/Assets/Resources/Module1.meta
new file mode 100644
index 00000000..e18356f2
--- /dev/null
+++ b/Assets/Resources/Module1.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b6a77aade152b4e4ebff3c36c4d0b97c
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Resources/Module1/Module1SoundBank.asset b/Assets/Resources/Module1/Module1SoundBank.asset
new file mode 100644
index 00000000..52630989
--- /dev/null
+++ b/Assets/Resources/Module1/Module1SoundBank.asset
@@ -0,0 +1,46 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 35c353276a4ef450ea7fafd49ece1108, type: 3}
+ m_Name: Module1SoundBank
+ m_EditorClassIdentifier: Assembly-CSharp::Module1SoundBank
+ Ambience: {fileID: 8300000, guid: 7625d2c5bf0124ddb9a2b45665d38970, type: 3}
+ AmbienceVolume: 0.4
+ AmbienceDuringRain: 0.5
+ RainVolume: 0.15
+ RainFade: 2.5
+ MaxDistance: 20
+ FrogCroaks:
+ - {fileID: 8300000, guid: 4ea2670b7359b46fe90e5e1ad347c806, type: 3}
+ - {fileID: 8300000, guid: 689bd36131da947a7b1f63a8f3c67cb4, type: 3}
+ - {fileID: 8300000, guid: ea2b40c287de5472ba188d58e7949656, type: 3}
+ FrogVolume: 0.35
+ FrogInterval: {x: 3, y: 9}
+ DragonflyWings: {fileID: 8300000, guid: f0d42812d762240c29eaf1f76803f249, type: 3}
+ DragonflyVolume: 0.6
+ DragonflyHuntVolume: 1
+ DragonflyHuntPitch: 1.25
+ SipNectar: {fileID: 8300000, guid: ed61ec17aa11f4da9b81e7a57e900f1f, type: 3}
+ SipNectarVolume: 0.16
+ DrinkBlood: {fileID: 8300000, guid: 280c8fc942a094ae691c366ebdef46d5, type: 3}
+ DrinkBloodVolume: 0.35
+ BloodFull: {fileID: 8300000, guid: eb51cf9fa74be4974b226adf0b96b569, type: 3}
+ BloodFullVolume: 0.5
+ Mate: {fileID: 8300000, guid: 1861b2646b10b46fc956267d7caebdbc, type: 3}
+ MateVolume: 0.32
+ LayEgg: {fileID: 8300000, guid: 13513896af5f344758c40e65cdb47aa6, type: 3}
+ LayEggVolume: 0.6
+ Danger: {fileID: 8300000, guid: 491ced7f01a774a41bb189b38446ab84, type: 3}
+ DangerVolume: 0.25
+ DeathHit: {fileID: 8300000, guid: 171e876adbbcf456699b9d70714d623f, type: 3}
+ DeathHitVolume: 0.5
+ DeathSting: {fileID: 8300000, guid: 8a31298407b9045c9a1ac26c36925b17, type: 3}
+ DeathStingVolume: 0.32
diff --git a/Assets/Resources/Module1/Module1SoundBank.asset.meta b/Assets/Resources/Module1/Module1SoundBank.asset.meta
new file mode 100644
index 00000000..426baef2
--- /dev/null
+++ b/Assets/Resources/Module1/Module1SoundBank.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e8a77347df02042af9b7d6a730642adc
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scripts/Scripts by Simple/Gama Provider/StartUpScene/MenuController.cs b/Assets/Scripts/Scripts by Simple/Gama Provider/StartUpScene/MenuController.cs
index 3dd6cc7a..492cbc58 100644
--- a/Assets/Scripts/Scripts by Simple/Gama Provider/StartUpScene/MenuController.cs
+++ b/Assets/Scripts/Scripts by Simple/Gama Provider/StartUpScene/MenuController.cs
@@ -15,37 +15,42 @@ public class MenuController : MonoBehaviour
public void Start()
{
+ // A menu may hide the IP text, the middleware toggle or the player id (Module 1's
+ // Startup Menu_New has all three switched off). FindGameObjectWithTag skips inactive
+ // objects, so each one can be missing; the IP and middleware defaults are still set.
+ textMP = Tagged("textIP");
+ m_Toggle = Tagged("useMiddleWare");
+ TextMeshProUGUI textPN = Tagged("textPN");
+ if (textPN != null) textPN.text = "Player id: " + StaticInformation.getId();
- textMP = GameObject.FindGameObjectWithTag("textIP").GetComponent();
- m_Toggle = GameObject.FindGameObjectWithTag("useMiddleWare").GetComponent();
- GameObject ob = GameObject.FindGameObjectWithTag("textPN");
- TextMeshProUGUI textPN = ob.GetComponent();
- textPN.text = "Player id: " + StaticInformation.getId();
-
if (!PlayerPrefs.HasKey("MIDDLEWARE") || PlayerPrefs.GetString("MIDDLEWARE").Length == 0)
PlayerPrefs.SetString("MIDDLEWARE", "N");
useMiddleWare = PlayerPrefs.GetString("MIDDLEWARE").Equals("Y");
- m_Toggle.SetIsOnWithoutNotify(useMiddleWare);
+ if (m_Toggle != null) m_Toggle.SetIsOnWithoutNotify(useMiddleWare);
string port = useMiddleWare ? portWithMiddleware : portWithoutMiddleware;
-
+
string ip = PlayerPrefs.GetString("IP");
if (ip.Length == 0)
{
ip = host;
PlayerPrefs.SetString("IP", ip);
}
- textMP.text = "Current IP: " + ip + "/" + port;
-
-
+ if (textMP != null) textMP.text = "Current IP: " + ip + "/" + port;
+ }
+ static T Tagged(string tag) where T : Component
+ {
+ GameObject go = GameObject.FindGameObjectWithTag(tag);
+ return go != null ? go.GetComponent() : null;
}
public void OnValueMiddleWare()
{
+ if (m_Toggle == null) return;
useMiddleWare = m_Toggle.isOn;
string port = useMiddleWare ? portWithMiddleware : portWithoutMiddleware;
- textMP.text = "Current IP: " + PlayerPrefs.GetString("IP") + ":" + port;
+ if (textMP != null) textMP.text = "Current IP: " + PlayerPrefs.GetString("IP") + ":" + port;
}
public void StartBtn()