Esempio n. 1
0
 private void OnResumePackage(object sender, ProjectMetaEventArgs args)
 {
     ResumeBtn.gameObject.SetActive(false);
     PauseBtn.gameObject.SetActive(true);
     PauseBtn.SetInteractivity(true);
     StepBtn.SetInteractivity(false, "Step to next action\n(Only available when progam is paused)");
 }
Esempio n. 2
0
 private void OnPausePackage(object sender, ProjectMetaEventArgs args)
 {
     ResumeBtn.gameObject.SetActive(true);
     PauseBtn.gameObject.SetActive(false);
     ResumeBtn.SetInteractivity(true);
     StepBtn.SetInteractivity(true);
 }
Esempio n. 3
0
    // Update is called once per frame
    void Update()
    {
        if (storedData.finishClicked)
        {
            storedData.finishClicked = false;

            foreach (Transform button  in contentPanel.GetComponentsInChildren <Transform>())
            {
                if (button.gameObject.tag.Equals("Step"))
                {
                    Destroy(button.gameObject);
                }
            }

            for (int i = 0; i < storedData.newStrategy.steps.Count; i++)
            {
                GameObject newobj = (GameObject)Instantiate(buttonPrefab);
                newobj.transform.SetParent(contentPanel);
                newobj.transform.localScale = new Vector3(1f, 1f, 1f);
                StepDetail item    = storedData.newStrategy.steps[i];
                StepBtn    nameBtn = newobj.GetComponent <StepBtn>();
                nameBtn.btnIndex     = i;
                nameBtn.btnName.text = item.stepDetailInfo;
                nameBtn.stepContent  = this;
            }
        }
    }