Beispiel #1
0
    // Update is called once per frame
    void Update()
    {
        //If changed to technique panel (changeView is true) let user return with back button
        if (!InCate)
        {
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                //Cate_animator.ResetTrigger("CateTech");
                Cate_animator.SetTrigger("TechCate");
                InCate = true;
            }
        }

        bool changeMain = toggle.isOn;

        if (!changeMain && !InMain)
        {
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                //Main_animator.ResetTrigger("MainCate");
                Main_animator.SetTrigger("CateMain");
                InMain = true;
            }
        }
    }
Beispiel #2
0
 //Changes from category panel to technique panel and the other way around
 public void ChangeView()
 {
     if (CateAnimator != null && Cate_animator != null)
     {
         InCate = false;
         //Cate_animator.ResetTrigger("TechCate");
         Cate_animator.SetTrigger("CateTech");
         //   bool changeView = animator.GetBool("ChangeView");
         //   animator.SetBool("ChangeView", !changeView);
     }
 }