Exemplo n.º 1
0
    void Start()
    {
        // instantiate the FMU
        fmu = new FMU("bouncingBall", name);

        Reset();
    }
Exemplo n.º 2
0
 void Awake()
 {
     //Set the target frame rate.
     Application.targetFrameRate = targetFPS;
     //Allow controller input to be processed.
     inputActions = new DroneController();
     OnEnable();
     ProcessInput();
     //Instantiate the FMU
     fmu = new FMU("DroneSimulation_Polling", name);
     fmu.Reset();
     fmu.SetupExperiment(Time.time);
     fmu.EnterInitializationMode();
     fmu.ExitInitializationMode();
 }
Exemplo n.º 3
0
    void Start()
    {
        // instantiate the FMU
        fmu = new FMU("values", name);

        // reset & sync the UI
        Reset();

        // get the value references
        vr_x         = fmu.GetValueReference("x");
        vr_int_in    = fmu.GetValueReference("int_in");
        vr_bool_in   = fmu.GetValueReference("bool_in");
        vr_string_in = fmu.GetValueReference("string_in");

        // listen to changes in the UI
        realInSlider.onValueChanged.AddListener(SetX);
        intInSlider.onValueChanged.AddListener(SetIntIn);
        boolInToggle.onValueChanged.AddListener(SetBoolIn);
        stringInInputField.onValueChanged.AddListener(SetStringIn);
    }