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
;
19 public boolean isTouchDown
= false;
20 public int touchDownX
, touchDownY
;
21 public long touchDownTime
;
24 world
= new GameWorld(512,32);
25 renderer
= new GameRenderer(this);
26 physics
= new GamePhysics(this);
27 player
= new Player();
30 public void resetRenderer() {
31 renderer
= new GameRenderer(this);
34 public void update(float delta
) {
37 physics
.update(delta
);
39 if (isTouchDown
&& TimeUtils
.timeSinceMillis(touchDownTime
) > 500) {
40 world
.placeToBackground(cursorX
,cursorY
,
41 player
.inventory
[invSlot
]);