• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ItemInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ItemInfo的典型用法代码示例。如果您正苦于以下问题:C# ItemInfo类的具体用法?C# ItemInfo怎么用?C# ItemInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ItemInfo类属于命名空间,在下文中一共展示了ItemInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Refresh

 public void Refresh(ItemInfo info, ItemInfo parentInfo, bool ifEnough = false)
 {
     if (ifEnough)
     {
         this.mListPanel.CheckIfEnough(info);
     }
     else
     {
         this.mListPanel.Refresh(info, parentInfo);
         if (Globals.Instance.AttDB.AwakeRecipeDict.GetInfo(info.ID) == null)
         {
             this.mCreateInfoLayer.gameObject.SetActive(false);
             this.mSourceInfoLayer.gameObject.SetActive(true);
             this.mSourceBG.enabled = true;
             this.mSourceInfoLayer.Refresh(info);
         }
         else
         {
             this.mCreateInfoLayer.gameObject.SetActive(true);
             this.mSourceInfoLayer.gameObject.SetActive(false);
             this.mSourceBG.enabled = false;
             this.mCreateInfoLayer.Refresh(info, parentInfo);
         }
     }
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:25,代码来源:AwakeItemDetailLayer.cs


示例2: AddItem

    public void AddItem()
    {
        if (this.bAddAble == false) return;

        //셋팅된 정보대로 ItemInfo 를 만든다.

        ItemInfo newItemInfo = new ItemInfo();

        newItemInfo.name = inputName.value;             //입력된 이름

        if (inputPopup.value.CompareTo("Type0") == 0 )
            newItemInfo.type = 0;

        else if (inputPopup.value.CompareTo("Type1") == 0)
            newItemInfo.type = 1;

        else if (inputPopup.value.CompareTo("Type2") == 0)
            newItemInfo.type = 2;


        this.itemList.AddItem(newItemInfo);


        //한번 추가된 이후로 중복 추가 안되게.
        this.bAddAble = false;



    }
开发者ID:lthnim371,项目名称:UnityUpload,代码行数:29,代码来源:AddItemPanel.cs


示例3: CommonSourceItemData

 public CommonSourceItemData(int sceneID, ItemInfo itemInfo, ulong index)
 {
     this.mSourceType = EItemSource.EISource_SceneLoot;
     this.mSceneID = sceneID;
     this.mItemInfo = itemInfo;
     this.id = index;
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:7,代码来源:CommonSourceItemData.cs


示例4: FindClosestTreeInRadius

        public static bool FindClosestTreeInRadius(Vector3D fromPosition, float radius, out ItemInfo result)
        {
            result = default(ItemInfo);

            BoundingSphereD sphere = new BoundingSphereD(fromPosition, (double)radius);
            var entities = MyEntities.GetEntitiesInSphere(ref sphere);

            double closestDistanceSq = double.MaxValue;

            foreach (MyEntity entity in entities)
            {
                MyTrees trees = entity as MyTrees;
                if (trees == null) continue;

                trees.GetPhysicalItemsInRadius(fromPosition, radius, m_tmpEnvItemList);

                foreach (var tree in m_tmpEnvItemList)
                {
                    double distanceSq = Vector3D.DistanceSquared(fromPosition, tree.Transform.Position);
                    if (distanceSq < closestDistanceSq)
                    {
                        result.ItemsEntityId = entity.EntityId;
                        result.ItemId = tree.LocalId;
                        result.Target = tree.Transform.Position;
                        closestDistanceSq = distanceSq;
                    }
                }
            }

			entities.Clear();

            return closestDistanceSq != double.MaxValue;
        }
开发者ID:Krulac,项目名称:SpaceEngineers,代码行数:33,代码来源:MyItemsCollector.cs


示例5: ItemUsedOnBlock

        private void ItemUsedOnBlock(World world, Coordinates3D coordinates, BlockFace face, Coordinates3D cursor, ItemInfo item)
        {
            var info = world.GetBlockInfo(coordinates);
            if (Block.GetIsSolidOnFace(info, face) == false)
                return;
            
            coordinates += MathHelper.BlockFaceToCoordinates(face);

            switch (face)
            {
                case BlockFace.NegativeZ:
                    world.SetBlockId(coordinates, item.ItemId);
                    world.SetMetadata(coordinates, (byte)Orientation.FacingNorth);
                    break;
                case BlockFace.PositiveZ:
                    world.SetBlockId(coordinates, item.ItemId);
                    world.SetMetadata(coordinates, (byte)Orientation.FacingSouth);
                    break;
                case BlockFace.NegativeX:
                    world.SetBlockId(coordinates, item.ItemId);
                    world.SetMetadata(coordinates, (byte)Orientation.FacingWest);
                    break;
                case BlockFace.PositiveX:
                    world.SetBlockId(coordinates, item.ItemId);
                    world.SetMetadata(coordinates, (byte)Orientation.FacingEast);
                    break;
                default:
                    // Ladders can't be placed lying flat.
                    break;
            }
        }
开发者ID:Bitterholz,项目名称:Craft.Net,代码行数:31,代码来源:LadderBlock.cs


示例6: Init

 public void Init(ItemInfo itemInfo)
 {
     BagIndex = itemInfo.BagIndex;
     Quality = ItemModeLocator.Instance.GetQuality(itemInfo.TmplId);
     DateTime expireTime = Utils.ConvertFromJavaTimestamp(itemInfo.ExpireTime);
     TimeRemain = expireTime.Subtract(DateTime.Now);
 }
开发者ID:wuxin0602,项目名称:Nothing,代码行数:7,代码来源:BuyBackItem.cs


示例7: Item

 public Item(int id, bool isEqueped, ItemInfo info)
 {
     this.id = id;
     this.count = 1;
     this.info = info;
     this.isEqueped = isEqueped;
 }
开发者ID:tsss-t,项目名称:SimpleStory,代码行数:7,代码来源:Item.cs


示例8: Refresh

 public void Refresh(PetInfo petInfo, int curPetCount, int needPetCount)
 {
     this.mItemInfo = null;
     this.mPetInfo = petInfo;
     this.mLopetInfo = null;
     this.IsEnough = (curPetCount >= needPetCount);
     if (petInfo != null)
     {
         this.mIcon.gameObject.SetActive(true);
         this.mQualityMask.gameObject.SetActive(true);
         this.mIcon.spriteName = petInfo.Icon;
         this.mQualityMask.spriteName = Tools.GetItemQualityIcon(petInfo.Quality);
     }
     else
     {
         this.mIcon.gameObject.SetActive(false);
         this.mQualityMask.gameObject.SetActive(false);
     }
     this.mSb.Remove(0, this.mSb.Length);
     if (curPetCount < needPetCount)
     {
         this.mSb.Append("[ff0000]");
     }
     else
     {
         this.mSb.Append("[ffffff]");
     }
     this.mSb.Append(curPetCount).Append("[-]/").Append(needPetCount);
     this.mNum.text = this.mSb.ToString();
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:30,代码来源:GUIPetTrainJinjieItem.cs


示例9: GUITrialRewardItemData

 public GUITrialRewardItemData(ERewardType et, ItemInfo iInfo, int num, int dNum)
 {
     this.mERewardType = et;
     this.mItemInfo = iInfo;
     this.mItemNum = num;
     this.mDaiBiNum = dNum;
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:7,代码来源:GUITrialRewardItemData.cs


示例10: Refresh

 public void Refresh(ItemInfo itemInfo, bool isMask)
 {
     this.mPetInfo = null;
     this.mItemInfo = itemInfo;
     this.mIsActive = isMask;
     this.Refresh();
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:7,代码来源:GUIPetInfoYuanFenItemIcon.cs


示例11: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            string key = core.Http["key"];

            try
            {
                ItemInfo info = new ItemInfo(core, key);

                // about to redirect, preserve the referer

                string urlreferer = Request.QueryString["urlreferer"];
                if (!string.IsNullOrEmpty(urlreferer))
                {
                    // update the session record
                    db.UpdateQuery(string.Format("UPDATE user_sessions SET session_http_referer = '{2}' WHERE session_string = '{1}' AND session_ip = '{0}';",
                    core.Session.IPAddress.ToString(), core.Session.SessionId, urlreferer));
                }

                core.Http.StatusCode = 301;
                core.Http.ForceDomain = true;
                core.Http.Redirect(info.Uri);
            }
            catch (InvalidIteminfoException)
            {
                core.Functions.Generate404();
            }
            /*catch
            {
                core.Functions.Generate404();
            }*/
        }
开发者ID:smithydll,项目名称:boxsocial,代码行数:31,代码来源:shorturl.aspx.cs


示例12: Refresh

 private void Refresh()
 {
     if (this.mLootData != null)
     {
         if (this.mLootData.RewardType == 1)
         {
             this.mItemIcon.spriteName = "M101";
             this.mItemQuality.spriteName = Tools.GetItemQualityIcon(0);
             this.mItemNum.text = this.mLootData.RewardValue1.ToString();
             this.mItemInfo = null;
         }
         else if (this.mLootData.RewardType == 2)
         {
             this.mItemIcon.spriteName = "M102";
             this.mItemQuality.spriteName = Tools.GetItemQualityIcon(2);
             this.mItemNum.text = this.mLootData.RewardValue1.ToString();
             this.mItemInfo = null;
         }
         else if (this.mLootData.RewardType == 3)
         {
             this.mItemInfo = Globals.Instance.AttDB.ItemDict.GetInfo(this.mLootData.RewardValue1);
             if (this.mItemInfo != null)
             {
                 this.mItemIcon.spriteName = this.mItemInfo.Icon;
                 this.mItemQuality.spriteName = Tools.GetItemQualityIcon(this.mItemInfo.Quality);
                 this.mItemNum.text = this.mLootData.RewardValue2.ToString();
             }
         }
     }
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:30,代码来源:GUIGuildLootItemBase.cs


示例13: Init

 public void Init(ItemInfo info, int num, bool showValue, bool showTips)
 {
     this.itemInfo = info;
     this.count = num;
     this.petInfo = Globals.Instance.AttDB.PetDict.GetInfo(this.itemInfo.Value2);
     if (this.petInfo == null)
     {
         global::Debug.LogError(new object[]
         {
             string.Format("PetDict.GetInfo, ID = {0}", this.itemInfo.Value2)
         });
         base.gameObject.SetActive(false);
         return;
     }
     UISprite component = base.GetComponent<UISprite>();
     component.spriteName = Tools.GetItemQualityIcon(this.petInfo.Quality);
     UISprite uISprite = GameUITools.FindUISprite("icon", base.gameObject);
     uISprite.spriteName = this.petInfo.Icon;
     UILabel uILabel = GameUITools.FindUILabel("num", base.gameObject);
     if (showValue)
     {
         uILabel.text = this.count.ToString();
     }
     else
     {
         uILabel.gameObject.SetActive(false);
     }
     if (showTips)
     {
         UIEventListener expr_FD = UIEventListener.Get(base.gameObject);
         expr_FD.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_FD.onClick, new UIEventListener.VoidDelegate(this.OnRewardClick));
     }
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:33,代码来源:RewardPetItem.cs


示例14: Init

 private void Init(ItemInfo info, int num)
 {
     if (info.Type != 3 || info.SubType != 3)
     {
         global::Debug.LogErrorFormat("Use reward type error {0}", new object[]
         {
             (EItemType)info.Type
         });
         base.gameObject.SetActive(false);
         return;
     }
     this.itemInfo = info;
     this.lopetInfo = Globals.Instance.AttDB.LopetDict.GetInfo(this.itemInfo.Value2);
     if (this.lopetInfo == null)
     {
         global::Debug.LogError(new object[]
         {
             string.Format("LopetDict.GetInfo, ID = {0}", this.itemInfo.Value2)
         });
         base.gameObject.SetActive(false);
         return;
     }
     UISprite uISprite = GameUITools.FindUISprite("Quality", base.gameObject);
     uISprite.spriteName = Tools.GetItemQualityIcon(this.lopetInfo.Quality);
     UISprite component = base.GetComponent<UISprite>();
     component.spriteName = this.lopetInfo.Icon;
     UILabel uILabel = GameUITools.FindUILabel("num", base.gameObject);
     uILabel.text = string.Format("{0}{1}[-] [FFFFFF]x{2}", Tools.GetItemQualityColorHex(this.lopetInfo.Quality), this.itemInfo.Name, num);
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:29,代码来源:QuestRewardLopetItem.cs


示例15: OnGUI

    void OnGUI()
    {
        m_Type = (ItemType)EditorGUILayout.EnumPopup("Item Type", m_Type);
        m_strName = EditorGUILayout.TextField("Name", m_strName);
        m_strDescription = EditorGUILayout.TextField("Description", m_strDescription);

        ScriptableObject target = this;
        SerializedObject so = new SerializedObject(target);
        SerializedProperty sp_picNames = so.FindProperty("m_strPicNames");
        SerializedProperty sp_childItems = so.FindProperty("m_iChildItems");

        EditorGUILayout.PropertyField(sp_picNames, true);
        EditorGUILayout.PropertyField(sp_childItems, true);
        so.ApplyModifiedProperties();


        if (GUILayout.Button("Create"))
        {
            ItemInfo info = new ItemInfo();
            info.m_iID = 0;
            info.m_Type = m_Type;
            info.m_strName = m_strName;
            info.m_strDescription = m_strDescription;
            info.m_iPhotoIDs = m_iPhotoIDs;
            info.m_iChildIDs = m_iChildIDs;

            WriteItemInfo(info);
        }
    }
开发者ID:Fleeting198,项目名称:Crime-Scene-Investigation,代码行数:29,代码来源:CreatItemInfo.cs


示例16: SetItemInfo

    public void SetItemInfo( ItemInfo itemInfo )
    {
        //셋팅된 아이템 정보 물린다.
        this.itemInfo = itemInfo;

        //아이템이 해제되었다면..
        if (this.itemInfo == null)
        {
            this.itemImage.enabled = false;
        }

        //아이템이 셋팅되었다면..
        else
        {
            //ㅅ활성화 시키고
            this.itemImage.enabled = true;

            //셋팅된 아이템 이미지로 교체
            this.itemImage.spriteName =
                ItemInfo.ItemType[this.itemInfo.type];

        }
        

    }
开发者ID:lthnim371,项目名称:UnityUpload,代码行数:25,代码来源:ItemSlot.cs


示例17: ParseItemInfo

        public static ItemInfo ParseItemInfo(string itemdata)
        {
            try
            {
                var item = new ItemInfo();
                var sdata = itemdata.Split(',');
                var index = 0;
                item.Id = int.Parse(sdata[index++]);
                item.BotId = int.Parse(sdata[index++]);
                item.Time = float.Parse(sdata[index++]);
                item.ItemType = int.Parse(sdata[index++]);
                item.px = float.Parse(sdata[index++]);
                item.py = float.Parse(sdata[index++]);
                if (sdata.Length > index)
                {
                    item.Itemdata = string.Join(",", sdata, index, sdata.Length - index);
                }
                return item;
            }
            catch (System.Exception)
            {

                return null;
            }
        }
开发者ID:windwp,项目名称:mytool,代码行数:25,代码来源:ItemInfo.cs


示例18: InitPopUp

 public override void InitPopUp(ItemInfo info)
 {
     if (info == null)
     {
         return;
     }
     this.Refresh(info);
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:8,代码来源:GUIPropsInfoPopUp.cs


示例19: FlyBagItemInfo

 public static ItemInfo FlyBagItemInfo()
 {
     var item = new ItemInfo();
     item.ItemType = 5;
     item.Itemdata = "";
     item.ItemName = "FlyBag"; 
     return item;
 }
开发者ID:windwp,项目名称:mytool,代码行数:8,代码来源:ItemInfo.cs


示例20: BulletItemInfo

 public static ItemInfo BulletItemInfo()
 {
     var item = new ItemInfo();
     item.ItemType = 4;
     item.Itemdata = "";
     item.ItemName = "Bulllet";
     return item;
 }
开发者ID:windwp,项目名称:mytool,代码行数:8,代码来源:ItemInfo.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ItemList类代码示例发布时间:2022-05-24
下一篇:
C# ItemIdentifier类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap