Ejemplo n.º 1
0
    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;
    }
Ejemplo n.º 2
0
    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);
    }
Ejemplo n.º 3
0
    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
                );
        }
    }
Ejemplo n.º 4
0
    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);
    }
Ejemplo n.º 5
0
    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);
    }
Ejemplo n.º 6
0
    private void ShowKeyboardControls(bool val)
    {
        if (val == showingKeyboardControls)
        {
            return;
        }
        showingKeyboardControls = val;

        float alpha = val ? 1f : 0f;

        NDUITween.AlphaTo(keyboardInfoPanel, 0.5f, alpha, Easing.quartOut);
    }
Ejemplo n.º 7
0
    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);
    }
Ejemplo n.º 8
0
 private void HideCameraInfo()
 {
     NDUITween.AlphaTo(cameraInfoPanel, 1f, 0f, Easing.quartOut);
 }