示例#1
0
    /// <summary>
    /// Awakes the script.
    /// </summary>
    void Awake()
    {
        loggerAssembly = FindObjectOfType <LoggerAssembly>();
        logSeriesId    = LoggerAssembly.GetLogSeriesId();

        camera        = Camera.main;
        stationUIctrl = FindObjectOfType <FlashStationUIController>();
    }
示例#2
0
    public void UpdateInputField()
    {
        string text = optionList[messageDropdown.value].text;

        FlashStationUIController stationUI = this.transform.GetComponentInParent <FlashStationUIController>();

        if (stationUI != null)
        {
            text = text.Replace("[station]", stationUI.stationController.stationName);
        }

        inputField.text = text;
    }
    /// <summary>
    /// Auxiliar method to update the Element UI to display the information of this object.
    /// </summary>
    public void VinculateToStationUI()
    {
        //log.Info("Station " + stationController.stationName + " selected"); FIXME

        FlashStationUIController stationUICtrl = stationUI.transform.GetComponent <FlashStationUIController>();

        //// Display the information of the station in the UI
        stationUICtrl.stationController = stationController;
        stationUICtrl.CloseConfirmationWindow(true);                            //In case it was open
        stationUICtrl.UpdateStationStateLabels(stationController.outOfService); //Only for Station UI v2.0
        //stationUI.transform.FindChild("CloseStationToggle").GetComponent<UnityEngine.UI.Toggle>().isOn = stationController.outOfService; //Only for Station UI v1.0
        stationUI.transform.FindChild("Title").GetComponent <UnityEngine.UI.Text>().text        = stationController.stationName;
        stationUI.transform.FindChild("QueuingValue").GetComponent <UnityEngine.UI.Text>().text = stationController.queuing.ToString();

        // Fade in the station UI
        stationUICtrl.ShowStationUIWindow();
    }
 void Awake()
 {
     logSeriesId = LoggerAssembly.GetLogSeriesId();
     stationUI   = FindObjectOfType <FlashStationUIController>();
     pedInformer = FindObjectOfType <FlashPedestriansInformer>();
 }