diff options
author | olamedia <[email protected]> | 2012-10-17 09:52:48 +0600 |
---|---|---|
committer | olamedia <[email protected]> | 2012-10-17 09:52:48 +0600 |
commit | 5320fd1dad5b77fa227e83fbbe0a958f2c5fc283 (patch) | |
tree | 1b49b91cf820ad5536241fa093c34fd2ae9731db /src/ru/olamedia/player/Player.java | |
parent | e2b667011c8fc93388c3ebee6e2a64090456e2a1 (diff) |
fps
Diffstat (limited to 'src/ru/olamedia/player/Player.java')
-rw-r--r-- | src/ru/olamedia/player/Player.java | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/ru/olamedia/player/Player.java b/src/ru/olamedia/player/Player.java index 08811b5..bb62201 100644 --- a/src/ru/olamedia/player/Player.java +++ b/src/ru/olamedia/player/Player.java @@ -4,6 +4,9 @@ import ru.olamedia.liveEntity.LiveEntity; import ru.olamedia.olacraft.game.Game; import ru.olamedia.olacraft.network.packet.LiveEntityLocationUpdatePacket; import ru.olamedia.olacraft.weapon.Bullet; +import ru.olamedia.olacraft.world.block.Block; +import ru.olamedia.olacraft.world.chunk.Chunk; +import ru.olamedia.olacraft.world.data.ChunkData; public class Player extends LiveEntity { @@ -17,15 +20,21 @@ public class Player extends LiveEntity { } public Player() { - + } + + public void pickBlock(Block b){ + b.removeFromWorld(); } public void onMouseClick() { - Bullet b = new Bullet(); - b.velocity.set(Game.instance.camera.getLook()); - b.velocity.negate(); - b.velocity.scale(100); - b.location.set(getX(), getCameraY(), getZ()); - Game.client.getScene().addBullet(b); + if (null != Game.client.getScene().nearestBlock){ + pickBlock(Game.client.getScene().nearestBlock); + } + // Bullet b = new Bullet(); + // b.velocity.set(Game.instance.camera.getLook()); + // b.velocity.negate(); + // b.velocity.scale(100); + // b.location.set(getX(), getCameraY(), getZ()); + // Game.client.getScene().addBullet(b); } } |