本文整理汇总了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());
}
}
示例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());
}
}
}
示例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());
}
}
示例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);
}
示例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);
}