void Start() { mMenuAnim = FindObjectOfType <MenuAnimator>(); mTargetBuilderCanvas = GetComponentInChildren <Canvas>(); mTargetBuilderCanvas.enabled = false; VuforiaARController.Instance.RegisterVuforiaStartedCallback(OnVuforiaStarted); }
void Awake() { gameManager = GameManager.Instance; scenesManager = ScenesManager.Instance; menuAnimator = MenuAnimator.Instance; Cursor.visible = true; Cursor.lockState = CursorLockMode.Confined; menuButtonList = GetComponentsInChildren <MenuButtonBase>().ToList(); menuSliderList = GetComponentsInChildren <MenuSliderBase>().ToList(); menuCheckboxList = GetComponentsInChildren <MenuCheckboxBase>().ToList(); menuDropdownList = GetComponentsInChildren <MenuDropdownBase>().ToList(); menuButtonList.ForEach(m => { m.OnButtonClicked += OnButtonList; }); menuSliderList.ForEach(m => { m.OnSliderDragged += OnSliderList; }); menuCheckboxList.ForEach(m => { m.OnCheckboxClicked += OnCheckboxList; }); menuDropdownList.ForEach(m => { m.OnDropdownClicked += OnDropdownList; }); }
void Start() { mTapCount = 0; mTimeSinceLastTap = 0; mMenuAnim = FindObjectOfType <MenuAnimator>(); optionsConfig = FindObjectOfType <OptionsConfig>(); }
public IEnumerator OffsetBeatAnimation() { float delay = 1 / (BpmValue / 60); MenuAnimator menuAnimator = FindObjectOfType <MenuAnimator>(); yield return(new WaitForSeconds(OffsetValue)); StartCoroutine(menuAnimator.PlayBeatAnimation(delay)); }
protected virtual void Start() { mCamSettings = FindObjectOfType <CameraSettings>(); mTrackableSettings = FindObjectOfType <TrackableSettings>(); mMenuAnim = FindObjectOfType <MenuAnimator>(); var vuforia = VuforiaARController.Instance; vuforia.RegisterOnPauseCallback(OnPaused); }
protected virtual void Start() { mCamSettings = FindObjectOfType <CameraSettings>(); mTrackableSettings = FindObjectOfType <TrackableSettings>(); mMenuAnim = FindObjectOfType <MenuAnimator>(); VuforiaAbstractBehaviour vuforia = FindObjectOfType <VuforiaAbstractBehaviour>(); vuforia.RegisterOnPauseCallback(OnPaused); }
void Start() { animator = GameObject.Find("Camera").GetComponent <MenuAnimator> (); itemController = GameObject.Find("Canvas").GetComponent <ItemController>(); pathFollow = GameObject.Find("Camera").GetComponent <PathFollow> (); prepareObject = GameObject.Find("GameController").GetComponent <Preparation> (); especObject = GameObject.Find("espectrofotometro").GetComponent <Espectrofotometro> (); currentState = GameState.none; }
// switch menus public void showMenu(MenuAnimator menu) { if (currentMenu != null) { currentMenu.open = false; } currentMenu = menu; currentMenu.open = true; }
private void Awake() { controller = controllerRight.GetComponent <SteamVR_TrackedController>(); controller.TriggerUnclicked += triggerConfirm; SceneManager.sceneLoaded += sceneLoad; scenarioIDs = new List <int>(); MA = MenusContainer.GetComponent <MenuAnimator>(); Invoke("menuFade", 1f); currentScenarioID = -1; currentMenu = MENU.MAIN; }
/////////////// #endregion //PRIVATE_MEMBERS #region MONOBEHAVIOUR_METHODS protected virtual void Start() { mCamSettings = FindObjectOfType <CameraSettings>(); mTrackableSettings = FindObjectOfType <TrackableSettings>(); mMenuAnim = FindObjectOfType <MenuAnimator>(); //////////////// mStrtSettings = FindObjectOfType <StrategySettings>(); mToggleGroup = GetComponentInChildren <ToggleGroup>(); prev_tgl = mToggleGroup.ActiveToggles().FirstOrDefault(); /////////////// }
void Start() { mTapCount = 0; mTimeSinceLastTap = 0; mMenuAnim = FindObjectOfType <MenuAnimator>(); StartMsgUI = GameObject.Find("StartMsgUI"); // MessageUI_menu = GameObject.Find ("MessageUI_menu"); // Debug.Log ("TapEvent MessageUI_menu:" + MessageUI_menu); // MessageUI_menu.SetActive (false); // // VolumeOnButton = GameObject.Find ("VolumeOnButton"); // VolumeOffButton = GameObject.Find ("VolumeOffButton"); // VolumeOffButton.SetActive (false); }
private void MenuBtn_Click(object sender, EventArgs e) { if (Menu.Width == 253) { Menu.Visible = false; Menu.Width = 56; MenuAnimator.ShowSync(Menu); Logo.Hide(); } else { Menu.Visible = false; Menu.Width = 253; MenuAnimator.ShowSync(Menu); LogoAminator.ShowSync(Logo); } }
IEnumerator Transition(Transform currentlyActive, Transform newActive, bool reverse = false) { MenuAnimator menuAnimator = FindObjectOfType <MenuAnimator>(); newActive.GetComponent <RectTransform>().anchoredPosition = new Vector3(0, 0, 0); // Set draw order //currentlyActive.SetAsLastSibling(); // Activate appearing appear //newActive.gameObject.SetActive(true); // Disable buttons for transition time foreach (MenuButton button in currentlyActive.GetComponentsInChildren <MenuButton>()) { button.SetActive(false); } foreach (MenuButton button in newActive.GetComponentsInChildren <MenuButton>()) { button.SetActive(false); } // Play transition animations if (reverse) { menuAnimator.PlayAnimation(newActive.GetComponent <Animator>(), menuAnimator.zoomOutReverse); menuAnimator.PlayAnimation(currentlyActive.GetComponent <Animator>(), menuAnimator.zoomInReverse); } else { menuAnimator.PlayAnimation(currentlyActive.GetComponent <Animator>(), menuAnimator.zoomOut); menuAnimator.PlayAnimation(newActive.GetComponent <Animator>(), menuAnimator.zoomIn); } yield return(new WaitForSeconds(menuAnimator.zoomIn.length)); // Disable disappearing object //currentlyActive.gameObject.SetActive(false); currentlyActive.GetComponent <RectTransform>().anchoredPosition = new Vector3(99999, -99999, 0); // Enable buttons foreach (MenuButton button in newActive.GetComponentsInChildren <MenuButton>()) { button.SetActive(true); } }
void Start() { mTapCount = 0; mTimeSinceLastTap = 0; mMenuAnim = FindObjectOfType <MenuAnimator>(); }
protected virtual void Start() { //mCamSettings = FindObjectOfType<CameraSettings>(); //mTrackableSettings = FindObjectOfType<TrackableSettings>(); mMenuAnim = FindObjectOfType <MenuAnimator>(); }
// Use this for initialization void Start() { menuAnim = GetComponent <MenuAnimator> (); menuPath = GetComponent <PathFollow> (); myPosition = GetComponent <Transform> (); }
IEnumerator buttonAction(float delay) { MenuAnimator menuAnimator = FindObjectOfType <MenuAnimator>(); MenuManager menuManager = FindObjectOfType <MenuManager>(); LevelBrowser levelBrowser = FindObjectOfType <LevelBrowser>(); switch (typeOfButton) { case TypeOfButton.LevelBrowser: StartCoroutine(Transition(menuManager.mainMenu.transform, menuManager.levelBrowser.transform)); menuManager.CurrentWindow = MenuManager.Windows.LevelBrowser; FindObjectOfType <LevelBrowser>().SetFirstMusic(); break; case TypeOfButton.Settings: StartCoroutine(Transition(menuManager.mainMenu.transform, menuManager.settings.transform)); menuManager.CurrentWindow = MenuManager.Windows.Settings; break; case TypeOfButton.Back: if (menuManager.CurrentWindow == MenuManager.Windows.Settings) { StartCoroutine(Transition(menuManager.settings.transform, menuManager.mainMenu.transform, true)); } else if (menuManager.CurrentWindow == MenuManager.Windows.LevelBrowser) { StartCoroutine(Transition(menuManager.levelBrowser.transform, menuManager.mainMenu.transform, true)); } menuManager.CurrentWindow = MenuManager.Windows.MainMenu; break; case TypeOfButton.LevelEditor: menuAnimator.PlayAnimation(menuAnimator.logo.GetComponent <Animator>(), menuAnimator.loading); yield return(new WaitForSeconds(delay)); SceneManager.LoadScene(2); break; case TypeOfButton.Up: levelBrowser.MoveUp(); levelBrowser.ChangeMusic(); break; case TypeOfButton.Down: levelBrowser.MoveDown(); levelBrowser.ChangeMusic(); break; case TypeOfButton.Left: FindObjectOfType <SettingsTabs>().MoveLeft(); break; case TypeOfButton.Right: FindObjectOfType <SettingsTabs>().MoveRight(); break; case TypeOfButton.Play: menuAnimator.PlayAnimation(menuAnimator.levelBrowser.GetComponent <Animator>(), menuAnimator.loading); yield return(new WaitForSeconds(delay)); SceneManager.LoadScene(1); break; case TypeOfButton.Exit: // Application.Quit() does not work in the editor so UnityEditor.EditorApplication.isPlaying need to be set to false to end the game #if UNITY_EDITOR UnityEditor.EditorApplication.isPlaying = false; #else Application.Quit(); #endif break; } }
void Start() { menuAnim = GameObject.Find("Camera").GetComponent <MenuAnimator>(); painelVestimenta = GameObject.Find("painel vestimenta lab"); painelVidrarias = GameObject.Find("painel vidrarias lab"); }