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


C# Player.SendSetTime方法代码示例

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


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

示例1: RespawnHandler

        public Package RespawnHandler(McpeRespawn packet, Player player)
        {
            SendNameTag(player);
            player.RemoveAllEffects();

            player.SetEffect(new Speed {Level = 1, Duration = Effect.MaxDuration}); // 10s in ticks
            //player.SetEffect(new Slowness { Level = 20, Duration = 20 * 10 });
            //player.SetEffect(new Haste { Level = 20, Duration = 20 * 10 });
            //player.SetEffect(new MiningFatigue { Level = 20, Duration = 20 * 10 });
            //player.SetEffect(new Strength { Level = 20, Duration = 20 * 10 });
            player.SetEffect(new JumpBoost {Level = 1, Duration = Effect.MaxDuration});
            //player.SetEffect(new Blindness { Level = 20, Duration = 20 * 10 });
            //player.SetAutoJump(true);

            if (player.Level.LevelId.Equals("Default"))
            {
                player.Level.CurrentWorldTime = 6000;
                player.Level.IsWorldTimeStarted = false;
            }

            player.SendSetTime();

            return packet;
        }
开发者ID:GoldishKirby,项目名称:MiNET,代码行数:24,代码来源:NiceLobbyPlugin.cs

示例2: RespawnHandler

        public Package RespawnHandler(McpeRespawn packet, Player player)
        {
            player.RemoveAllEffects();

            player.SetEffect(new Speed { Level = 2, Duration = 1000 });
            ////player.SetEffect(new Slowness {Level = 2, Duration = 20});
            //player.SetEffect(new JumpBoost { Level = 2, Duration = Effect.MaxDuration });
            //player.SetAutoJump(true);

            if (player.Level.LevelId.Equals("Default"))
            {
                player.Level.CurrentWorldTime = 6000;
                player.Level.IsWorldTimeStarted = false;
            }

            player.SendSetTime();

            return packet;
        }
开发者ID:HungerBoatz,项目名称:MiNET,代码行数:19,代码来源:NiceLobbyPlugin.cs

示例3: RespawnHandler

        public Package RespawnHandler(McpeRespawn packet, Player player)
        {
            McpeMobEffect speedEffect = McpeMobEffect.CreateObject();
            speedEffect.entityId = 0;
            speedEffect.eventId = 1;
            speedEffect.effectId = 1;
            speedEffect.duration = 0x7fffffff;
            speedEffect.amplifier = 2;
            speedEffect.particles = 1;
            player.SendPackage(speedEffect);

            McpeMobEffect jumpEffect = McpeMobEffect.CreateObject();
            jumpEffect.entityId = 0;
            jumpEffect.eventId = 1;
            jumpEffect.effectId = 8;
            jumpEffect.duration = 0x7fffffff;
            jumpEffect.amplifier = 2;
            jumpEffect.particles = 1;
            player.SendPackage(jumpEffect);

            if (player.Level.LevelId.Equals("Default"))
            {
                player.Level.CurrentWorldTime = 10000;
                player.Level.IsWorldTimeStarted = false;
            }

            player.SendSetTime();

            return packet;
        }
开发者ID:ultimakaz,项目名称:MiNET,代码行数:30,代码来源:NiceLobbyPlugin.cs


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