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; }
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 ); } }
void Start() { cameraTypes = new string[] { "Static Camera", "Watch Camera", "Follow Camera", "Lookback Camera", "Free Camera" }; controlsPanel.transform.position = new Vector3(-640f, 0f, 0f); NDUITween.AlphaTo(cameraInfoPanel, 0f, 0f); NDUITween.AlphaTo(keyboardInfoPanel, 0f, 0f); }
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); }
private void ShowKeyboardControls(bool val) { if (val == showingKeyboardControls) { return; } showingKeyboardControls = val; float alpha = val ? 1f : 0f; NDUITween.AlphaTo(keyboardInfoPanel, 0.5f, alpha, Easing.quartOut); }
public void SetCameraMode(int cameraMode) { cameraInfoPanel.GetComponentInChildren <TextMeshProUGUI>().SetText(cameraTypes[cameraMode]); NDTween.RemoveAllTweens(cameraInfoPanel, true); NDTweenOptions opts = new NDTweenOptions(); opts.clearCurrentTweens = false; opts.easing = Easing.quartOut; NDUITween.AlphaTo(cameraInfoPanel, 0.3f, 1f, opts); opts.delay = 2.5f; NDUITween.AlphaTo(cameraInfoPanel, 1f, 0f, opts); ShowKeyboardControls(cameraMode == FlockingCameraController.USER_CONTROL); }
private void HideCameraInfo() { NDUITween.AlphaTo(cameraInfoPanel, 1f, 0f, Easing.quartOut); }