Example #1
0
 // Start is called before the first frame update
 void Start()
 {
     h1 = transform.Find("help_1").GetComponent <help>();
     h2 = transform.Find("help_2").GetComponent <help_2>();
     h3 = transform.Find("help_3").GetComponent <help>();
     h4 = transform.Find("help_4").GetComponent <help>();
     h5 = transform.Find("help_5").GetComponent <help_2>();
     help_1.SetActive(true);
 }
 // Start is called before the first frame update
 void Start()
 {
     //h1 = GameObject.FindWithTag("help_1").GetComponent<help>();
     //h2 = GameObject.FindWithTag("help_2").GetComponent<help_2>();
     //h3 = GameObject.FindWithTag("help_3").GetComponent<help>();
     //h4 = GameObject.FindWithTag("help_4").GetComponent<help>();
     //h5 = GameObject.FindWithTag("help_5").GetComponent<help_2>();
     h1 = transform.Find("help_1").GetComponent <help>();
     h2 = transform.Find("help_2").GetComponent <help_2>();
     h3 = transform.Find("help_3").GetComponent <help>();
     h4 = transform.Find("help_4").GetComponent <help>();
     h5 = transform.Find("help_5").GetComponent <help_2>();
     help_1.SetActive(true);
 }
Example #3
0
    public override void OnEnter()
    {
        help_1.SetActive(true);
        if (h1 == null)
        {
            h1 = transform.Find("help_1").GetComponent <help>();
        }
        if (h2 == null)
        {
            h2 = transform.Find("help_2").GetComponent <help_2>();
        }
        if (h3 == null)
        {
            h3 = transform.Find("help_3").GetComponent <help>();
        }
        if (h4 == null)
        {
            h4 = transform.Find("help_4").GetComponent <help>();
        }
        if (h5 == null)
        {
            h5 = transform.Find("help_5").GetComponent <help_2>();
        }
        h1.setBool(true); h1.shouldActive = true;
        h2.setBool(true);
        h3.setBool(true);
        h4.setBool(true);
        h5.setBool(true);

        help = false;

        base.OnEnter();
        Time.timeScale = 1;
        if (canvasGroup == null)
        {
            canvasGroup = GetComponent <CanvasGroup>();
        }
        canvasGroup.alpha          = 1;
        canvasGroup.blocksRaycasts = true;
        onShow = true;
    }