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


C# Game.FollowId方法代码示例

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


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

示例1: OnNewFrameFixed

 public override void OnNewFrameFixed(Game game, NewFrameEventArgs args)
 {
     if (game.guistate == GuiState.MapLoading)
     {
         return;
     }
     if (game.FollowId() == null)
     {
         UpdateBlockDamageToPlayer(game, args.GetDt());
     }
 }
开发者ID:MagistrAVSH,项目名称:manicdigger,代码行数:11,代码来源:BlockDamageToPlayer.ci.cs

示例2: OnNewFrameFixed

 public override void OnNewFrameFixed(Game game, NewFrameEventArgs args)
 {
     if (game.FollowId() == null)
     {
         if (game.soundnow.value)
         {
             UpdateWalkSound(game, -1);
         }
         if (game.isplayeronground && game.controls.movedx != 0 || game.controls.movedy != 0)
         {
             UpdateWalkSound(game, args.GetDt());
         }
     }
 }
开发者ID:MagistrAVSH,项目名称:manicdigger,代码行数:14,代码来源:WalkSound.ci.cs

示例3: OnNewFrameFixed

 public override void OnNewFrameFixed(Game game, NewFrameEventArgs args)
 {
     if (game.guistate == GuiState.MapLoading)
     {
         return;
     }
     if (game.controls.freemove)
     {
         if (fallSoundPlaying)
         {
             SetFallSoundActive(game, false);
         }
         return;
     }
     if (game.FollowId() == null)
     {
         UpdateFallDamageToPlayer(game, args.GetDt());
     }
 }
开发者ID:samuto,项目名称:manicdigger,代码行数:19,代码来源:FallDamageToPlayer.ci.cs

示例4: UpdatePicking

 internal void UpdatePicking(Game game)
 {
     if (game.FollowId() != null)
     {
         game.SelectedBlockPositionX = 0 - 1;
         game.SelectedBlockPositionY = 0 - 1;
         game.SelectedBlockPositionZ = 0 - 1;
         return;
     }
     NextBullet(game, 0);
 }
开发者ID:YoungGames,项目名称:manicdigger,代码行数:11,代码来源:Picking.ci.cs

示例5: OnNewFrameFixed

 public override void OnNewFrameFixed(Game game_, int entity, float dt)
 {
     game = game_;
     if (game.guistate == GuiState.MapLoading)
     {
         return;
     }
     movespeednow = game.MoveSpeedNow();
     game.controls.movedx = MathCi.ClampFloat(game.controls.movedx, -1, 1);
     game.controls.movedy = MathCi.ClampFloat(game.controls.movedy, -1, 1);
     Controls move = game.controls;
     jumpstartacceleration = 13.333f * constGravity; // default
     jumpstartaccelerationhalf = 9 * constGravity;
     acceleration.SetDefault();
     game.soundnow = new BoolRef();
     if (game.FollowId() != null && game.FollowId().value == game.LocalPlayerId)
     {
         move.movedx = 0;
         move.movedy = 0;
         move.moveup = false;
         move.wantsjump = false;
     }
     Update(game.player.position, move, dt, game.soundnow, Vector3Ref.Create(game.pushX, game.pushY, game.pushZ), game.entities[game.LocalPlayerId].drawModel.ModelHeight);
 }
开发者ID:MagistrAVSH,项目名称:manicdigger,代码行数:24,代码来源:CharacterPhysics.ci.cs


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