当前位置: 首页>>代码示例>>C#>>正文


C# PlayerState.GetPlayerBag方法代码示例

本文整理汇总了C#中PlayerState.GetPlayerBag方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerState.GetPlayerBag方法的具体用法?C# PlayerState.GetPlayerBag怎么用?C# PlayerState.GetPlayerBag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PlayerState的用法示例。


在下文中一共展示了PlayerState.GetPlayerBag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

    // Use this for initialization
    void Start () {
        playerState = PlayerState._instance;

        ItemInfoPanel = GameObject.FindGameObjectWithTag(Tags.UIRoot).transform.Find("EquepMenu").Find("ItemInfoPanel").GetComponent<UIItemInfoPanel>();
        switch (from)
        {
            case ItemFrom.Bag:
                item = playerState.GetPlayerBag().dictionBag[int.Parse(gameObject.transform.parent.name)];
                break;
            case ItemFrom.Equep:

                break;
            case ItemFrom.Shop:
                item = GameObject.FindGameObjectWithTag(Tags.UIRoot).transform.Find("EquepMenu").Find("ShopBG").GetComponent<UIShopManager>().getShopDictionary()[int.Parse(gameObject.transform.parent.name)];
                break;
            default:
                break;
        }
    }
开发者ID:tsss-t,项目名称:SimpleStory,代码行数:20,代码来源:UIBagButtonEvent.cs

示例2: Start

    void Start()
    {
        playerState = PlayerState._instance;
        playerBag = playerState.GetPlayerBag();
        isShowPanel = false;
        //equepInfo = plyerState.getPlayerEquep();

        dictionaryUIBagItem = new Dictionary<int, GameObject>();
        dictionaryEquep = new Dictionary<ItemType, ItemInfo>();

        mainControllerUI = GameObject.FindGameObjectWithTag(Tags.UIRoot).GetComponent<UIController>();

        containBagGrid = transform.Find("BagBG").Find("Scroll View").Find("Items").gameObject;
        containEqueps = transform.Find("EquepBG").gameObject;
        containEquepInfo = transform.Find("ItemInfoPanel").Find("ItemInfoBG").gameObject;
        containShop = transform.Find("ShopBG").gameObject;

        containState = containEqueps.transform.Find("StateBG");


        HPstate = containState.Find("LabelHPstate").GetComponent<UILabel>();
        STRstate = containState.Find("LabelSTRstate").GetComponent<UILabel>();
        DEXstate = containState.Find("LabelDEXstate").GetComponent<UILabel>();
        INTstate = containState.Find("LabelINTstate").GetComponent<UILabel>();
        Energystate = containState.Find("LabelEnergystate").GetComponent<UILabel>();
        EXPstate = containState.Find("LabelEXPstate").GetComponent<UILabel>();
        ATKstate = containState.Find("LabelATKstate").GetComponent<UILabel>();
        DEFstate = containState.Find("LabelDEFstate").GetComponent<UILabel>();
        CONstate = containState.Find("LabelCONstate").GetComponent<UILabel>();
        Moneystate = transform.Find("BagBG").Find("LabelMoney").GetComponent<UILabel>();
        shopManagerUI = containShop.GetComponent<UIShopManager>();

        playerState.OnPlayerStateChanged += OnStatesChanged;
        gameObject.SetActive(false);

        containEquepInfo.SetActive(false);
    }
开发者ID:tsss-t,项目名称:SimpleStory,代码行数:37,代码来源:UIBagManager.cs


注:本文中的PlayerState.GetPlayerBag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。