public void Examine(Script_Collectible _collectible)
    {
        if (isInputDisabled)
        {
            return;
        }
        print("trying to examine:" + _collectible.name);
        collectible = _collectible;

        // show full art and set it via out
        if (!fullArtDictionary.myDictionary.TryGetValue(collectible.fullArtId, out fullArt))
        {
            // the key isn't in the dictionary.
            print("value of fullArt" + fullArt);
            Debug.LogError($"Key:{collectible.fullArtId} is not in dictionary");
            ItemsController.ExitFullArt();
            return;
        }

        isInputDisabled = true;
        ItemsController.EnterFullArt();
        Script_Game.Game.fullArtManager.ShowFullArt(
            fullArt,
            collectible.fadeInSpeed,  // Use collectible fadeIn speed so fullArt can be extensible
            () =>
        {
            isFullArtMode   = true;
            isInputDisabled = false;
        },
            Script_FullArtManager.FullArtState.Inventory
            );
        // on space or enter exit, reactivate eventSystem
    }
示例#2
0
    void Examine(
        Script_Collectible collectible
        )
    {
        if (collectible.isExamineDisabled)
        {
            ErrorDullSFX();
            return;
        }

        HideItemChoices();
        collectiblesHandler.Examine(collectible);
    }
    private void Update()
    {
        if (!isFullArtMode || isInputDisabled)
        {
            return;
        }

        if (
            Input.GetButtonDown(Const_KeyCodes.Inventory) ||
            Input.GetButtonDown(Const_KeyCodes.Cancel) ||
            Input.GetButtonDown(Const_KeyCodes.Action1) ||
            Input.GetButtonDown(Const_KeyCodes.Submit)
            )
        {
            isInputDisabled = true;
            /// Need to disable exit input managers bc if we exit too fast before fadeOut cb is finished
            /// ItemChoicesInputManager will exit before this can
            mainController.state = UIState.Disabled;

            if (fullArt.nextFullArt == null)
            {
                Debug.Log($"End fullart detected; {this.name} attempting to hide collectible full art");

                Script_Game.Game.fullArtManager.HideFullArt(fullArt, collectible.fadeOutSpeed, () =>
                {
                    print("isplayer state interact: " + Script_Game.Game.GetPlayer().State == Const_States_Player.Interact);
                    isInputDisabled      = false;
                    mainController.state = UIState.Interact;
                    isFullArtMode        = false;
                    collectible          = null;

                    // reactivate EventSystemMain and get back to inventory slots
                    ItemsController.ExitFullArt();
                });
            }
            else
            {
                ContinueExamine();
            }
        }
    }