本文整理汇总了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;
}
示例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);
}
}
示例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);
}
示例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;
}
示例5: ISWeapon
public ISWeapon()
{
_minDamage = 0;
_durability = 1;
_maxDurability = 100;
equipmentSlot = EquipmentSlot.Hands;
}
示例6: ISArmor
public ISArmor()
{
_curArmor = 0;
_maxArmor = 100;
_durability = 1;
_maxDurability = 100;
equipmentSlot = EquipmentSlot.Torso;
}
示例7: ISWeapon
public ISWeapon()
{
_minDamage = 0;
_durability = 1;
_maxDurability = 1;
_prefab = null;
equipmentSlot = EquipmentSlot.Weapon;
}
示例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));
}
示例9: ISArmor
public ISArmor()
{
_curArmor = 0;
_maxArmor = 0;
_durability = 1;
_maxDurability = 1;
equipmentSlot = EquipmentSlot.Chest;
}
示例10: Get
// TODO: remove method
public Item Get(EquipmentSlot slot)
{
Item result;
if (TryGet(slot, out result))
{
return result;
}
return null;
}
示例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;
}
}
示例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;
}
示例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
}
示例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;
}
}
示例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);
}