Ejemplo n.º 1
0
    public void initID(string[] string_id)
    {
        ComponentsEnums.Components[] ids = new ComponentsEnums.Components[string_id.Length];

        for (int i = 0; i < string_id.Length; i++)
        {
            ids[i] = ComponentsEnums.GetEnumFromString(string_id[i]);
        }

        setID(ids);
    }
Ejemplo n.º 2
0
    //Sets the parameter value to the object having "objName" as name.
    public void SetSimulationParameter(string objName, string[] param)
    {
        ComponentsEnums.Components[] enums = new ComponentsEnums.Components[param.Length];

        for (int i = 0; i < param.Length; i++)
        {
            enums[i] = ComponentsEnums.GetEnumFromString(param[i]);
        }

        GameObject.FindWithTag("Cockpit").transform.Find(objName).GetComponent <NewParameterManager>().setID(enums);
    }