示例#1
0
    public void FinishResult()
    {
        eProject.Stop();
        reportResult       = eProject.GetReport();
        isShowDialogResult = true;

        MouseLook scriptMouseLook = gameObject.GetComponent <MouseLook>();

        scriptMouseLook.enabled = false;
        Cursor.visible          = true;
        Cursor.lockState        = CursorLockMode.None;
    }
示例#2
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();
        }
    }