Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        //if we have a current procedure
        if (currentProc != null)
        {
            if (currentProc.Running)
            {
                //wrap it up if it's finished
                if (currentProc.Finished)
                {
                    if (currentProc.Success)
                    {
                        Controls.Notifications.ShowNotification("Finished successfully!");
                    }
                    else
                    {
                        Controls.Notifications.ShowNotification("FAILED");
                    }

                    FinishedProcedure(currentProc.Success, currentProc.RestartOnFailure);
                    currentProc.Stop();
                } //call its update function if not
                else
                {
                    currentProc.RunUpdate();
                }
            }
        }
    }