public void ShowCustomerReaction() { TrainStationData destination = GameManager.instance.activeLevel.destinationStation; //lock player movement player1.enabled = false; player2.enabled = false; //build the customer house Vector3 housePosition = destination.housePosition; float customerHouseYRotation = destination.houseYRotation; customerHouse = Instantiate(destination.customerHouse, housePosition, Quaternion.Euler(0, customerHouseYRotation, 0)); //update player transforms Transform player1Target = customerHouse.transform.GetChild(1).transform; Transform player2Target = customerHouse.transform.GetChild(2).transform; player1.transform.position = player1Target.position; player2.transform.position = player2Target.position; player1.transform.rotation = player1Target.rotation; player2.transform.rotation = player2Target.rotation; //destroy the targets player1Target.gameObject.SetActive(false); player2Target.gameObject.SetActive(false); //Render Settings RenderSettings.fogColor = destination.fogColor; RenderSettings.fogDensity = destination.fogDensity; //activate the cutscene camera if (customerHouse.transform.GetChild(0).GetComponent <Camera>() != null) { cutsceneCamera = customerHouse.transform.GetChild(0).GetComponent <Camera>(); cutsceneCamera.enabled = true; } else { Debug.Log("cutscene camera could not be found"); } StationUI.Instance.SetCinematicBarVisibility(true); Invoke("ShowDialogue", 2f); }
private void PlayCustomerMusic() { TrainStationData destination = GameManager.instance.activeLevel.destinationStation; string songName = destination.customerSongName; AudioManager.instance.PlayEvent(songName); //also play the customer atmo string atmoName = destination.weatherSoundName; if (atmoName != null) { AudioManager.instance.PlayEvent(atmoName); } }