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


C# EquipmentSlot类代码示例

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


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

示例1: CanBeEquippedInSlot

        /// <summary>
        /// not used in this game
        /// </summary>
        /// <param name="slot"></param>
        /// <returns></returns>
        public bool CanBeEquippedInSlot(EquipmentSlot slot)
        {
            if (slot == EquipmentSlot.RightHand)
                return true;

            return false;
        }
开发者ID:Sinellil,项目名称:roguelike-cs,代码行数:12,代码来源:Dagger.cs

示例2: SendSlotUpdate

 /// <summary>
 /// When overridden in the derived class, notifies the owner of this object instance
 /// that an equipment slot has changed.
 /// </summary>
 /// <param name="slot">The slot that changed.</param>
 /// <param name="graphicIndex">The new graphic index of the slot.</param>
 protected override void SendSlotUpdate(EquipmentSlot slot, GrhIndex? graphicIndex)
 {
     using (var msg = ServerPacket.UpdateEquipmentSlot(slot, graphicIndex))
     {
         User.Send(msg, ServerMessageType.GUIItems);
     }
 }
开发者ID:wtfcolt,项目名称:game,代码行数:13,代码来源:UserEquipped.cs

示例3: CreateItemSlots

        void CreateItemSlots(int row, int column, EquipmentSlot slot)
        {
            var loc = new Vector2(row, column);
            var pos = _itemSize * loc;

            new EquippedItemPB(this, pos, slot);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:7,代码来源:EquippedForm.cs

示例4: CanBeEquippedInSlot

        /// <summary>
        /// not used in this game
        /// </summary>
        /// <param name="slot"></param>
        /// <returns></returns>
        public bool CanBeEquippedInSlot(EquipmentSlot slot)
        {
            if (slot == EquipmentSlot.Weapon)
                return true;

            return false;
        }
开发者ID:Sinellil,项目名称:roguelike-cs,代码行数:12,代码来源:HealingPotion.cs

示例5: ISWeapon

        public ISWeapon()
        {
            _minDamage = 0;
            _durability = 1;
            _maxDurability = 100;

            equipmentSlot = EquipmentSlot.Hands;
        }
开发者ID:mnapier,项目名称:ItemSystem,代码行数:8,代码来源:ISWeapon.cs

示例6: ISArmor

        public ISArmor()
        {
            _curArmor = 0;
            _maxArmor = 100;
            _durability = 1;
            _maxDurability = 100;

            equipmentSlot = EquipmentSlot.Torso;
        }
开发者ID:mnapier,项目名称:ItemSystem,代码行数:9,代码来源:ISArmor.cs

示例7: ISWeapon

        public ISWeapon()
        {
            _minDamage = 0;
            _durability = 1;
            _maxDurability = 1;
            _prefab = null;

            equipmentSlot = EquipmentSlot.Weapon;
        }
开发者ID:darianwiccan,项目名称:UnityGame,代码行数:9,代码来源:ISWeapon.cs

示例8: EquipItem

 private void EquipItem(EquipmentSlot part, int uid)
 {
     if (!IsEmpty(part))
         // Uh oh we are confused about something! But it's better to just do what the server says
     {
         UnEquipItem(part);
     }
     EquippedEntities.Add(part, Owner.EntityManager.GetEntity(uid));
 }
开发者ID:millpond,项目名称:space-station-14,代码行数:9,代码来源:EquipmentComponent.cs

示例9: ISArmor

        public ISArmor()
        {
            _curArmor = 0;
            _maxArmor = 0;
            _durability = 1;
            _maxDurability = 1;

            equipmentSlot = EquipmentSlot.Chest;
        }
开发者ID:darianwiccan,项目名称:UnityGame,代码行数:9,代码来源:ISArmor.cs

示例10: Get

        // TODO: remove method
        public Item Get(EquipmentSlot slot)
        {
            Item result;
                        if (TryGet(slot, out result))
                        {
                                return result;
                        }

                        return null;
        }
开发者ID:ephe-meral,项目名称:gw-interface,代码行数:11,代码来源:Equipment.cs

示例11: SetParameter

        public override void SetParameter(ComponentParameter parameter)
        {
            base.SetParameter(parameter);

            switch (parameter.MemberName)
            {
                case "wearloc":
                    wearloc = (EquipmentSlot) Enum.Parse(typeof (EquipmentSlot), parameter.GetValue<string>());
                    break;
            }
        }
开发者ID:Gartley,项目名称:ss13remake,代码行数:11,代码来源:EquippableComponent.cs

示例12: GetDefault

        /// <summary>
        /// Returns a default item that can be equipped to the given slot
        /// </summary>
        public ItemTemplate GetDefault(EquipmentSlot slot)
        {
            var template = m_defaultItemTemplates[(int)slot];
            if (template == null)
            {
                Setup.EnsureItemsLoaded();
                foreach (var temp in ItemMgr.Templates)
                {
                    if (temp != null && temp.EquipmentSlots.Contains(slot))
                    {
                        m_defaultItemTemplates[(int)slot] = template = temp;
                    }
                }
            }

            Assert.IsNotNull(template);
            return template;
        }
开发者ID:KroneckerX,项目名称:WCell,代码行数:21,代码来源:ItemPool.cs

示例13: SetCharacter

    private void SetCharacter()
    {
        //are we looking for player or npc?
        if (CharacterID == 0)
        {
            GameObject player = GameObject.Find("Player");

            if (player != null)
            {
                Transform childPart = player.transform.FindChild(slotName);

                if (childPart != null)
                {
                    equipmentSlot = childPart.GetComponent<EquipmentSlot>();
                }
            }
        }
        //TODO (Jukki) NPC previews? Party members
    }
开发者ID:thyjukki,项目名称:Rebelion,代码行数:19,代码来源:EquipmentPreview.cs

示例14: EquippedBy

 private void EquippedBy(int uid, EquipmentSlot wearloc)
 {
     Owner.SendMessage(this, ComponentMessageType.ItemEquipped);
     Owner.AddComponent(ComponentFamily.Mover,
                        Owner.EntityManager.ComponentFactory.GetComponent("SlaveMoverComponent"));
     Owner.SendMessage(this, ComponentMessageType.SlaveAttach, uid);
     switch (wearloc)
     {
         case EquipmentSlot.Back:
             SendDrawDepth(DrawDepth.MobOverAccessoryLayer);
             break;
         case EquipmentSlot.Belt:
             SendDrawDepth(DrawDepth.MobUnderAccessoryLayer);
             break;
         case EquipmentSlot.Ears:
             SendDrawDepth(DrawDepth.MobUnderAccessoryLayer);
             break;
         case EquipmentSlot.Eyes:
             SendDrawDepth(DrawDepth.MobUnderAccessoryLayer);
             break;
         case EquipmentSlot.Feet:
             SendDrawDepth(DrawDepth.MobUnderClothingLayer);
             break;
         case EquipmentSlot.Hands:
             SendDrawDepth(DrawDepth.MobOverAccessoryLayer);
             break;
         case EquipmentSlot.Head:
             SendDrawDepth(DrawDepth.MobOverClothingLayer);
             break;
         case EquipmentSlot.Inner:
             SendDrawDepth(DrawDepth.MobUnderClothingLayer);
             break;
         case EquipmentSlot.Mask:
             SendDrawDepth(DrawDepth.MobUnderAccessoryLayer);
             break;
         case EquipmentSlot.Outer:
             SendDrawDepth(DrawDepth.MobOverClothingLayer);
             break;
     }
 }
开发者ID:Gartley,项目名称:ss13remake,代码行数:40,代码来源:EquippableComponent.cs

示例15: EquipmentSlotUi

        public EquipmentSlotUi(EquipmentSlot slot, IPlayerManager playerManager, IResourceManager resourceManager,
                               IUserInterfaceManager userInterfaceManager)
        {
            _playerManager = playerManager;
            _resourceManager = resourceManager;
            _userInterfaceManager = userInterfaceManager;

            _color = Color.White;

            AssignedSlot = slot;
            _buttonSprite = _resourceManager.GetSprite("slot");
            _textSprite = new TextSprite(slot + "UIElementSlot", slot.ToString(),
                                         _resourceManager.GetFont("CALIBRI"))
                              {
                                  ShadowColor = Color.Black,
                                  ShadowOffset = new Vector2D(1, 1),
                                  Shadowed = true,
                                  Color = Color.White
                              };

            Update(0);
        }
开发者ID:Gartley,项目名称:ss13remake,代码行数:22,代码来源:EquipmentSlotUi.cs


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