예제 #1
0
    public void ActivateCustomization()
    {
        customizationAnimator = customizationPanel.GetComponent <Animator>();

        if (!customizationActive) //old one: customizationPanel.activeSelf
        {
            customizationActive = true;
            Debug.Log("Customization Activated");
            customizationPanel.SetActive(true);
            customizationAnimator.SetBool("customizationActive", true);
            customizationAnimator.SetTrigger("customizationToggle");
            ActivateBottomMenu();
            menuCameraScript = menuCamera.GetComponent <MenuCameraScript>();
            menuCameraScript.CameraZoomToggle();
        }

        else if (customizationActive)
        {
            customizationActive = false;
            customizationAnimator.SetBool("customizationActive", false);
            customizationAnimator.SetTrigger("customizationToggle");
            StartCoroutine(AnimationCustomizationPause(0.5f));


            ActivateBottomMenu();
            menuCameraScript = menuCamera.GetComponent <MenuCameraScript>();
            menuCameraScript.CameraZoomToggle();
        }
    }
예제 #2
0
    // This is now Side Menu, but I didn't change the name for this. Animator Bool/Trigger is new.
    public void ActivateBottomMenu()
    {
        bottomMenuAnimator = bottomMenuPanel.GetComponent <Animator>();

        if (!bottomMenuActive) //old one: customizationPanel.activeSelf
        {
            bottomMenuActive = true;
            bottomMenuAnimator.SetBool("sideMenuActive", true);
            bottomMenuAnimator.SetTrigger("sideMenuToggle");
            menuCameraScript = menuCamera.GetComponent <MenuCameraScript>();
            menuCameraScript.CameraZoomToggle();
        }

        else if (bottomMenuActive)
        {
            bottomMenuActive = false;
            bottomMenuAnimator.SetBool("sideMenuActive", false);
            bottomMenuAnimator.SetTrigger("sideMenuToggle");
            menuCameraScript = menuCamera.GetComponent <MenuCameraScript>();
            menuCameraScript.CameraZoomToggle();
        }
    }