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

C# MapEntityIndex类代码示例

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

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



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

示例1: CharDamage

 public static PacketWriter CharDamage(MapEntityIndex mapEntityIndex, int damage)
 {
     var pw = GetWriter(ServerPacketID.CharDamage);
     pw.Write(mapEntityIndex);
     pw.Write(damage);
     return pw;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:7,代码来源:ServerPacket.cs


示例2: AcceptOrTurnInQuest

 public static PacketWriter AcceptOrTurnInQuest(MapEntityIndex questProvider, QuestID questID)
 {
     var pw = GetWriter(ClientPacketID.AcceptOrTurnInQuest);
     pw.Write(questProvider);
     pw.Write(questID);
     return pw;
 }
开发者ID:Furt,项目名称:netgore,代码行数:7,代码来源:ClientPacket.cs


示例3: ItemEntity

        public ItemEntity(MapEntityIndex mapEntityIndex, Vector2 pos, Vector2 size, GrhIndex graphicIndex, TickCount currentTime)
            : base(pos, size)
        {
            Amount = 0;

            ((IDynamicEntitySetMapEntityIndex)this).SetMapEntityIndex(mapEntityIndex);
            _grh = new Grh(GrhInfo.GetData(graphicIndex), AnimType.Loop, currentTime);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:8,代码来源:ItemEntity.cs


示例4: Attack

 public static PacketWriter Attack(MapEntityIndex? target)
 {
     var pw = GetWriter(ClientPacketID.Attack);
     pw.Write(target.HasValue);
     if (target.HasValue)
         pw.Write(target.Value);
     return pw;
 }
开发者ID:Furt,项目名称:netgore,代码行数:8,代码来源:ClientPacket.cs


示例5: ChatSay

 public static PacketWriter ChatSay(string name, MapEntityIndex mapEntityIndex, string text)
 {
     var pw = GetWriter(ServerPacketID.ChatSay);
     pw.Write(name, GameData.MaxServerSayNameLength);
     pw.Write(mapEntityIndex);
     pw.Write(text, GameData.MaxServerSayLength);
     return pw;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:8,代码来源:ServerPacket.cs


示例6: CharAttack

        public static PacketWriter CharAttack(MapEntityIndex attacker, MapEntityIndex? attacked = null, ActionDisplayID? actionDisplay = null)
        {
            var pw = GetWriter(ServerPacketID.CharAttack);
            pw.Write(attacker);

            pw.Write(attacked.HasValue);
            if (attacked.HasValue)
                pw.Write(attacked.Value);

            pw.Write(actionDisplay.HasValue);
            if (actionDisplay.HasValue)
                pw.Write(actionDisplay.Value);

            return pw;
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:15,代码来源:ServerPacket.cs


示例7: GetTargetCharacter

        static Character GetTargetCharacter(Character user, MapEntityIndex? index)
        {
            if (!index.HasValue)
                return null;

            // Check for a valid user
            if (user == null || user.Map == null)
                return null;

            // Check for a valid target index
            var target = user.Map.GetDynamicEntity<Character>(index.Value);
            if (target == null || target.Map != user.Map)
                return null;

            // Check for a valid distance
            if (user.GetDistance(target) > GameData.MaxTargetDistance)
                return null;

            return target;
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:20,代码来源:ServerPacketHandler.cs


示例8: StartNPCChatDialog

 public static PacketWriter StartNPCChatDialog(MapEntityIndex npcIndex, bool forceSkipQuestDialog)
 {
     var pw = GetWriter(ClientPacketID.StartNPCChatDialog);
     pw.Write(npcIndex);
     pw.Write(forceSkipQuestDialog);
     return pw;
 }
开发者ID:Furt,项目名称:netgore,代码行数:7,代码来源:ClientPacket.cs


示例9: SkillStopCasting_ToMap

 public static PacketWriter SkillStopCasting_ToMap(MapEntityIndex entityIndex)
 {
     var pw = GetWriter(ServerPacketID.SkillStopCasting_ToMap);
     pw.Write(entityIndex);
     return pw;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:6,代码来源:ServerPacket.cs


示例10: CreateActionDisplayAtEntity

        public static PacketWriter CreateActionDisplayAtEntity(ActionDisplayID actionDisplayId, MapEntityIndex sourceEntityIndex, MapEntityIndex? targetEntityIndex = null)
        {
            var pw = GetWriter(ServerPacketID.CreateActionDisplayAtEntity);
            pw.Write(actionDisplayId);
            pw.Write(sourceEntityIndex);

            pw.Write(targetEntityIndex.HasValue);
            if (targetEntityIndex.HasValue)
                pw.Write(targetEntityIndex.Value);

            return pw;
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:12,代码来源:ServerPacket.cs


示例11: SkillStartCasting_ToMap

 public static PacketWriter SkillStartCasting_ToMap(MapEntityIndex entityIndex, SkillType skillType)
 {
     var pw = GetWriter(ServerPacketID.SkillStartCasting_ToMap);
     pw.Write(entityIndex);
     pw.WriteEnum(skillType);
     return pw;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:7,代码来源:ServerPacket.cs


示例12: SetUserChar

 /// <summary>
 /// Sets which map character is the one controlled by the user
 /// </summary>
 /// <param name="mapEntityIndex">Map character index controlled by the user</param>
 public static PacketWriter SetUserChar(MapEntityIndex mapEntityIndex)
 {
     var pw = GetWriter();
     SetUserChar(pw, mapEntityIndex);
     return pw;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:10,代码来源:ServerPacket.cs


示例13: Emote

 public static PacketWriter Emote(MapEntityIndex mapEntityIndex, Emoticon emoticon)
 {
     var pw = GetWriter(ServerPacketID.Emote);
     pw.Write(mapEntityIndex);
     pw.WriteEnum(emoticon);
     return pw;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:7,代码来源:ServerPacket.cs


示例14: StartQuestChatDialog

        public static PacketWriter StartQuestChatDialog(MapEntityIndex npcIndex, IEnumerable<QuestID> availableQuests,
                                                        IEnumerable<QuestID> turnInQuests)
        {
            var pw = GetWriter(ServerPacketID.StartQuestChatDialog);

            pw.Write(npcIndex);

            // Write the list of available quests
            if (availableQuests != null)
            {
                var values = availableQuests.ToImmutable();
                Debug.Assert(values.Count() <= byte.MaxValue);
                pw.Write((byte)values.Count());
                foreach (var q in values)
                {
                    pw.Write(q);
                }
            }
            else
                pw.Write((byte)0);

            // Write the list of quests that can be turned in
            if (turnInQuests != null)
            {
                var values = turnInQuests.ToImmutable();
                Debug.Assert(values.Count() <= byte.MaxValue);
                pw.Write((byte)values.Count());
                foreach (var q in values)
                {
                    pw.Write(q);
                }
            }
            else
                pw.Write((byte)0);

            return pw;
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:37,代码来源:ServerPacket.cs


示例15: UseEntity

 public static PacketWriter UseEntity(MapEntityIndex usedEntity, MapEntityIndex usedBy)
 {
     var pw = GetWriter(ServerPacketID.UseEntity);
     pw.Write(usedEntity);
     pw.Write(usedBy);
     return pw;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:7,代码来源:ServerPacket.cs


示例16: SetCharacterPaperDoll

        public static PacketWriter SetCharacterPaperDoll(MapEntityIndex mapEntityIndex, IEnumerable<string> layers)
        {
            var pw = GetWriter(ServerPacketID.SetCharacterPaperDoll);
            pw.Write(mapEntityIndex);

            pw.Write((byte)layers.Count());
            foreach (var layer in layers)
            {
                pw.Write(layer);
            }

            return pw;
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:13,代码来源:ServerPacket.cs


示例17: SetCharacterMPPercent

 public static PacketWriter SetCharacterMPPercent(MapEntityIndex mapEntityIndex, byte mpPercent)
 {
     var pw = GetWriter();
     SetCharacterMPPercent(pw, mapEntityIndex, mpPercent);
     return pw;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:6,代码来源:ServerPacket.cs


示例18: RemoveDynamicEntity

 public static PacketWriter RemoveDynamicEntity(MapEntityIndex mei)
 {
     var pw = GetWriter(ServerPacketID.RemoveDynamicEntity);
     pw.Write(mei);
     return pw;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:6,代码来源:ServerPacket.cs


示例19: PlaySoundAtEntity

 public static PacketWriter PlaySoundAtEntity(SoundID sound, MapEntityIndex mapEntityIndex)
 {
     var pw = GetWriter(ServerPacketID.PlaySoundAtEntity);
     pw.Write(sound);
     pw.Write(mapEntityIndex);
     return pw;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:7,代码来源:ServerPacket.cs


示例20: NotifyLevel

 public static PacketWriter NotifyLevel(MapEntityIndex mapEntityIndex)
 {
     var pw = GetWriter(ServerPacketID.NotifyLevel);
     pw.Write(mapEntityIndex);
     return pw;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:6,代码来源:ServerPacket.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# MapIcon类代码示例发布时间:2022-05-24
下一篇:
C# MapData类代码示例发布时间: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