Time.delta cleanup / Basic mobile input
This commit is contained in:
@@ -86,7 +86,7 @@ public class Saves{
|
||||
}
|
||||
|
||||
if(state.isGame() && !state.gameOver && current != null && current.isAutosave() && !state.rules.tutorial){
|
||||
time += Time.delta();
|
||||
time += Time.delta;
|
||||
if(time > Core.settings.getInt("saveinterval") * 60){
|
||||
saving = true;
|
||||
|
||||
|
||||
@@ -345,7 +345,7 @@ public class Schematics implements Loadable{
|
||||
boolean found = false;
|
||||
for(int cx = x; cx <= x2; cx++){
|
||||
for(int cy = y; cy <= y2; cy++){
|
||||
Building linked = world.ent(cx, cy);
|
||||
Building linked = world.build(cx, cy);
|
||||
|
||||
if(linked != null &&linked.block().isVisible() && !(linked.block() instanceof BuildBlock)){
|
||||
int top = linked.block().size/2;
|
||||
@@ -373,7 +373,7 @@ public class Schematics implements Loadable{
|
||||
IntSet counted = new IntSet();
|
||||
for(int cx = ox; cx <= ox2; cx++){
|
||||
for(int cy = oy; cy <= oy2; cy++){
|
||||
Building tile = world.ent(cx, cy);
|
||||
Building tile = world.build(cx, cy);
|
||||
|
||||
if(tile != null && !counted.contains(tile.pos()) && !(tile.block() instanceof BuildBlock)
|
||||
&& (tile.block().isVisible() || (tile.block() instanceof CoreBlock))){
|
||||
|
||||
@@ -84,10 +84,10 @@ public class SectorInfo{
|
||||
/** Update averages of various stats.
|
||||
* Called every frame. */
|
||||
public void update(){
|
||||
internalTimeSpent += Time.delta();
|
||||
internalTimeSpent += Time.delta;
|
||||
|
||||
//time spent exceeds turn duration!
|
||||
if(internalTimeSpent >= turnDuration && internalTimeSpent - Time.delta() < turnDuration){
|
||||
if(internalTimeSpent >= turnDuration && internalTimeSpent - Time.delta < turnDuration){
|
||||
universe.displayTimeEnd();
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public class Universe{
|
||||
|
||||
/** Update planet rotations, global time and relevant state. */
|
||||
public void update(){
|
||||
secondCounter += Time.delta() / 60f;
|
||||
secondCounter += Time.delta / 60f;
|
||||
|
||||
if(secondCounter >= 1){
|
||||
seconds += (int)secondCounter;
|
||||
|
||||
Reference in New Issue
Block a user