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


C# realm.World类代码示例

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


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

示例1: AddWorld

 public static World AddWorld(World world)
 {
     world.Id = Interlocked.Increment(ref nextWorldId);
     Worlds[world.Id] = world;
     if (world is GameWorld)
         Monitor.WorldAdded(world);
     return world;
 }
开发者ID:RoxyLalonde,项目名称:Phoenix-Realms,代码行数:8,代码来源:RealmManager.cs

示例2: WorldClosed

 public void WorldClosed(World world)
 {
     lock (worldLock)
     {
         var portal = portals[world];
         nexus.LeaveWorld(portal);
         portals.Remove(world);
     }
 }
开发者ID:patrick323,项目名称:rotmg_svr,代码行数:9,代码来源:RealmPortalMonitor.cs

示例3: AddWorld

 public World AddWorld(World world)
 {
     if (world.Manager != null)
         throw new InvalidOperationException("World already added.");
     world.Id = Interlocked.Increment(ref nextWorldId);
     Worlds[world.Id] = world;
     OnWorldAdded(world);
     return world;
 }
开发者ID:Jankos132,项目名称:Server-Source,代码行数:9,代码来源:RealmManager.cs

示例4: HasPlayerNearby

 public static bool HasPlayerNearby(World world, double x, double y)
 {
     foreach (var i in world.PlayersCollision.HitTest(x, y, 16))
     {
         var d = Dist(i.X, i.Y, x, y);
         if (d < 16*16)
             return true;
     }
     return false;
 }
开发者ID:RoxyLalonde,项目名称:Phoenix-Realms,代码行数:10,代码来源:Behavior.cs

示例5: WorldClosed

 public void WorldClosed(World world)
 {
     lock (worldLock)
     {
         Portal portal = portals[world];
         nexus.LeaveWorld(portal);
         portals.Remove(world);
         log.InfoFormat("World {0}({1}) closed.", world.Id, world.Name);
     }
 }
开发者ID:Club559,项目名称:Travs-Domain-Server,代码行数:10,代码来源:RealmPortalMonitor.cs

示例6: Tick

 public bool Tick(World world, RealmTime time)
 {
     remain -= time.thisTickTimes;
     if (remain < 0)
     {
         cb(world, time);
         return true;
     }
     return false;
 }
开发者ID:RiiggedMPGH,项目名称:Owl-Realms-Source,代码行数:10,代码来源:WorldTimer.cs

示例7: WorldRemoved

        public void WorldRemoved(World world)
        {
            //lock (worldLock)
            //{
            var portal = portals[world];
            nexus.LeaveWorld(portal);
            portals.Remove(world);

            //}
        }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:10,代码来源:RealmPortalMonitor.cs

示例8: Oryx

 public void Oryx(World world, string text)
 {
     world.BroadcastPacket(new TextPacket()
     {
         BubbleTime = 0,
         Stars = -1,
         Name = "#Oryx the Mad God",
         Text = text
     }, null);
 }
开发者ID:xzyio,项目名称:Rotmg-PServer,代码行数:10,代码来源:ChatManager.cs

示例9: Oryx

 public void Oryx(World world, string text)
 {
     world.BroadcastPacket(new TextPacket()
     {
         BubbleTime = 0,
         Stars = -1,
         Name = "#Oryx the Mad God",
         Text = text.ToSafeText()
     }, null);
     logger.InfoFormat("[{0}({1})] <Oryx the Mad God> {2}", world.Name, world.Id, text);
 }
开发者ID:OryxAwakening,项目名称:Fabiano_Swagger_of_Doom,代码行数:11,代码来源:ChatManager.cs

示例10: BehaveWall

 public void BehaveWall(Player killer, Wall w, World wallWorld)
 {
     this.Host = w;
     BehaviorCondition cond = BehaviorCondition.OnDeath;
     if (cond == BehaviorCondition.OnDeath)
     {
         wOwner = wallWorld;
         var dat = new Tuple<Player, int>[]{
                 new Tuple<Player, int>(killer, 500)
             };
         Dictionary<Player, List<Item>> items = new Dictionary<Player, List<Item>>();
         ProcessPublicBags(rand, dat);
         ProcessSoulBags(rand, dat);
     }
 }
开发者ID:Club559,项目名称:Mining,代码行数:15,代码来源:LootBehavior.cs

示例11: WorldAdded

 public void WorldAdded(World world)
 {
     lock (worldLock)
     {
         var pos = GetRandPosition();
         var portal = new Portal(0x0712, null)
         {
             Size = 80,
             WorldInstance = world,
             Name = world.Name
         };
         portal.Move(pos.X + 0.5f, pos.Y + 0.5f);
         nexus.EnterWorld(portal);
         portals.Add(world, portal);
     }
 }
开发者ID:patrick323,项目名称:rotmg_svr,代码行数:16,代码来源:RealmPortalMonitor.cs

示例12: WorldOpened

 public void WorldOpened(World world)
 {
     lock (worldLock)
     {
         var pos = GetRandPosition();
         var portal = new Portal(0x71c, null)
         {
             Size = 150,
             WorldInstance = world,
             Name = world.Name
         };
         portal.Move(pos.X, pos.Y);
         nexus.EnterWorld(portal);
         portals.Add(world, portal);
     }
 }
开发者ID:patrick323,项目名称:rotmg_svr,代码行数:16,代码来源:RealmPortalMonitor.cs

示例13: WorldAdded

 public void WorldAdded(World world)
 {
     lock (worldLock)
     {
         Position pos = GetRandPosition();
         var portal = new Portal(manager, 0x0712, null)
         {
             Size = 80,
             WorldInstance = world,
             Name = world.Name
         };
         portal.Move(pos.X + 0.5f, pos.Y + 0.5f);
         nexus.EnterWorld(portal);
         portals.Add(world, portal);
         log.InfoFormat("World {0}({1}) added.", world.Id, world.Name);
     }
 }
开发者ID:Club559,项目名称:Travs-Domain-Server,代码行数:17,代码来源:RealmPortalMonitor.cs

示例14: WorldOpened

 public void WorldOpened(World world)
 {
     lock (worldLock)
     {
         var pos = GetRandPosition();
         var portal = new Portal(manager, 0x71c, null)
         {
             Size = 150,
             WorldInstance = world,
             Name = world.Name
         };
         portal.Move(pos.X, pos.Y);
         nexus.EnterWorld(portal);
         portals.Add(world, portal);
         log.InfoFormat("World {0}({1}) opened.", world.Id, world.Name);
     }
 }
开发者ID:Jankos132,项目名称:Server-Source,代码行数:17,代码来源:RealmPortalMonitor.cs

示例15: Tick

 public bool Tick(World world, RealmTime time)
 {
     if (destroy)
     {
         world.Timers.Remove(this);
         return true;
     }
     remain -= time.thisTickTimes;
     if (remain < 0)
     {
         try
         {
             cb(world, time);
         }
         catch (Exception ex)
         {
             logger.Error(ex);
         }
         return true;
     }
     return false;
 }
开发者ID:OryxAwakening,项目名称:Fabiano_Swagger_of_Doom,代码行数:22,代码来源:WorldTimer.cs


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