Exemplo n.º 1
0
        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();
                }
            }
        }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 public void SetFacing(Player.PlayerFacing facing)
 {
     this.facing = facing;
 }