Esempio n. 1
0
        /// <summary>
        /// 获取奖励
        /// </summary>
        /// <param name="reward">Reward.</param>
        public void ObtainReward(Item reward)
        {
            // 添加物品
            Player.mainPlayer.AddItem(reward);

            // 显示物品简单信息面板
            expUICtr.SetUpSimpleItemDetail(reward);

            // 更新底部bar
            expUICtr.UpdateBottomBar();
        }
Esempio n. 2
0
        // 退出背包界面
        public void OnQuitBagPlaneButtonClick()
        {
            bagView.QuitBagPlane();

            ExploreUICotroller expUICtr = ExploreManager.Instance.expUICtr;

            expUICtr.UpdatePlayerStatusBar();
            expUICtr.UpdateBottomBar();

            Time.timeScale = 1;

            if (quitCallBack != null)
            {
                quitCallBack();
            }
        }
        public void ObtainAward(Item award)
        {
            switch (award.itemType)
            {
            case ItemType.Equipment:
                string tint       = string.Format("获得 <color=orange>{0}</color> x{1}", award.itemName, award.itemCount);
                Sprite itemSprite = GameManager.Instance.gameDataCenter.allItemSprites.Find(delegate(Sprite obj) {
                    return(obj.name == award.spriteName);
                });
                expUICtr.SetUpTintHUD(tint, itemSprite);
                break;

            case ItemType.Consumables:
                itemSprite = GameManager.Instance.gameDataCenter.allItemSprites.Find(delegate(Sprite obj) {
                    return(obj.name == award.spriteName);
                });
                tint = string.Format("获得 <color=orange>{0}</color>x{1}", award.itemName, award.itemCount);

                expUICtr.SetUpTintHUD(tint, itemSprite);
                expUICtr.UpdateBottomBar();
                break;

            case ItemType.UnlockScroll:
                expUICtr.SetUpUnlockScrollHUD(award);
                break;

            case ItemType.CraftingRecipes:
                expUICtr.SetUpCraftingRecipesHUD(award);
                break;

            case ItemType.CharacterFragment:
                tint = string.Format("获得字母碎片 <color=orange>{0}</color>", award.itemName);
                expUICtr.SetUpTintHUD(tint, null);
                break;
            }
        }