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


C# Update.Clear方法代码示例

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


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

示例1: Start

 public static void Start()
 {
     Scores = new SafeDictionary<uint, Guild>(100);
     StartTime = DateTime.Now;
     LeftGate.Mesh = (ushort)(240 + LeftGate.Mesh % 10);
     RightGate.Mesh = (ushort)(270 + LeftGate.Mesh % 10);
     ServerBase.Kernel.SendWorldMessage(new Message("Guild war has began!", System.Drawing.Color.Red, Message.Center), ServerBase.Kernel.GamePool.Values);
     FirstRound = true;
     foreach (Guild guild in ServerBase.Kernel.Guilds.Values)
     {
         guild.WarScore = 0;
     }
     Update upd = new Update(true);
     upd.UID = LeftGate.UID;
     upd.Append(Update.Mesh, LeftGate.Mesh);
     upd.Append(Update.Hitpoints, LeftGate.Hitpoints);
     ServerBase.Kernel.SendWorldMessage(upd, ServerBase.Kernel.GamePool.Values, (ushort)1038);
     upd.Clear();
     upd.UID = RightGate.UID;
     upd.Append(Update.Mesh, RightGate.Mesh);
     upd.Append(Update.Hitpoints, RightGate.Hitpoints);
     ServerBase.Kernel.SendWorldMessage(upd, ServerBase.Kernel.GamePool.Values, (ushort)1038);
     IsWar = true;
 }
开发者ID:Mromany,项目名称:Conquista5679-TheHunterSource-,代码行数:24,代码来源:GuildWar.cs

示例2: Reset

        public static void Reset()
        {
            Scores = new SafeDictionary<uint, Guild>(100);

            LeftGate.Mesh = (ushort)(240 + LeftGate.Mesh % 10);
            RightGate.Mesh = (ushort)(270 + LeftGate.Mesh % 10);

            LeftGate.Hitpoints = LeftGate.MaxHitpoints;
            RightGate.Hitpoints = RightGate.MaxHitpoints;
            Pole.Hitpoints = Pole.MaxHitpoints;

            Update upd = new Update(true);
            upd.UID = LeftGate.UID;
            upd.Append(Update.Mesh, LeftGate.Mesh);
            upd.Append(Update.Hitpoints, LeftGate.Hitpoints);
            ServerBase.Kernel.SendWorldMessage(upd, ServerBase.Kernel.GamePool.Values, (ushort)1038);
            upd.Clear();
            upd.UID = RightGate.UID;
            upd.Append(Update.Mesh, RightGate.Mesh);
            upd.Append(Update.Hitpoints, RightGate.Hitpoints);
            ServerBase.Kernel.SendWorldMessage(upd, ServerBase.Kernel.GamePool.Values, (ushort)1038);

            foreach (Guild guild in ServerBase.Kernel.Guilds.Values)
            {
                guild.WarScore = 0;
            }

            IsWar = true;
        }
开发者ID:Mromany,项目名称:Conquista5679-TheHunterSource-,代码行数:29,代码来源:GuildWar.cs


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