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


C# Interfaces.SendSpawn方法代码示例

本文整理汇总了C#中Interfaces.SendSpawn方法的典型用法代码示例。如果您正苦于以下问题:C# Interfaces.SendSpawn方法的具体用法?C# Interfaces.SendSpawn怎么用?C# Interfaces.SendSpawn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Interfaces的用法示例。


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

示例1: SendScreenSpawn

 public void SendScreenSpawn(Interfaces.IMapObject obj, bool self)
 {
     foreach (Interfaces.IMapObject _obj in Screen.Objects)
     {
         if (_obj == null)
             continue;
         if (_obj.UID != Entity.UID)
         {
             if (_obj.MapObjType == Game.MapObjectType.Player)
             {
                 GameState client = _obj.Owner as GameState;
                 obj.SendSpawn(client, false);
             }
         }
     }
     if (self)
         obj.SendSpawn(this);
 }
开发者ID:AiiMz,项目名称:PserverWork,代码行数:18,代码来源:GameState.cs

示例2: SendScreenSpawn

        public void SendScreenSpawn(Interfaces.IMapObject obj, bool self)
        {
            for (int c = 0; c < Objects.Count; c++)
            {
                //For a multi threaded application, while we go through the collection
                //the collection might change. We will make sure that we wont go off
                //the limits with a check.
                if (c >= Objects.Count)
                    break;
                Interfaces.IMapObject _obj = Objects[c];
                if (_obj == null)
                    continue;
                if (_obj.UID != Owner.Entity.UID)
                {
                    if (_obj.MapObjType == Game.MapObjectType.Player)
                    {
                        GameState client = _obj.Owner as GameState;
                        obj.SendSpawn(client, false);
                    }
                }
            }

            if (self)
                obj.SendSpawn(Owner, false);
        }
开发者ID:Mromany,项目名称:Conquista5679-TheHunterSource-,代码行数:25,代码来源:Screen.cs

示例3: SendScreenSpawn

        public void SendScreenSpawn(Interfaces.IMapObject _object)
        {
            foreach (Client.GameState client in Program.Values)
            {
                if (client != null)
                {
                    if (client.Entity.UID != ExcludeFromSend)
                    {
                        if (client.Map.ID == Owner.MapID)
                        {
                            if (ServerBase.Kernel.GetDistance(client.Entity.X, client.Entity.Y, Owner.X, Owner.Y) > 25)
                            {
                                continue;
                            }
                            _object.SendSpawn(client, false);

                        }
                    }
                }
            }
        }
开发者ID:faresali,项目名称:co-pserver,代码行数:21,代码来源:MonsterTable.cs

示例4: SendScreenSpawn

        public void SendScreenSpawn(Interfaces.IMapObject obj, bool self)
        {
            try
            {
                foreach (Interfaces.IMapObject _obj in Screen.Objects)
                {
                    if (_obj == null)
                        continue;
                    if (_obj.UID != Entity.UID)
                    {
                        if (_obj.MapObjType == Game.MapObjectType.Player)
                        {
                            byte spawnType = 0;
                            GameState client = _obj.Owner as GameState;
                            obj.SendSpawn(client, false);
                            byte[] array = new byte[Entity.SpawnPacket.Length];
                            Entity.SpawnPacket.CopyTo(array, 0);
                            // array[0x6d] = spawnType;
                            _obj.Owner.Send(array);

                        }
                    }
                }
                if (self)
                    obj.SendSpawn(this);
            }
            catch (Exception e)
            {
                Program.SaveException(e);
            }
        }
开发者ID:Mromany,项目名称:Conquista5679-TheHunterSource-,代码行数:31,代码来源:GameState.cs


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