// Reset Current Selection Bar public void ResetSelectionCache() { GameObject.FindObjectOfType <AudioManager>().Play("ButtonClick"); // Clear views of selected House/Scenario/Persona selectedHouseView.GetComponent <CurrentSelected>().Reset(); selectedScenarioView.GetComponent <CurrentSelected>().Reset(); selectedPersonaView.GetComponent <CurrentSelected>().Reset(); // Load Houses into Curved Menu curvedController.LoadHouseView(); currentTypeToSelect = ConfigController.CardType.HOUSE; // Set buttons to invisible resetSelectionView_Btn.SetActive(false); }
// Move to next Section // From house to scenario // From scenario to persona public void GoToNextSection() { resetSelectionView_Btn.SetActive(true); switch (currentTypeToSelect) { case (ConfigController.CardType.HOUSE): curvedController.LoadScenarioView(); currentTypeToSelect = ConfigController.CardType.SCENARIO; break; case (ConfigController.CardType.SCENARIO): curvedController.LoadPersonaView(); currentTypeToSelect = ConfigController.CardType.PERSONA; break; case (ConfigController.CardType.PERSONA): // Do nothing // Not needed break; } }
// Which Cards need to be loaded into the Current Selection Bar public void SetCardIntoBar(ConfigController.CardType cardtype, Sprite featuredimg, string description) { GameObject tempSelected = null; switch (cardtype) { case (ConfigController.CardType.HOUSE): tempSelected = selectedHouseView; break; case (ConfigController.CardType.SCENARIO): tempSelected = selectedScenarioView; break; case (ConfigController.CardType.PERSONA): tempSelected = selectedPersonaView; StartCoroutine(StartSimulation()); break; } tempSelected.GetComponent <CurrentSelected>().FillCurrentSelected(featuredimg, description, Color.white); GoToNextSection(); }