public void ContinueButtonHandler() { if (messageWindow != null) { //LOG STATION STATUS if (ebpc != null) { ebpc.AddEvent(Time.time, "Info message sent to pedestrians"); } //LOG ANNOUNCED MESSAGE var message = messageWindow.transform.Find("TextMessage").GetComponentInChildren <UnityEngine.UI.InputField>().text; log.Info(string.Format("{0}:{1}:{2}:{3}", logSeriesId, "string", 1, message)); //Raise more awareness on pedestrians every time a new message is sent if (raiseAwarenessOnMessageSent && pedInformer != null) { if (messageWindow.GetComponentInChildren <FlashMessageDropdownUIController>().GetMessageSelected().highInfluence) { pedInformer.globalParam.percOfPedSubscribed += Random.Range(0.03f, 0.05f); pedInformer.InformPedestriansSubscribed(); } else { pedInformer.globalParam.percOfPedSubscribed += Random.Range(0.01f, 0.02f); pedInformer.InformPedestriansSubscribed(); } } //Close the confirmation windows and clean the message CloseButtonHandler(); } }
public void ChangeStationState(bool value) { if (stationController != null) { // Get the routing controller from the grandfather of stationController and closes the station stationController.GetComponentInParent <RoutingController>().SetStationOutOfService(stationController, value); flashInformer.InformPedestriansSubscribed(); stationController.SendMessage("UpdateStationMaterial", value); } }