コード例 #1
0
    private void Start()
    {
        bool isCinematicShowed = PlayerPrefs.GetInt("GameMenu.isCinematicShowed", 0) == 1;

        if (isCinematicShowed)
        {
            logo.interactable = logo.blocksRaycasts = false;
            LeanTweenEx.ChangeCanvasGroupAlpha(logo, 0.0f, 0.2f);
            SoundImage.sprite = SoundImageState[AudioManager.Instance.IsEnabled ? 1 : 0];
            ShowMainMenu();
        }
        else
        {
            logo.interactable = logo.blocksRaycasts = true;
            logo.alpha        = 1.0f;
            LeanTween.delayedCall(logoAnim.GetDuration(), () => {
                logo.interactable = logo.blocksRaycasts = false;
                LeanTweenEx.ChangeCanvasGroupAlpha(logo, 0.0f, 0.2f);
                SoundImage.sprite = SoundImageState[AudioManager.Instance.IsEnabled ? 1 : 0];
                ShowMainMenu();
                anim.Play("IntroAnimation");
                player.ScreenState = PlayerScreenState.Cinematic;
            });
            PlayerPrefs.SetInt("GameMenu.isCinematicShowed", 1);
        }
    }
コード例 #2
0
ファイル: MainMenuSimple.cs プロジェクト: Team-on/TriJam-61
    public void HideGameMenu()
    {
        LeanTween.cancel(gameObject, false);
        player.StopChangeLevelTextAlpha();
        LeanTweenEx.InvokeNextFrame(exitButton.gameObject, () => isInMenu = false);

        canvasGroup.interactable   = false;
        canvasGroup.blocksRaycasts = false;

        virtualCamera.Follow = player.transform;
        LeanTween.value(gameObject, virtualCamera.m_Lens.OrthographicSize, 5.0f, 1.0f)
        .setOnUpdate((float size) => {
            virtualCamera.m_Lens.OrthographicSize = size;
        });

        LeanTween.value(gameObject, chromaticAberration.intensity.value, defaultChromaticAberrationIntensity, 0.33f)
        .setOnUpdate((float intensity) => {
            chromaticAberration.intensity.value = intensity;
        });

        LeanTween.value(gameObject, grain.intensity.value, 0, 0.33f)
        .setOnUpdate((float intensity) => {
            grain.intensity.value = intensity;
        });

        LeanTweenEx.ChangeCanvasGroupAlpha(gameObject, canvasGroup, 0.0f, 0.33f);

        player.ChangeLevelTextAlpha(0.33f, 1.0f, false);

        optionsMenu.HideCanvas();
        levelsSelectionMenu.HideCanvas();
    }
コード例 #3
0
 public void ShowMainMenu()
 {
     anim.Play("MainMenuIdle");
     player.ScreenState = PlayerScreenState.MainMenu;
     cg.interactable    = cg.blocksRaycasts = true;
     LeanTweenEx.ChangeCanvasGroupAlpha(cg, 1.0f, 0.2f);
 }
コード例 #4
0
ファイル: MainMenuSimple.cs プロジェクト: Team-on/TriJam-61
    public void OnOtherMenuExit()
    {
        LeanTween.cancel(gameObject, false);

        LeanTweenEx.ChangeCanvasGroupAlpha(gameObject, canvasGroup, menuDefaultAlpha, 0.33f);
        canvasGroup.interactable   = true;
        canvasGroup.blocksRaycasts = true;
    }
コード例 #5
0
ファイル: MainMenuSimple.cs プロジェクト: Team-on/TriJam-61
    public void OnOtherMenuEnter()
    {
        LeanTween.cancel(gameObject, false);

        LeanTweenEx.ChangeCanvasGroupAlpha(gameObject, canvasGroup, 0.0f, 0.33f);
        canvasGroup.interactable   = false;
        canvasGroup.blocksRaycasts = false;
    }
コード例 #6
0
ファイル: RunnerSpawner.cs プロジェクト: Team-on/TriJam-68
    private void Awake()
    {
        points.Shuffle();

        LeanTween.delayedCall(gameObject, currTime, () => {
            LeanTween.moveLocalY(cg.gameObject, 100f, 0.2f);
            LeanTweenEx.ChangeCanvasGroupAlpha(cg, 0.0f, 0.2f);
        });
    }
コード例 #7
0
 public void OnCreditsBackClick()
 {
     if (creditscg.alpha == 0)
     {
         return;
     }
     player.ScreenState     = PlayerScreenState.MainMenu;
     creditscg.interactable = creditscg.blocksRaycasts = false;
     LeanTweenEx.ChangeCanvasGroupAlpha(creditscg, 0.0f, 0.2f);
 }
コード例 #8
0
 void HideHelpMenu()
 {
     if (isFirstClick)
     {
         isPlaying    = true;
         isFirstClick = false;
         LeanTween.moveLocalY(helpGroup.gameObject, 100f, 0.2f);
         LeanTweenEx.ChangeCanvasGroupAlpha(helpGroup, 0.0f, 0.2f);
     }
 }
コード例 #9
0
    void OnRespawnEnd()
    {
        GameManager.Instance.ambient = AudioManager.Instance.PlayLoopFaded(mainMenuAmbient, channel: AudioManager.AudioChannel.Music);

        LeanTweenEx.ChangeCanvasGroupAlpha(cg, 1.0f, 0.5f)
        .setDelay(1.0f);
        cg.blocksRaycasts = cg.interactable = true;

        firstButton.Select();
    }
コード例 #10
0
    public void HideCanvas()
    {
        if (!isShowed)
        {
            return;
        }
        isShowed = false;

        canvasGroup.interactable   = false;
        canvasGroup.blocksRaycasts = false;
        LeanTweenEx.ChangeCanvasGroupAlpha(gameObject, canvasGroup, 0.0f, 0.33f);
    }
コード例 #11
0
    public void Show()
    {
        if (isShowed)
        {
            return;
        }
        isShowed = true;

        canvasGroup.interactable   = true;
        canvasGroup.blocksRaycasts = true;
        LeanTweenEx.ChangeCanvasGroupAlpha(gameObject, canvasGroup, 1.0f, 0.33f);
        mainMenu.OnOtherMenuEnter();
    }
コード例 #12
0
    internal virtual void Show(bool isForce)
    {
        gameObject.SetActive(true);

        if (isForce)
        {
            canvasGroup.alpha = 1.0f;
        }
        else
        {
            LeanTweenEx.ChangeCanvasGroupAlpha(canvasGroup, 1.0f, animTime);
        }
    }
コード例 #13
0
 internal virtual void Hide(bool isForce)
 {
     if (isForce)
     {
         canvasGroup.alpha = 0.0f;
         gameObject.SetActive(false);
     }
     else
     {
         LeanTweenEx.ChangeCanvasGroupAlpha(canvasGroup, 0.0f, animTime)
         .setOnComplete(() => {
             gameObject.SetActive(false);
         });
     }
 }
コード例 #14
0
    public void Show(string text, Vector3 pos)
    {
        textField.text = text;
        UpdatePos(pos);
        LeanTweenEx.ChangeCanvasGroupAlpha(cg, 1.0f, 0.2f);

        if (isUp)
        {
            rt.rotation = Quaternion.Euler(0, 0, 0);
            textField.transform.rotation = Quaternion.Euler(0, 0, 0);
        }
        else
        {
            rt.rotation = Quaternion.Euler(0, 0, 180);
            textField.transform.rotation = Quaternion.Euler(0, 0, 0);
        }
    }
コード例 #15
0
ファイル: MainMenuSimple.cs プロジェクト: Team-on/TriJam-61
    public void ShowMainMenu(bool isForce)
    {
        LeanTween.cancel(gameObject, false);
        player.StopChangeLevelTextAlpha();
        isInMenu = true;

        canvasGroup.interactable   = true;
        canvasGroup.blocksRaycasts = true;

        virtualCamera.Follow = mainMenuCamereTarget;

        if (isForce)
        {
            grain.intensity.value = defaultGrainIntensity;
            chromaticAberration.intensity.value = 1.0f;
            canvasGroup.alpha = menuDefaultAlpha;
            player.ChangeLevelTextAlpha(0.0f, 0.0f, true);
            virtualCamera.m_Lens.OrthographicSize = 2;
        }
        else
        {
            LeanTween.value(gameObject, grain.intensity.value, defaultGrainIntensity, 0.33f)
            .setOnUpdate((float intensity) => {
                grain.intensity.value = intensity;
            });

            LeanTween.value(gameObject, chromaticAberration.intensity.value, 1.0f, 0.33f)
            .setOnUpdate((float intensity) => {
                chromaticAberration.intensity.value = intensity;
            });

            LeanTweenEx.ChangeCanvasGroupAlpha(gameObject, canvasGroup, menuDefaultAlpha, 0.33f);

            player.ChangeLevelTextAlpha(0.33f, 0.0f, false);

            LeanTween.value(gameObject, virtualCamera.m_Lens.OrthographicSize, 2.0f, 1.0f)
            .setOnUpdate((float size) => {
                virtualCamera.m_Lens.OrthographicSize = size;
            });
        }

        playButton.gameObject.SetActive(true);
        //playButton.Select();
    }
コード例 #16
0
 public void ShowCreditsLong()
 {
     player.ScreenState     = PlayerScreenState.SubMainMenu;
     creditscg.interactable = creditscg.blocksRaycasts = true;
     LeanTweenEx.ChangeCanvasGroupAlpha(creditscg, 1.0f, 0.5f);
 }
コード例 #17
0
 public void HideMainMenu()
 {
     cg.interactable = cg.blocksRaycasts = false;
     LeanTweenEx.ChangeCanvasGroupAlpha(cg, 0.0f, 0.2f);
 }
コード例 #18
0
 public void NewGame()
 {
     LeanTweenEx.ChangeCanvasGroupAlpha(cg, 0.0f, 0.2f);
     cg.blocksRaycasts = cg.interactable = false;
     GameManager.Instance.player.dialog.StartDialogue(OnDialogueEnd);
 }
コード例 #19
0
 public void Hide()
 {
     LeanTweenEx.ChangeCanvasGroupAlpha(cg, 0.0f, 0.2f);
 }
コード例 #20
0
 public void ShowLose()
 {
     LeanTweenEx.ChangeCanvasGroupAlpha(loseGroup, 1.0f, 0.2f);
     loseGroup.interactable = loseGroup.blocksRaycasts = true;
 }
コード例 #21
0
ファイル: MainMenu.cs プロジェクト: Team-on/TriJam-61
 public void OnPlayClick()
 {
     canvasGroup.interactable   = false;
     canvasGroup.blocksRaycasts = true;
     LeanTweenEx.ChangeCanvasGroupAlpha(canvasGroup, 0.0f, 0.25f);
 }