1 package ru
.deadsoftware
.cavecraft
.game
;
3 import com
.badlogic
.gdx
.utils
.TimeUtils
;
4 import ru
.deadsoftware
.cavecraft
.game
.objects
.Player
;
6 public class GameProc
{
8 public static double RUN_TIME
= 0;
12 public GameWorld world
;
13 public GameRenderer renderer
;
14 public GamePhysics physics
;
16 public int cursorX
, cursorY
;
20 public boolean isTouchDown
= false;
21 public int touchDownX
, touchDownY
;
22 public long touchDownTime
;
25 world
= new GameWorld(512,256);
26 renderer
= new GameRenderer(this);
27 physics
= new GamePhysics(this);
28 player
= new Player();
31 public void resetRenderer() {
32 renderer
= new GameRenderer(this);
35 public void update(float delta
) {
38 physics
.update(delta
);
40 if (isTouchDown
&& TimeUtils
.timeSinceMillis(touchDownTime
) > 500) {
41 world
.placeToBackground(cursorX
,cursorY
,
42 player
.inventory
[invSlot
]);