本文整理汇总了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;
}
}
示例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);
}