Time.delta cleanup / Basic mobile input
This commit is contained in:
@@ -110,13 +110,13 @@ public class BlockInventoryFragment extends Fragment{
|
||||
hide();
|
||||
}else{
|
||||
if(tile.items.total() == 0){
|
||||
emptyTime += Time.delta();
|
||||
emptyTime += Time.delta;
|
||||
}else{
|
||||
emptyTime = 0f;
|
||||
}
|
||||
|
||||
if(holding && lastItem != null){
|
||||
holdTime += Time.delta();
|
||||
holdTime += Time.delta;
|
||||
|
||||
if(holdTime >= holdWithdraw){
|
||||
int amount = Math.min(tile.items.get(lastItem), player.unit().maxAccepted(lastItem));
|
||||
@@ -140,7 +140,7 @@ public class BlockInventoryFragment extends Fragment{
|
||||
shrinkHoldTimes[i] = 0f;
|
||||
dirty |= !had;
|
||||
}else if(had){
|
||||
shrinkHoldTimes[i] += Time.delta();
|
||||
shrinkHoldTimes[i] += Time.delta;
|
||||
dirty |= shrinkHoldTimes[i] >= holdShrink;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ public class ChatFragment extends Table{
|
||||
Draw.color();
|
||||
|
||||
if(fadetime > 0 && !shown)
|
||||
fadetime -= Time.delta() / 180f;
|
||||
fadetime -= Time.delta / 180f;
|
||||
}
|
||||
|
||||
private void sendMessage(){
|
||||
|
||||
@@ -257,7 +257,7 @@ public class HudFragment extends Fragment{
|
||||
coreAttackOpacity[0] = Mathf.lerpDelta(coreAttackOpacity[0], 0f, 0.1f);
|
||||
}
|
||||
|
||||
coreAttackTime[0] -= Time.delta();
|
||||
coreAttackTime[0] -= Time.delta;
|
||||
|
||||
return coreAttackOpacity[0] > 0;
|
||||
});
|
||||
|
||||
@@ -90,7 +90,7 @@ public class PlacementFragment extends Fragment{
|
||||
scrollPositions.put(currentCategory, blockPane.getScrollY());
|
||||
|
||||
if(Core.input.keyDown(Binding.pick) && player.isBuilder()){ //mouse eyedropper select
|
||||
Building tile = world.entWorld(Core.input.mouseWorld().x, Core.input.mouseWorld().y);
|
||||
Building tile = world.buildWorld(Core.input.mouseWorld().x, Core.input.mouseWorld().y);
|
||||
Block tryRecipe = tile == null ? null : tile.block();
|
||||
Object tryConfig = tile == null ? null : tile.config();
|
||||
|
||||
@@ -449,7 +449,7 @@ public class PlacementFragment extends Fragment{
|
||||
//check tile being hovered over
|
||||
Tile hoverTile = world.tileWorld(Core.input.mouseWorld().x, Core.input.mouseWorld().y);
|
||||
if(hoverTile != null){
|
||||
//if the tile has an entity, display it
|
||||
//if the tile has a building, display it
|
||||
if(hoverTile.build != null){
|
||||
hoverTile.build.updateFlow(true);
|
||||
return hoverTile.build;
|
||||
|
||||
Reference in New Issue
Block a user