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(); } }
private void Start() { menuCamera = FindObjectOfType <MenuCameraScript>(); fadeGroup = FindObjectOfType <CanvasGroup>(); fadeGroup.alpha = 1; //?? SetTrail(); }
// 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(); } }