/// <summary> /// Change the selection. /// </summary> static protected void SetSelection (GameObject go, ControlScheme scheme) { if (mNextSelection != null) { mNextSelection = go; } else if (mCurrentSelection != go) { mNextSelection = go; mNextScheme = scheme; if (UICamera.list.size > 0) { UICamera cam = (mNextSelection != null) ? FindCameraForLayer(mNextSelection.layer) : UICamera.list[0]; if (cam != null) cam.StartCoroutine(cam.ChangeSelection()); } } }
protected static void SetSelection(GameObject go, UICamera.ControlScheme scheme) { if (UICamera.mNextSelection != null) { UICamera.mNextSelection = go; } else if (UICamera.mCurrentSelection != go) { UICamera.mNextSelection = go; UICamera.mNextScheme = scheme; if (UICamera.list.size > 0) { UICamera uICamera = (!(UICamera.mNextSelection != null)) ? UICamera.list[0] : UICamera.FindCameraForLayer(UICamera.mNextSelection.layer); if (uICamera != null) { uICamera.StartCoroutine(uICamera.ChangeSelection()); } } } }
/// <summary> /// Change the selection. /// </summary> static protected void SetSelection(GameObject go, ControlScheme scheme) { if (mNextSelection != null) { mNextSelection = go; } else if (mCurrentSelection != go) { if (mCurrentSelection != null) { UICamera uicam = FindCameraForLayer(mCurrentSelection.layer); if (uicam != null) { current = uicam; currentCamera = uicam.mCam; UICamera.currentScheme = scheme; Notify(mCurrentSelection, "OnSelect", false); current = null; } } mCurrentSelection = null; mNextSelection = go; mNextScheme = scheme; if (UICamera.list.size > 0) { UICamera cam = (mNextSelection != null) ? FindCameraForLayer(mNextSelection.layer) : UICamera.list[0]; if (cam != null) { cam.StartCoroutine(cam.ChangeSelection()); } } } }
protected static void SetSelection(GameObject go, ControlScheme scheme) { if (mNextSelection != null) { mNextSelection = go; } else { if (!(mCurrentSelection != go)) { return; } mNextSelection = go; mNextScheme = scheme; if (list.size > 0) { UICamera uICamera = ((mNextSelection != null) ? FindCameraForLayer(mNextSelection.layer) : list[0]); if (uICamera != null) { uICamera.StartCoroutine(uICamera.ChangeSelection()); } } } }