void OnStateChange() { if (GM.IsEarthJumpEventStarted() && GM.IsSpaceSuitOn() && !AIHasPanicked) { talker.Play("Earth_PilotEscaping", 2); AIHasPanicked = true; } if (GM.IsShipOxygenDeviceBroken() != oxygenBroken) { oxygenBroken = GM.IsShipOxygenDeviceBroken(); unsaidOxygen++; } if (GM.IsOxygenLevelDangerous() != oxygenDangerous) { oxygenDangerous = GM.IsOxygenLevelDangerous(); if (oxygenDangerous) { WarnPlayer("oxygen"); } } if (GM.IsWhaleEventStarted() && !whaleEventStarted && !whaleEventStopped) { whaleEventStarted = true; talker.Play("Whales_Sighted", 4); eventSaid++; ResetTimer(); } if (GM.IsWhaleEventStopped()) { whaleEventStopped = true; } if (GM.IsPlantOnFire() && !plantOnFire) { plantOnFire = true; talker.Play("Problem_Fire", 3); } if (GM.IsFireStopped() && !fireStopped) { fireStopped = true; CongratulatePlayer(); } if (GM.IsEarthOnSight() && !earthSeen) { talker.Play("Earth_Sighted", 4); earthSeen = true; eventSaid = 0; ResetTimer(); Debug.Log("State noticed"); } }
// Calls for AI audio track for successful job public void CongratulatePlayer() { talker.Play("Problem_Solved", 7); //Debug.Log ("Should have played"); }