Exemplo n.º 1
0
    void CreateTaskDialog(int id)
    {
        int xC = 800 / 2;
        int dX = 200;

        InitSceneScript scriptSetActive = gameObject.GetComponent <InitSceneScript>();

        eProject = scriptSetActive.eProject;

        Help scriptHelp = gameObject.GetComponent <Help>();

        scriptHelp.enabled = false;


        if (!eProject.IsStart)
        {
            if (GUI.Button(new Rect(xC - dX / 2, 180f, dX, 50f), "Начать выполнение"))
            {
                eProject.Start();
                showTaskDialog = false;
                DestroyTaskDialog();
            }
        }
        else
        {
            if (GUI.Button(new Rect(xC - dX / 2, 180f, dX, 50f), "Завершить выполнение"))
            {
                scriptMouseLook.enabled = false;
                Cursor.visible          = true;
                Cursor.lockState        = CursorLockMode.None;


                //  eProject.DateTimeStart = DateTime.UtcNow;
                eProject.IsStart = false;
                showTaskDialog   = false;

                reportResult     = eProject.GetReport();
                showResultDialog = true;
            }
        }
        if (GUI.Button(new Rect(xC - dX / 2, 260f, dX, 50f), "Отмена"))
        {
            DestroyTaskDialog();
        }
    }
Exemplo n.º 2
0
 public void ManageTaskDialogInitProject()
 {
     if (eProject != null)
     {
         if (Input.GetKeyDown(KeyCode.T))
         {
             if (!eProject.IsStart)
             {
                 eProject.Start();
             }
             else
             {
                 FinishResult();
             }
         }
     }
     else
     {
         InitSceneScript scriptSetActive = gameObject.GetComponent <InitSceneScript>();
         eProject = scriptSetActive.eProject;
     }
 }