Exemplo n.º 1
0
    public void Update()
    {
        if (!isInSettings && !isInGift)
        {
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                ShowExitBox();
            }
        }

        if (gifts != null)
        {
            if (gifts.CanHideGiftGroup())
            {
                if (Input.GetButton("Fire1") || Input.GetKeyDown(KeyCode.Escape))
                {
                    ShowMainCanvas();
                    isInGift = false;
                    gifts.isAnimationDone = false;
                }
            }
        }

        if (isInSettings)
        {
            if (Input.GetKeyDown(KeyCode.Escape) && LoadingManager.canUseBackButton)
            {
                HideSettings();
            }
        }
    }