Exemple #1
0
    public void CreateVoyageConfig(VoyageConfig voyageConfig)
    {
        PanelVoyageConfig panelVoyageConfig = Instantiate(PanelVoyageConfig, PanelConfigParent).GetComponent <PanelVoyageConfig>();

        panelVoyageConfig.InitPanel(voyageConfig);
        panelVoyageConfigs.Add(panelVoyageConfig);
        panelVoyageConfig.transform.SetAsLastSibling();
        AddTrans.SetAsLastSibling();
    }
Exemple #2
0
    public void InitPanel(VoyageConfig config)
    {
        voyageConfig = config;
        if (!VoyageTestManager.Instance.VoyageConfigs.Contains(config))
        {
            VoyageTestManager.Instance.VoyageConfigs.Add(config);
        }
        index_config = VoyageTestManager.Instance.VoyageConfigs.IndexOf(config);

        text_Title.text             = "Step:" + index_config;
        inputField_TargetSpeed.text = voyageConfig.targetSpeed.ToString();
        inputField_MinSpeed.text    = voyageConfig.testCarMinSpeed.ToString();
        inputField_MaxSpeed.text    = voyageConfig.testCarMaxSpeed.ToString();
        inputField_MinDis.text      = voyageConfig.minDis2Target.ToString();
        inputField_MaxDis.text      = voyageConfig.maxDis2Target.ToString();
        inputField_Duration.text    = voyageConfig.duration.ToString();
    }