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

C# Map.World类代码示例

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

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



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

示例1: CreateGizmo

        private static Actor CreateGizmo(World world, int snoId, TagMap tags)
        {
            if (tags.ContainsKey(MarkerKeys.DestinationWorld))
                return new Portal(world, snoId, tags);

            return new Gizmo(world, snoId, tags);
        }
开发者ID:wow4all,项目名称:mooege,代码行数:7,代码来源:ActorFactory.cs


示例2: Living

        public Living(World world, int snoId, Dictionary<int, TagMapEntry> tags)
            : base(world, snoId, tags)
        {
            this.SNOId = snoId;
            var actor = (Mooege.Common.MPQ.FileFormats.Actor)Mooege.Common.MPQ.MPQStorage.Data.Assets[Common.Types.SNO.SNOGroup.Actor][snoId].Data;
            this.snoMonster = actor.MonsterSNO;
            if (actor.AnimSetSNO != -1)
            {
                this.Animset = (Mooege.Common.MPQ.FileFormats.AnimSet)Mooege.Common.MPQ.MPQStorage.Data.Assets[Common.Types.SNO.SNOGroup.AnimSet][actor.AnimSetSNO].Data;
            }
            // FIXME: This is hardcoded crap
            this.Field3 = 0x0;
            this.RotationAmount = (float)(RandomHelper.NextDouble() * 2.0f * Math.PI);
            this.RotationAxis.X = 0f; this.RotationAxis.Y = 0f; this.RotationAxis.Z = 1f;
            this.GBHandle.Type = -1; this.GBHandle.GBID = -1;
            this.Field7 = 0x00000001;
            this.Field8 = this.SNOId;
            this.Field10 = 0x0;
            this.Field11 = 0x0;
            this.Field12 = 0x0;
            this.Field13 = 0x0;
            //this.AnimationSNO = 0x11150;
            this.CollFlags = 1;

            this.Attributes[GameAttribute.Hitpoints_Max_Total] = 4.546875f;
            this.Attributes[GameAttribute.Hitpoints_Max] = 4.546875f;
            this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 0f;
            this.Attributes[GameAttribute.Hitpoints_Cur] = 4.546875f;

            // !!!! This line below caused Hirelings to crash! WTF? /fasbat
            //this.Attributes[GameAttribute.Level] = 1;
        }
开发者ID:ripper47,项目名称:mooege,代码行数:32,代码来源:Living.cs


示例3: SpellRune

 public SpellRune(World world, Mooege.Common.MPQ.FileFormats.ItemTable definition)
     : base(world, definition)
 {
     if (!definition.Name.Contains("X"))
     {
         // attuned rune, randomize power
         int classRnd = RandomHelper.Next(0, 5);
         int PowerSNOId = -1;
         switch (classRnd)
         {
             case 0:
                 PowerSNOId = Skills.Skills.Barbarian.AllActiveSkillsList.ElementAt(RandomHelper.Next(0, Mooege.Core.GS.Skills.Skills.Barbarian.AllActiveSkillsList.Count));
                 break;
             case 1:
                 PowerSNOId = Skills.Skills.DemonHunter.AllActiveSkillsList.ElementAt(RandomHelper.Next(0, Mooege.Core.GS.Skills.Skills.DemonHunter.AllActiveSkillsList.Count));
                 break;
             case 2:
                 PowerSNOId = Skills.Skills.Monk.AllActiveSkillsList.ElementAt(RandomHelper.Next(0, Mooege.Core.GS.Skills.Skills.Monk.AllActiveSkillsList.Count));
                 break;
             case 3:
                 PowerSNOId = Skills.Skills.WitchDoctor.AllActiveSkillsList.ElementAt(RandomHelper.Next(0, Mooege.Core.GS.Skills.Skills.WitchDoctor.AllActiveSkillsList.Count));
                 break;
             case 4:
                 PowerSNOId = Skills.Skills.Wizard.AllActiveSkillsList.ElementAt(RandomHelper.Next(0, Mooege.Core.GS.Skills.Skills.Wizard.AllActiveSkillsList.Count));
                 break;
         }
         //this.Attributes[GameAttribute.Rune_Attuned_Power] = PowerSNOId;
     }
 }
开发者ID:loonbg,项目名称:mooege,代码行数:29,代码来源:SpellRune.cs


示例4: Hireling

 public Hireling(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     //this.Attributes[GameAttribute.TeamID] = 2;
     Interactions.Add(new HireInteraction());
     Interactions.Add(new InventoryInteraction());
 }
开发者ID:loonbg,项目名称:mooege,代码行数:7,代码来源:Hireling.cs


示例5: Artisan

        public Artisan(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            this.Attributes[GameAttribute.MinimapActive] = true;

            Interactions.Add(new CraftInteraction());
        }
开发者ID:loonbg,项目名称:mooege,代码行数:7,代码来源:Artisan.cs


示例6: Create

        public static Actor Create(World world, int snoId, TagMap tagMap)
        {
            if (!MPQStorage.Data.Assets[SNOGroup.Actor].ContainsKey(snoId))
                return null;

            var actorAsset = MPQStorage.Data.Assets[SNOGroup.Actor][snoId];            
            var actorData = actorAsset.Data as Mooege.Common.MPQ.FileFormats.Actor;
            if (actorData == null) return null;

            if (actorData.Type == ActorType.Invalid) 
                return null;

            // read tagMapEntries and put them into a dictionary
            var tags = tagMap.TagMapEntries.ToDictionary(entry => entry.TagID);

            // see if we have an implementation for actor.
            if (SNOHandlers.ContainsKey(snoId))
                return (Actor) Activator.CreateInstance(SNOHandlers[snoId], new object[] {world, snoId, tags});
           
            switch (actorData.Type)
            {
                case ActorType.Monster:
                    if(tags.ContainsKey((int)MarkerTagTypes.ConversationList))
                        return new InteractiveNPC(world, snoId, tags);
                    else
                        return new Monster(world, snoId, tags);
                case ActorType.Gizmo:
                    return CreateGizmo(world, snoId, tags);

            }

            return null;
        }
开发者ID:0v3rfl0w,项目名称:mooege,代码行数:33,代码来源:ActorFactory.cs


示例7: ServerProp

 public ServerProp(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Field2 = 16;
     this.Field7 = 0x00000001;
     this.CollFlags = 0; // a hack for passing through blockers /fasbat
 }
开发者ID:loonbg,项目名称:mooege,代码行数:7,代码来源:ServerProp.cs


示例8: GetNearestTarget

 // get nearest target of targetType
 public static Actor GetNearestTarget(World world, Actor attacker, Vector3D centerPosition, float range, ActorType targetType = ActorType.Monster)
 {
     Actor result = null;
     List<Actor> actors = world.QuadTree.Query<Actor>(new Circle(centerPosition.X, centerPosition.Y, range));
     if (actors.Count > 1)
     {
         float distanceNearest = range; // max. range
         float distance = 0f;
         foreach (var target in actors.Where(target => ((target.ActorType == targetType) && (target != attacker) && !target.Attributes[GameAttribute.Is_NPC])))
         {
             if ((target.World == null) || (world.GetActorByDynamicId(target.DynamicID) == null))
             {
                 // leaving world
                 continue;
             }
             distance = ActorUtils.GetDistance(centerPosition, target.Position);
             if ((result == null) || (distance < distanceNearest))
             {
                 result = target;
                 distanceNearest = distance;
             }
         }
     }
     return result;
 }
开发者ID:K42,项目名称:mooege,代码行数:26,代码来源:CombatSystem.cs


示例9: InteractiveNPC

 public InteractiveNPC(World world, int actorSNO, Vector3D position)
     : base(world, actorSNO, position)
 {
     this.Attributes[GameAttribute.NPC_Has_Interact_Options, 0] = true;
     this.Attributes[GameAttribute.NPC_Is_Operatable] = true;
     this.Attributes[GameAttribute.Buff_Visual_Effect, 0x00FFFFF] = true;
 }
开发者ID:keltins,项目名称:mooege,代码行数:7,代码来源:InteractiveNPC.cs


示例10: Minion

 public Minion(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     // The following two seems to be shared with monsters. One wonders why there isn't a specific actortype for minions.
     this.Field2 = 0x8; 
     this.GBHandle.Type = (int)GBHandleType.Monster; this.GBHandle.GBID = 1;
 }
开发者ID:Vallenhael,项目名称:mooege,代码行数:7,代码来源:Minion.cs


示例11: TreasurePygmy

 public TreasurePygmy(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     (Brain as MonsterBrain).AddPresetPower(105371);
     (Brain as MonsterBrain).AddPresetPower(54836);
     (Brain as MonsterBrain).AddPresetPower(105665);
 }
开发者ID:sergeev,项目名称:mooege,代码行数:7,代码来源:Monsters.cs


示例12: Portal

        public Portal(World world, int actorSNO, Vector3D position, Dictionary<int, TagMapEntry> tags)
            : base(world, world.NewActorID, position, tags)
        {
            this.SNOId = actorSNO;
            this.Destination = new ResolvedPortalDestination
            {
                WorldSNO = tags[(int)MarkerTagTypes.DestinationWorld].Int2,
            };

            if (tags.ContainsKey((int)MarkerTagTypes.DestinationLevelArea))
                this.Destination.DestLevelAreaSNO = tags[(int)MarkerTagTypes.DestinationLevelArea].Int2;

            if (tags.ContainsKey((int)MarkerTagTypes.DestinationActorTag))
                this.Destination.StartingPointActorTag = tags[(int)MarkerTagTypes.DestinationActorTag].Int2;
            else
                Logger.Warn("Found portal {0}without target location actor", this.SNOId);

            this.Field8 = this.SNOId;
            this.Field2 = 16;
            this.Field3 = 0;
            this.CollFlags = 0x00000001;

            // FIXME: Hardcoded crap; probably don't need to set most of these. /komiga
            this.Attributes[GameAttribute.MinimapActive] = true;
            this.Attributes[GameAttribute.Hitpoints_Max_Total] = 1f;
            this.Attributes[GameAttribute.Hitpoints_Max] = 0.0009994507f;
            this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 3.051758E-05f;
            this.Attributes[GameAttribute.Hitpoints_Cur] = 0.0009994507f;
            this.Attributes[GameAttribute.TeamID] = 1;
            this.Attributes[GameAttribute.Level] = 1;
        }
开发者ID:elitepilot,项目名称:mooege,代码行数:31,代码来源:Portal.cs


示例13: NPC

 public NPC(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Field2 = 0x9;
     this.Field7 = 2;
     this.Attributes[GameAttribute.Is_NPC] = true;
 }
开发者ID:Im2ortal,项目名称:mooege,代码行数:7,代码来源:NPC.cs


示例14: Vendor

 public Vendor(World world, int snoId, Dictionary<int, TagMapEntry> tags)
     : base(world, snoId, tags)
 {
     this.Attributes[GameAttribute.MinimapActive] = true;
     _vendorGrid = new InventoryGrid(this, 1, 20, (int) EquipmentSlotId.Vendor);
     PopulateItems();
 }
开发者ID:ripper47,项目名称:mooege,代码行数:7,代码来源:Vendor.cs


示例15: CreateGizmo

        private static Actor CreateGizmo(World world, int snoId, Dictionary<int,TagMapEntry> tags)
        {
            if (tags.ContainsKey((int)MarkerTagTypes.DestinationWorld))
                return new Portal(world, snoId, tags);

            return new Gizmo(world, snoId, tags);
        }
开发者ID:0v3rfl0w,项目名称:mooege,代码行数:7,代码来源:ActorFactory.cs


示例16: Living

        public Living(World world, int snoId, Dictionary<int, TagMapEntry> tags)
            : base(world, snoId, tags)
        {
            this.SNOId = snoId;
            this.SNOMonsterId = this.ActorData.MonsterSNO;

            // FIXME: This is hardcoded crap
            this.Field3 = 0x0;
            this.RotationAmount = (float)(RandomHelper.NextDouble() * 2.0f * Math.PI);
            this.RotationAxis.X = 0f; this.RotationAxis.Y = 0f; this.RotationAxis.Z = 1f;
            this.GBHandle.Type = -1; this.GBHandle.GBID = -1;
            this.Field7 = 0x00000001;
            this.Field8 = this.SNOId;
            this.Field10 = 0x0;
            this.Field11 = 0x0;
            this.Field12 = 0x0;
            this.Field13 = 0x0;
            this.CollFlags = 1;

            this.Attributes[GameAttribute.Hitpoints_Max_Total] = 4.546875f;
            this.Attributes[GameAttribute.Hitpoints_Max] = 4.546875f;
            this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 0f;
            this.Attributes[GameAttribute.Hitpoints_Cur] = 4.546875f;

            this.Attributes[GameAttribute.Level] = 1;
        }
开发者ID:ncoop23,项目名称:mooege,代码行数:26,代码来源:Living.cs


示例17: Barricade

 public Barricade(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     base.Attributes[GameAttribute.Experience_Granted] = 0;
     base.Attributes[GameAttribute.DropsNoLoot] = true;
     this.Attributes[GameAttribute.Hitpoints_Cur] = 1;
 }
开发者ID:vrobel,项目名称:mooege,代码行数:7,代码来源:Barricade.cs


示例18: Portal

        public Portal(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            this.Destination = new ResolvedPortalDestination
            {
                WorldSNO = tags[MarkerKeys.DestinationWorld].Id,
            };

            if (tags.ContainsKey(MarkerKeys.DestinationLevelArea))
                this.Destination.DestLevelAreaSNO = tags[MarkerKeys.DestinationLevelArea].Id;

            if (tags.ContainsKey(MarkerKeys.DestinationActorTag))
                this.Destination.StartingPointActorTag = tags[MarkerKeys.DestinationActorTag];
            else
                Logger.Warn("Found portal {0}without target location actor", this.ActorSNO.Id);

            this.Field2 = 16;

            // FIXME: Hardcoded crap; probably don't need to set most of these. /komiga
            this.Attributes[GameAttribute.MinimapActive] = true;
            this.Attributes[GameAttribute.Hitpoints_Max_Total] = 1f;
            this.Attributes[GameAttribute.Hitpoints_Max] = 0.0009994507f;
            this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 3.051758E-05f;
            this.Attributes[GameAttribute.Hitpoints_Cur] = 0.0009994507f;
            this.Attributes[GameAttribute.Level] = 1;
        }
开发者ID:wow4all,项目名称:mooege,代码行数:26,代码来源:Portal.cs


示例19: Gizmo

        public Gizmo(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            this.Field2 = 16;
            this.Field7 = 0x00000001;

            this.Attributes[Mooege.Net.GS.Message.GameAttribute.Hitpoints_Cur] = 1;
        }
开发者ID:loonbg,项目名称:mooege,代码行数:8,代码来源:Gizmo.cs


示例20: WorldObject

 protected WorldObject(World world, uint dynamicID)
     : base(dynamicID)
 {
     this._world = world; // Specifically avoid calling the potentially overridden setter for this.World /komiga.
     this._world.Game.StartTracking(this);
     this._rotationAxis = new Vector3D();
     this._position = new Vector3D();
 }
开发者ID:elitepilot,项目名称:mooege,代码行数:8,代码来源:WorldObject.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Ticker.TickTimer类代码示例发布时间:2022-05-26
下一篇:
C# Math.Vector3D类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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