Example #1
0
 void Inputs()
 {
     if (Input.GetKeyDown(KeyCode.C))
     {
         ProgressionPanel.OnPanelToggle();
     }
 }
 public void EndDayProtocol()
 {
     progressPanel.SetActive(true);
     progPanel = FindObjectOfType <ProgressionPanel>();
     // progPanel.NextProgress();
     progPanel.isProgress          = true;
     progPanel.totalAlreadyCleared = db.mirrorBackLog[db.CurrentPostwMark[db.progressCounter]] - db.currentBackLog[db.CurrentPostwMark[db.progressCounter]];
     progPanel.totalManHour        = db.mirrorBackLog[db.CurrentPostwMark[db.progressCounter]];
     progPanel.idxTask             = db.CurrentPostwMark[db.progressCounter];
     progPanel.idxWorker           = db.assignedBackLog[db.CurrentPostwMark[db.progressCounter]];
 }
Example #3
0
    // Update is called once per frame
    void Update()
    {
        db       = FindObjectOfType <Database>();
        dialogue = FindObjectOfType <AllDialogue>();
        propan   = FindObjectOfType <ProgressionPanel>();

        staffProductivity = new float[db.staffCount];
        idxText.text      = "Task " + taskIdx;
        for (int i = 0; i < db.staffCount; i++)
        {
            staffProductivity[i] = 1;
        }
        db.staffProductivity    = staffProductivity;
        problemDescription.text = description;

        doCon.text   = doConText;
        dontCon.text = dontConText;

        doButton.text   = doButtonText;
        dontButton.text = dontButtonText;
    }
    private void OnMouseUp()
    {
        if (db.isViewing == false)
        {
            //post is clicked to be seen
            if (gameObject.transform.position.x - initialPosition.x < 0.3f &&
                gameObject.transform.position.x - initialPosition.x > -0.3f &&
                gameObject.transform.position.y - initialPosition.y < 0.3f &&
                gameObject.transform.position.y - initialPosition.y > -0.3f)
            //if (gameObject.transform.position.x == initialPosition.x && gameObject.transform.position.y == initialPosition.y)
            {
                db.isViewing = true;
                frameProgress.SetActive(true);

                progProbSee = FindObjectOfType <ProgressionPanel>();
                progProbSee.totalAlreadyCleared = db.mirrorBackLog[indexPost] - db.currentBackLog[indexPost];
                progProbSee.totalManHour        = db.mirrorBackLog[indexPost];
                progProbSee.idxTask             = indexPost;
                progProbSee.idxWorker           = db.assignedBackLog[indexPost];

                if (progProbSee.isProgress == false)
                {
                    progProbSee.totalCleared = progProbSee.totalAlreadyCleared;
                }

                for (int i = 0; i < db.CurrentPostwMark.Length; i++)
                {
                    if (indexPost == db.CurrentPostwMark[i])
                    {
                        if (db.rollResult[i] > 9)
                        {
                            progProbSee.status = "On Progress";
                        }
                        else if (db.rollResult[i] <= 9)
                        {
                            progProbSee.status     = "Obstacle";
                            progProbSee.idxProblem = db.rollResult[i];
                        }
                        else
                        {
                            progProbSee.status = "Done or Not Worked yet";
                        }
                    }
                }
            }
            if (db.doneScan == false)
            {
                //hover over other objects
                sr.sortingOrder  -= 3;
                sr2.sortingOrder -= 3;
                if (!onTarget || stacking == true)
                {
                    ac.PlaySFX(0, ac.lo_vol);
                    //back to initial pos
                    transform.position   = new Vector2(initialPosition.x, initialPosition.y);
                    transform.localScale = startSize;
                }
                else
                {
                    ac.PlaySFX(0, ac.lo_vol);
                    //new position
                    transform.position   = targetObject.transform.position;
                    transform.localScale = startSize;
                }
            }
        }
    }