public void Load(Player.PlayerAction action, Player.PlayerFacing facing) { if (action == Player.PlayerAction.Walking || action == Player.PlayerAction.Sneaking) { if (facing == Player.PlayerFacing.Front) { front.Load(); } if (facing == Player.PlayerFacing.Back) { back.Load(); } if (facing == Player.PlayerFacing.Left) { left.Load(); } if (facing == Player.PlayerFacing.Right) { right.Load(); } } if (action == Player.PlayerAction.Attacking) { if (facing == Player.PlayerFacing.Front) { attackFront.Load(); } if (facing == Player.PlayerFacing.Back) { attackBack.Load(); } if (facing == Player.PlayerFacing.Left) { attackLeft.Load(); } if (facing == Player.PlayerFacing.Right) { attackRight.Load(); } } }
public void Update() { startTime = game.startTime; renderFreq = (float)game.RenderFrequency; updateFreq = (float)game.UpdateFrequency; gameTime = game.time; amountChunksGenerated = game.world.GetAmountChunksGenerated(); chunkPlayerIsIn = game.world.GetChunkAtPlayer(); player = game.world.player; playerLoc = player.GetLocation(); playerAction = player.GetAction(); playerFacing = player.GetFacing(); garbage1 = GC.CollectionCount(1); garbage2 = GC.CollectionCount(2); garbage3 = GC.CollectionCount(3); }
public void SetFacing(Player.PlayerFacing facing) { this.facing = facing; }