public void TV_Case_Enable() { var tv = new TV(15, 10); tv.Enable(); Assert.True(tv.On); }
public void TV_Case_Disable() { var tv = new TV(45, 25); tv.Enable(); tv.Disable(); Assert.False(tv.On); }
public void TV_Case_IsEnabled() { var tv = new TV(10, 15); tv.Enable(); bool isEnabled = tv.IsEnabled(); Assert.True(isEnabled); }
IEnumerator Plot() { StreetNoiseAO.gameObject.SetActive(false); PhoneGoneAO.gameObject.SetActive(false); WalletGoneAO.gameObject.SetActive(false); DoorAO.gameObject.SetActive(false); WalkAO.gameObject.SetActive(false); ConfettiAO.gameObject.SetActive(false); BodyAO.gameObject.SetActive(false); ManAO.gameObject.SetActive(false); CakeAO.gameObject.SetActive(false); FridgeAO.gameObject.SetActive(false); BoozeAO.gameObject.SetActive(false); KnifeAO.gameObject.SetActive(false); CaseAO.gameObject.SetActive(false); ChipsAO.gameObject.SetActive(false); NewsAO.gameObject.SetActive(false); CopsAO.gameObject.SetActive(false); CharacterControls.instance.EnableMotion = false; if (EnableTutorial) { UIFade.instance.Enable = true; yield return(new WaitForSeconds(1f)); UILog.instance.Log("Ugh..."); yield return(new WaitForSeconds(2f)); DiscoverFact(Data.AllFacts ["dark"]); yield return(new WaitForSeconds(2f)); DiscoverFact(Data.AllFacts ["see nothing"]); yield return(new WaitForSeconds(2f)); var msg = UILog.instance.Log("<i>Press the Brain button to start deducing</i>", 0); while (!UIBrainsButton.instance.Visible) { yield return(new WaitForSeconds(1f)); } UILog.instance.Delete(msg); msg = UILog.instance.Log("<i>Select both facts and think</i>", 0); while (Game.instance.CurrentHypotheses.Count == 0) { yield return(new WaitForSeconds(1f)); } UILog.instance.Delete(msg); UILog.instance.Log("<b>Dude:</b> Alright, that's the working hypothesis for now"); msg = UILog.instance.Log("<i>Press the Brain button again</i>", 0); while (UIBrainsButton.instance.Visible) { yield return(new WaitForSeconds(1f)); } UILog.instance.Delete(msg); yield return(new WaitForSeconds(2f)); // Play sounds StreetNoiseAO.gameObject.SetActive(true); msg = UILog.instance.Log("<i>Press Space to interact</i>", 0); while (Game.instance.KnownFacts.Count < 3) { yield return(new WaitForSeconds(1f)); } UILog.instance.Delete(msg); yield return(new WaitForSeconds(1f)); msg = UILog.instance.Log("<i>Press the Brain button again</i>", 0); while (!UIBrainsButton.instance.Visible) { yield return(new WaitForSeconds(1f)); } UILog.instance.Delete(msg); yield return(new WaitForSeconds(1f)); msg = UILog.instance.Log("<i>Select the new fact and one of the theories and THINK</i>", 0); while (Game.instance.CurrentHypotheses.Count == 2) { yield return(new WaitForSeconds(1f)); } UILog.instance.Delete(msg); yield return(new WaitForSeconds(2f)); msg = UILog.instance.Log("<i>Repeat for the other theory</i>", 0); while (Game.instance.CurrentHypotheses.Count == 1) { yield return(new WaitForSeconds(1f)); } UILog.instance.Delete(msg); msg = UILog.instance.Log("<i>Press the Brain button again</i>", 0); while (UIBrainsButton.instance.Visible) { yield return(new WaitForSeconds(1f)); } UILog.instance.Delete(msg); yield return(new WaitForSeconds(2f)); UILog.instance.Log("<b>Dude:</b> Gonna open my blinkers now"); yield return(new WaitForSeconds(1f)); UIFade.instance.Enable = false; CharacterControls.instance.Awake = true; yield return(new WaitForSeconds(5f)); CharacterControls.instance.EnableMotion = true; yield return(new WaitForSeconds(1f)); UILog.instance.Log("<i>Use WASD to walk</i>"); yield return(new WaitForSeconds(1f)); UILog.instance.Log("<i>Use mouse to rotate and zoom</i>"); yield return(new WaitForSeconds(1f)); UILog.instance.Log("<i>Space to interact</i>"); yield return(new WaitForSeconds(3f)); UILog.instance.Log("<b>Dude:</b> What the hell?"); KnownFacts.Remove(Data.AllFacts ["dark"]); KnownFacts.Remove(Data.AllFacts ["see nothing"]); yield return(new WaitForSeconds(5f)); } else { CharacterControls.instance.EnableMotion = true; CharacterControls.instance.Awake = true; UIFade.instance.Enable = false; } if (EnableRoom1) { PhoneGoneAO.gameObject.SetActive(true); WalletGoneAO.gameObject.SetActive(true); WalkAO.gameObject.SetActive(true); UILog.instance.Log("<b>Dude:</b> Ugh, my head..."); yield return(new WaitForSeconds(2f)); DiscoverFact(Data.AllFacts ["head hurts"]); yield return(new WaitForSeconds(5f)); UILog.instance.Log("<b>Dude:</b> Ouch!"); yield return(new WaitForSeconds(2f)); DiscoverFact(Data.AllFacts ["bruises"]); yield return(new WaitForSeconds(5f)); UILog.instance.Log("<b>Dude:</b> ..."); yield return(new WaitForSeconds(2f)); DiscoverFact(Data.AllFacts ["dry mouth"]); yield return(new WaitForSeconds(5f)); while (!Game.instance.KnownFacts.Contains(Data.AllFacts ["hungover"])) { yield return(new WaitForSeconds(1f)); } yield return(new WaitForSeconds(2f)); UILog.instance.Log("<b>Dude:</b> Gotta check the other room"); } else { DiscoverFact(Data.AllFacts ["hungover"]); } Coroutine cops2; DoorAO.gameObject.SetActive(true); if (EnableRoom2) { BodyAO.gameObject.SetActive(true); KnifeAO.gameObject.SetActive(true); FridgeAO.gameObject.SetActive(true); ConfettiAO.gameObject.SetActive(true); BoozeAO.gameObject.SetActive(true); CaseAO.gameObject.SetActive(true); while (!Game.instance.KnownFacts.Contains(Data.AllFacts ["body"])) { yield return(new WaitForSeconds(1f)); } while (!Game.instance.CurrentHypotheses.Contains(Data.AllHypotheses ["murder"])) { yield return(new WaitForSeconds(1f)); } yield return(new WaitForSeconds(15f)); ManAO.gameObject.SetActive(true); CopsAO.gameObject.SetActive(true); ChipsAO.gameObject.SetActive(true); var cops = StartCoroutine(CopsShouting()); CopsSound.Play(); while (!Game.instance.KnownFacts.Contains(Data.AllFacts ["casino"])) { yield return(new WaitForSeconds(1f)); } yield return(new WaitForSeconds(5f)); TV.Enable(); var tv = StartCoroutine(TVBroadcast()); NewsAO.gameObject.SetActive(true); while (!Game.instance.KnownFacts.Contains(Data.AllFacts ["news"])) { yield return(new WaitForSeconds(1f)); } StopCoroutine(tv); while (!Game.instance.KnownFacts.Contains(Data.AllFacts ["robbed"])) { yield return(new WaitForSeconds(1f)); } StopCoroutine(cops); cops2 = StartCoroutine(CopsShouting2()); yield return(new WaitForSeconds(5f)); } else { CopsSound.Play(); cops2 = StartCoroutine(CopsShouting2()); DiscoverFact(Data.AllFacts ["robbed"]); DiscoverFact(Data.AllFacts ["cops"]); } DiscoverHypothesis(Data.AllHypotheses ["door dead"]); while (!Game.instance.KnownFacts.Contains(Data.AllFacts ["door dead"])) { yield return(new WaitForSeconds(1f)); } yield return(new WaitForSeconds(5f)); DiscoverFact(Data.AllFacts ["get out"]); UILog.instance.Log("<b>Dude:</b> I"); UILog.instance.Log("<b>Dude:</b> NEED TO"); UILog.instance.Log("<b>Dude:</b> GET OUT"); yield return(new WaitForSeconds(10f)); UIFade.instance.Enable = true; yield return(new WaitForSeconds(3f)); StopCoroutine(cops2); CopsSound.Stop(); Music.Stop(); Breakin.Play(); CharacterControls.instance.EnableMotion = false; yield return(new WaitForSeconds(9f)); DiscoverFact(Data.AllFacts ["dead"]); yield return(new WaitForSeconds(5f)); Application.Quit(); }