private void UpdateControlPanelPosition() { Vector3 pos = Vector3.zero; if (controlsOpen) { pos.x = 0f; } else { pos.x = -640f; } NDTween.RemoveAllTweens(controlsPanel.gameObject); NDUITween.To(controlsPanel.gameObject, 0.5f, pos, Easing.quartOut); pos = new Vector3(640f, 60f); if (controlsOpen) { pos.y = 240f; } NDTween.RemoveAllTweens(buttonHolder); NDUITween.To(buttonHolder, 0.5f, pos, Easing.quartOut); }
public void PlayIntro(bool audioMode) { // fade out title screen musicButton.SetActive(false); autoButton.SetActive(false); quitButton.SetActive(false); cameraControlsInfo.SetActive(!audioMode); NDTweenOptions opts = new NDTweenOptions(); opts.clearCurrentTweens = false; opts.easing = Easing.quartOut; NDUITween.AlphaTo( titlePanel, 4f, 0f, opts ); if (!audioMode) { opts.delay = 2f; NDUITween.To( buttonHolder, 0.5f, new Vector2(640f, 60f), opts ); } }
public void ShowStartScreen() { NDTweenWorker tween = NDUITween.AlphaTo( titlePanel, 4f, 1f, Easing.quartOut ); NDUITween.To( buttonHolder, 0.5f, new Vector2(640f, 0f), Easing.quartOut ); Vector3 pos = Vector3.zero; pos.x = -640f; NDTween.RemoveAllTweens(controlsPanel.gameObject); NDUITween.To(controlsPanel.gameObject, 0.5f, pos, Easing.quartOut); tween.OnTweenComplete += HandleStartShown; }
public void ShowPageThree() { Vector2 pos = panelHolder.GetComponent <RectTransform>().anchoredPosition; pos.y = 2400; panelHolder.GetComponent <RectTransform>().anchoredPosition = pos; NDTween.RemoveAllTweens(pageIndicator); NDUITween.To(pageIndicator, 0.3f, new Vector2(10f, -210f), Easing.quartOut); }