Major improvements to Android touch controls, many bugfixes
This commit is contained in:
@@ -114,7 +114,7 @@ public class Control extends Module{
|
||||
}},
|
||||
new EnemySpawn(RapidEnemy.class){{
|
||||
after = 7;
|
||||
spacing = 5;
|
||||
spacing = 4;
|
||||
}},
|
||||
new EnemySpawn(TankEnemy.class){{
|
||||
after = 4;
|
||||
@@ -129,13 +129,13 @@ public class Control extends Module{
|
||||
|
||||
);
|
||||
|
||||
/*
|
||||
//TODO remove this debugging
|
||||
for(int i = 1; i < 60; i ++){
|
||||
UCore.log("\n\n--WAVE " + i);
|
||||
printEnemies(i);
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
public void reset(){
|
||||
|
||||
@@ -121,6 +121,21 @@ public class EffectLoader{
|
||||
Draw.spikes(e.x, e.y, e.ifract() * 2f, 1, 5);
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
Effects.create("railshoot", 8, e -> {
|
||||
Draw.thickness(2f - e.ifract()*2f);
|
||||
Draw.color(Hue.mix(Color.WHITE, Color.LIGHT_GRAY, e.ifract()));
|
||||
Draw.spikes(e.x, e.y, 1f + e.ifract() * 4f, 1, 5);
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
Effects.create("mortarshoot", 9, e -> {
|
||||
Draw.thickness(1.3f - e.ifract());
|
||||
Draw.color(Hue.mix(Color.WHITE, Color.ORANGE, e.ifract()));
|
||||
Draw.spikes(e.x, e.y, e.ifract() * 4f, 2, 6);
|
||||
Draw.circle(e.x, e.y, e.ifract() * 5f + 1f);
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
Effects.create("explosion", 15, e -> {
|
||||
Draw.thickness(2f);
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.badlogic.gdx.math.Vector2;
|
||||
import io.anuke.mindustry.GameState.State;
|
||||
import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.input.AndroidInput;
|
||||
import io.anuke.mindustry.input.PlaceMode;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.World;
|
||||
import io.anuke.mindustry.world.blocks.Blocks;
|
||||
@@ -26,145 +27,142 @@ import io.anuke.ucore.graphics.Caches;
|
||||
import io.anuke.ucore.modules.RendererModule;
|
||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||
import io.anuke.ucore.scene.utils.Cursors;
|
||||
import io.anuke.ucore.util.GridMap;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
import io.anuke.ucore.util.Tmp;
|
||||
|
||||
public class Renderer extends RendererModule{
|
||||
int targetscale = baseCameraScale;
|
||||
int chunksize = 32;
|
||||
GridMap<Cache> caches = new GridMap<>();
|
||||
|
||||
public Renderer(){
|
||||
Cache[][] floorCache;
|
||||
|
||||
public Renderer() {
|
||||
Core.cameraScale = baseCameraScale;
|
||||
pixelate();
|
||||
|
||||
|
||||
Draw.addSurface("shadow", Core.cameraScale);
|
||||
Shaders.create();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
|
||||
if(Core.cameraScale != targetscale){
|
||||
float targetzoom = (float)Core.cameraScale / targetscale;
|
||||
camera.zoom = Mathf.lerp(camera.zoom, targetzoom, 0.2f*Timers.delta());
|
||||
|
||||
float targetzoom = (float) Core.cameraScale / targetscale;
|
||||
camera.zoom = Mathf.lerp(camera.zoom, targetzoom, 0.2f * Timers.delta());
|
||||
|
||||
if(Mathf.in(camera.zoom, targetzoom, 0.005f)){
|
||||
camera.zoom = 1f;
|
||||
Core.cameraScale = targetscale;
|
||||
camera.viewportWidth = Gdx.graphics.getWidth() / Core.cameraScale;
|
||||
camera.viewportHeight = Gdx.graphics.getHeight() / Core.cameraScale;
|
||||
|
||||
AndroidInput.mousex = Gdx.graphics.getWidth()/2;
|
||||
AndroidInput.mousey = Gdx.graphics.getHeight()/2;
|
||||
|
||||
AndroidInput.mousex = Gdx.graphics.getWidth() / 2;
|
||||
AndroidInput.mousey = Gdx.graphics.getHeight() / 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(GameState.is(State.menu)){
|
||||
clearScreen();
|
||||
}else{
|
||||
|
||||
|
||||
if(World.core.block() == ProductionBlocks.core){
|
||||
smoothCamera(player.x, player.y, android ? 0.3f : 0.14f);
|
||||
}else{
|
||||
smoothCamera(World.core.worldx(), World.core.worldy(), 0.4f);
|
||||
}
|
||||
|
||||
|
||||
float prex = camera.position.x, prey = camera.position.y;
|
||||
|
||||
|
||||
updateShake(0.75f);
|
||||
float prevx = camera.position.x, prevy = camera.position.y;
|
||||
clampCamera(-tilesize / 2f, -tilesize / 2f, World.pixsize - tilesize / 2f, World.pixsize - tilesize / 2f);
|
||||
|
||||
|
||||
float deltax = camera.position.x - prex, deltay = camera.position.y - prey;
|
||||
|
||||
|
||||
if(android){
|
||||
player.x += camera.position.x-prevx;
|
||||
player.y += camera.position.y-prevy;
|
||||
player.x += camera.position.x - prevx;
|
||||
player.y += camera.position.y - prevy;
|
||||
}
|
||||
|
||||
|
||||
float lastx = camera.position.x, lasty = camera.position.y;
|
||||
|
||||
|
||||
if(android){
|
||||
camera.position.set((int)camera.position.x, (int)camera.position.y, 0);
|
||||
|
||||
if(Gdx.graphics.getHeight()/Core.cameraScale % 2 == 1){
|
||||
camera.position.set((int) camera.position.x, (int) camera.position.y, 0);
|
||||
|
||||
if(Gdx.graphics.getHeight() / Core.cameraScale % 2 == 1){
|
||||
camera.position.add(0, -0.5f, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
drawDefault();
|
||||
|
||||
|
||||
camera.position.set(lastx - deltax, lasty - deltay, 0);
|
||||
|
||||
|
||||
if(Vars.debug){
|
||||
record();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
renderTiles();
|
||||
Entities.draw();
|
||||
renderPixelOverlay();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void resize(int width, int height){
|
||||
super.resize(width, height);
|
||||
|
||||
AndroidInput.mousex = Gdx.graphics.getWidth()/2;
|
||||
AndroidInput.mousey = Gdx.graphics.getHeight()/2;
|
||||
|
||||
AndroidInput.mousex = Gdx.graphics.getWidth() / 2;
|
||||
AndroidInput.mousey = Gdx.graphics.getHeight() / 2;
|
||||
camera.position.set(player.x, player.y, 0);
|
||||
}
|
||||
|
||||
|
||||
void renderTiles(){
|
||||
int chunksx = World.width()/chunksize, chunksy = World.height()/chunksize;
|
||||
|
||||
int chunksx = World.width() / chunksize, chunksy = World.height() / chunksize;
|
||||
|
||||
//render the entire map
|
||||
if(caches.size() == 0){
|
||||
for(int cx = 0; cx < chunksx; cx ++){
|
||||
for(int cy = 0; cy < chunksy; cy ++){
|
||||
Caches.begin(1600);
|
||||
|
||||
for(int tilex = cx*chunksize; tilex < (cx+1)*chunksize; tilex++){
|
||||
for(int tiley = cy*chunksize; tiley < (cy+1)*chunksize; tiley++){
|
||||
World.tile(tilex, tiley).floor().drawCache(World.tile(tilex, tiley));
|
||||
}
|
||||
}
|
||||
caches.put(cx, cy, Caches.end());
|
||||
}
|
||||
}
|
||||
if(floorCache == null || floorCache.length != chunksx || floorCache[0].length != chunksy){
|
||||
floorCache = new Cache[chunksx][chunksy];
|
||||
}
|
||||
|
||||
|
||||
OrthographicCamera camera = Core.camera;
|
||||
|
||||
|
||||
Draw.end();
|
||||
|
||||
int crangex = (int)(camera.viewportWidth/(chunksize*tilesize))+1;
|
||||
int crangey = (int)(camera.viewportHeight/(chunksize*tilesize))+1;
|
||||
|
||||
|
||||
int crangex = (int) (camera.viewportWidth / (chunksize * tilesize)) + 1;
|
||||
int crangey = (int) (camera.viewportHeight / (chunksize * tilesize)) + 1;
|
||||
|
||||
for(int x = -crangex; x <= crangex; x++){
|
||||
for(int y = -crangey; y <= crangey; y++){
|
||||
int worldx = Mathf.scl(camera.position.x, chunksize*tilesize) + x;
|
||||
int worldy = Mathf.scl(camera.position.y, chunksize*tilesize) + y;
|
||||
|
||||
if(caches.containsKey(worldx, worldy))
|
||||
caches.get(worldx, worldy).render();
|
||||
int worldx = Mathf.scl(camera.position.x, chunksize * tilesize) + x;
|
||||
int worldy = Mathf.scl(camera.position.y, chunksize * tilesize) + y;
|
||||
|
||||
if(!Mathf.inBounds(worldx, worldy, floorCache))
|
||||
continue;
|
||||
|
||||
if(floorCache[worldx][worldy] == null){
|
||||
renderCache(worldx, worldy);
|
||||
}
|
||||
|
||||
floorCache[worldx][worldy].render();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Draw.begin();
|
||||
|
||||
|
||||
Draw.reset();
|
||||
int rangex = (int) (camera.viewportWidth * camera.zoom / tilesize / 2)+2;
|
||||
int rangey = (int) (camera.viewportHeight * camera.zoom / tilesize / 2)+2;
|
||||
|
||||
int rangex = (int) (camera.viewportWidth * camera.zoom / tilesize / 2) + 2;
|
||||
int rangey = (int) (camera.viewportHeight * camera.zoom / tilesize / 2) + 2;
|
||||
|
||||
boolean noshadows = Settings.getBool("noshadows");
|
||||
|
||||
for(int l = (noshadows ? 1 : 0); l < 4; l++){
|
||||
|
||||
//0 = shadows
|
||||
//1 = normal blocks
|
||||
//2 = over blocks
|
||||
for(int l = (noshadows ? 1 : 0); l < 3; l++){
|
||||
if(l == 0){
|
||||
Draw.surface("shadow");
|
||||
}
|
||||
@@ -174,14 +172,15 @@ public class Renderer extends RendererModule{
|
||||
int worldx = Mathf.scl(camera.position.x, tilesize) + x;
|
||||
int worldy = Mathf.scl(camera.position.y, tilesize) + y;
|
||||
|
||||
if( World.tile(worldx, worldy) != null){
|
||||
if(World.tile(worldx, worldy) != null){
|
||||
Tile tile = World.tile(worldx, worldy);
|
||||
if(l == 0){
|
||||
if(tile.block() != Blocks.air)
|
||||
if(tile.block() != Blocks.air){
|
||||
Draw.rect(tile.block().shadow, worldx * tilesize, worldy * tilesize);
|
||||
}
|
||||
}else if(l == 1){
|
||||
tile.block().draw(tile);
|
||||
}else{
|
||||
}else if(l == 2){
|
||||
tile.block().drawOver(tile);
|
||||
}
|
||||
}
|
||||
@@ -195,23 +194,34 @@ public class Renderer extends RendererModule{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void clearTiles(){
|
||||
for(Cache cache : caches.values())
|
||||
cache.dispose();
|
||||
|
||||
void renderCache(int cx, int cy){
|
||||
Caches.begin(1600);
|
||||
|
||||
for(int tilex = cx * chunksize; tilex < (cx + 1) * chunksize; tilex++){
|
||||
for(int tiley = cy * chunksize; tiley < (cy + 1) * chunksize; tiley++){
|
||||
Tile tile = World.tile(tilex, tiley);
|
||||
tile.floor().drawCache(tile);
|
||||
|
||||
}
|
||||
}
|
||||
floorCache[cx][cy] = Caches.end();
|
||||
|
||||
caches.clear();
|
||||
}
|
||||
|
||||
|
||||
public void clearTiles(){
|
||||
floorCache = null;
|
||||
}
|
||||
|
||||
void renderPixelOverlay(){
|
||||
|
||||
if(player.recipe != null && Inventory.hasItems(player.recipe.requirements) && (!ui.hasMouse() || android)){
|
||||
|
||||
if(player.recipe != null && Inventory.hasItems(player.recipe.requirements) && (!ui.hasMouse() || android) && AndroidInput.mode == PlaceMode.cursor){
|
||||
float x = 0;
|
||||
float y = 0;
|
||||
|
||||
|
||||
int tilex = 0;
|
||||
int tiley = 0;
|
||||
|
||||
|
||||
if(android){
|
||||
Vector2 vec = Graphics.world(AndroidInput.mousex, AndroidInput.mousey);
|
||||
x = Mathf.round2(vec.x, tilesize);
|
||||
@@ -230,7 +240,7 @@ public class Renderer extends RendererModule{
|
||||
Draw.color(valid ? Color.PURPLE : Color.SCARLET);
|
||||
Draw.thickness(2f);
|
||||
Draw.square(x, y, tilesize / 2 + MathUtils.sin(Timers.time() / 6f) + 1);
|
||||
|
||||
|
||||
player.recipe.result.drawPlace(tilex, tiley, valid);
|
||||
|
||||
if(player.recipe.result.rotate){
|
||||
@@ -238,7 +248,7 @@ public class Renderer extends RendererModule{
|
||||
Tmp.v1.set(7, 0).rotate(player.rotation * 90);
|
||||
Draw.line(x, y, x + Tmp.v1.x, y + Tmp.v1.y);
|
||||
}
|
||||
|
||||
|
||||
Draw.thickness(1f);
|
||||
Draw.color("scarlet");
|
||||
for(Tile spawn : World.spawnpoints){
|
||||
@@ -249,7 +259,7 @@ public class Renderer extends RendererModule{
|
||||
Cursors.setHand();
|
||||
else
|
||||
Cursors.restoreCursor();
|
||||
|
||||
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
@@ -262,13 +272,14 @@ public class Renderer extends RendererModule{
|
||||
Draw.reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(android && player.breaktime > 0){
|
||||
Tile tile = AndroidInput.selected();
|
||||
Vector2 vec = Graphics.world(Gdx.input.getX(0), Gdx.input.getY(0));
|
||||
Tile tile = World.tile(Mathf.scl2(vec.x, tilesize), Mathf.scl2(vec.y, tilesize));
|
||||
if(tile.breakable() && tile.block() != ProductionBlocks.core){
|
||||
float fract = player.breaktime / tile.block().breaktime;
|
||||
Draw.color(Color.YELLOW, Color.SCARLET, fract);
|
||||
Draw.circle(tile.worldx(), tile.worldy(), 4 + (1f-fract)*26);
|
||||
Draw.circle(tile.worldx(), tile.worldy(), 4 + (1f - fract) * 26);
|
||||
Draw.reset();
|
||||
}
|
||||
}
|
||||
@@ -278,8 +289,8 @@ public class Renderer extends RendererModule{
|
||||
|
||||
if(tile != null && tile.block() != Blocks.air){
|
||||
if(tile.entity != null)
|
||||
drawHealth(tile.entity.x, tile.entity.y, tile.entity.health, tile.entity.maxhealth);
|
||||
|
||||
drawHealth(tile.entity.x, tile.entity.y, tile.entity.health, tile.entity.maxhealth);
|
||||
|
||||
tile.block().drawPixelOverlay(tile);
|
||||
}
|
||||
}
|
||||
@@ -292,20 +303,20 @@ public class Renderer extends RendererModule{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void drawHealth(float x, float y, float health, float maxhealth){
|
||||
drawBar(Color.RED, x, y, health/maxhealth);
|
||||
drawBar(Color.RED, x, y, health / maxhealth);
|
||||
}
|
||||
|
||||
|
||||
public void drawBar(Color color, float x, float y, float fraction){
|
||||
float len = 3;
|
||||
float offset = 7;
|
||||
|
||||
float w = (int)(len * 2 * fraction) + 0.5f;
|
||||
|
||||
|
||||
float w = (int) (len * 2 * fraction) + 0.5f;
|
||||
|
||||
x -= 0.5f;
|
||||
y += 0.5f;
|
||||
|
||||
|
||||
Draw.thickness(3f);
|
||||
Draw.color(Color.SLATE);
|
||||
Draw.line(x - len + 1, y - offset, x + len + 1.5f, y - offset);
|
||||
@@ -317,20 +328,20 @@ public class Renderer extends RendererModule{
|
||||
Draw.line(x - len + 1, y - offset, x - len + w, y - offset);
|
||||
Draw.reset();
|
||||
}
|
||||
|
||||
|
||||
public void setCameraScale(int amount){
|
||||
targetscale = amount;
|
||||
clampScale();
|
||||
Draw.getSurface("pixel").setScale(targetscale);
|
||||
Draw.getSurface("shadow").setScale(targetscale);
|
||||
}
|
||||
|
||||
|
||||
public void scaleCamera(int amount){
|
||||
setCameraScale(targetscale + amount);
|
||||
}
|
||||
|
||||
|
||||
public void clampScale(){
|
||||
targetscale = Mathf.clamp(targetscale, Math.round(Unit.dp.inPixels(3)), Math.round(Unit.dp.inPixels((5))));
|
||||
targetscale = Mathf.clamp(targetscale, Math.round(Unit.dp.inPixels(2)), Math.round(Unit.dp.inPixels((5))));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.badlogic.gdx.utils.Array;
|
||||
|
||||
import io.anuke.mindustry.GameState.State;
|
||||
import io.anuke.mindustry.input.AndroidInput;
|
||||
import io.anuke.mindustry.input.PlaceMode;
|
||||
import io.anuke.mindustry.resource.*;
|
||||
import io.anuke.mindustry.ui.*;
|
||||
import io.anuke.ucore.core.Core;
|
||||
@@ -25,6 +26,7 @@ import io.anuke.ucore.function.VisibilityProvider;
|
||||
import io.anuke.ucore.modules.SceneModule;
|
||||
import io.anuke.ucore.scene.actions.Actions;
|
||||
import io.anuke.ucore.scene.builders.*;
|
||||
import io.anuke.ucore.scene.event.Touchable;
|
||||
import io.anuke.ucore.scene.ui.*;
|
||||
import io.anuke.ucore.scene.ui.Window.WindowStyle;
|
||||
import io.anuke.ucore.scene.ui.layout.*;
|
||||
@@ -129,12 +131,16 @@ public class UI extends SceneModule{
|
||||
prefs.checkPref("noshadows", "Disable shadows", false);
|
||||
|
||||
prefs.hidden(()->{
|
||||
GameState.set(State.playing);
|
||||
if(!GameState.is(State.menu)){
|
||||
GameState.set(State.playing);
|
||||
}
|
||||
});
|
||||
|
||||
prefs.shown(()->{
|
||||
GameState.set(State.paused);
|
||||
menu.hide();
|
||||
if(!GameState.is(State.menu)){
|
||||
GameState.set(State.paused);
|
||||
menu.hide();
|
||||
}
|
||||
});
|
||||
|
||||
keys = new KeybindDialog();
|
||||
@@ -214,7 +220,7 @@ public class UI extends SceneModule{
|
||||
player.recipe = null;
|
||||
}
|
||||
});
|
||||
add(button).fill().height(54).padTop(-10).units(Unit.dp);
|
||||
add(button).fill().height(54).padRight(-0.1f).padTop(-10).units(Unit.dp);
|
||||
button.getImageCell().size(40).padBottom(4).units(Unit.dp);
|
||||
group.add(button);
|
||||
|
||||
@@ -244,7 +250,7 @@ public class UI extends SceneModule{
|
||||
//image.setDisabled(!has);
|
||||
image.setChecked(player.recipe == r);
|
||||
//image.setTouchable(has ? Touchable.enabled : Touchable.disabled);
|
||||
image.getImage().setColor(has ? Color.WHITE : Color.GRAY);
|
||||
image.getImage().setColor(has ? Color.WHITE : Color.DARK_GRAY);
|
||||
});
|
||||
|
||||
if(i % rows == rows-1)
|
||||
@@ -306,7 +312,6 @@ public class UI extends SceneModule{
|
||||
});
|
||||
|
||||
new imagebutton("icon-pause", isize, ()->{
|
||||
//TODO pause
|
||||
GameState.set(GameState.is(State.paused) ? State.playing : State.paused);
|
||||
}){{
|
||||
get().update(()->{
|
||||
@@ -333,7 +338,7 @@ public class UI extends SceneModule{
|
||||
atop();
|
||||
|
||||
new table("pane"){{
|
||||
new label("[orange]< paused >").scale(0.75f).pad(6);
|
||||
new label("[orange]< paused >").scale(Unit.dp.inPixels(0.75f)).pad(6).units(Unit.dp);
|
||||
}}.end();
|
||||
}}.end();
|
||||
|
||||
@@ -419,12 +424,14 @@ public class UI extends SceneModule{
|
||||
}}.end();
|
||||
}
|
||||
|
||||
//respawn background table
|
||||
new table("white"){{
|
||||
respawntable = get();
|
||||
respawntable.setColor(Color.CLEAR);
|
||||
|
||||
}}.end();
|
||||
|
||||
//respawn table
|
||||
new table(){{
|
||||
new table("pane"){{
|
||||
|
||||
@@ -435,7 +442,55 @@ public class UI extends SceneModule{
|
||||
}}.end();
|
||||
}}.end();
|
||||
|
||||
if(android){
|
||||
//placement table
|
||||
new table(){{
|
||||
visible(()->player.recipe != null);
|
||||
abottom();
|
||||
aleft();
|
||||
|
||||
|
||||
new table("pane"){{
|
||||
new label(()->"Placement Mode: [orange]" + AndroidInput.mode.name()).pad(4).units(Unit.dp);
|
||||
row();
|
||||
|
||||
aleft();
|
||||
|
||||
new table(){{
|
||||
aleft();
|
||||
ButtonGroup<ImageButton> group = new ButtonGroup<>();
|
||||
|
||||
defaults().size(58, 62).pad(6).units(Unit.dp);
|
||||
|
||||
for(PlaceMode mode : PlaceMode.values()){
|
||||
new imagebutton("icon-" + mode.name(), "toggle", Unit.dp.inPixels(10*3), ()->{
|
||||
AndroidInput.mode = mode;
|
||||
}){{
|
||||
group.add(get());
|
||||
}};
|
||||
}
|
||||
|
||||
new imagebutton("icon-cancel", Unit.dp.inPixels(14*3), ()->{
|
||||
player.recipe = null;
|
||||
}).visible(()->player.recipe != null && AndroidInput.mode == PlaceMode.touch);
|
||||
|
||||
new imagebutton("icon-rotate-arrow", Unit.dp.inPixels(14*3), ()->{
|
||||
player.rotation ++;
|
||||
player.rotation %= 4;
|
||||
}).update(i->{
|
||||
i.getImage().setOrigin(Align.center);
|
||||
i.getImage().setRotation(player.rotation*90);
|
||||
}).visible(()->player.recipe != null && AndroidInput.mode == PlaceMode.touch
|
||||
&& player.recipe.result.rotate);
|
||||
|
||||
}}.left().end();
|
||||
}}.end();
|
||||
}}.end();
|
||||
|
||||
}
|
||||
|
||||
loadingtable = new table("loadDim"){{
|
||||
get().setTouchable(Touchable.enabled);
|
||||
new table("button"){{
|
||||
new label("[orange]Loading..."){{
|
||||
get().setName("namelabel");
|
||||
@@ -449,20 +504,22 @@ public class UI extends SceneModule{
|
||||
tools.addIButton("icon-cancel", Unit.dp.inPixels(42), ()->{
|
||||
player.recipe = null;
|
||||
});
|
||||
|
||||
tools.addIButton("icon-rotate", Unit.dp.inPixels(42), ()->{
|
||||
player.rotation++;
|
||||
|
||||
player.rotation ++;
|
||||
player.rotation %= 4;
|
||||
});
|
||||
|
||||
tools.addIButton("icon-check", Unit.dp.inPixels(42), ()->{
|
||||
AndroidInput.place();
|
||||
});
|
||||
|
||||
scene.add(tools);
|
||||
|
||||
tools.setVisible(()->{
|
||||
return !GameState.is(State.menu) && android && player.recipe != null && Inventory.hasItems(player.recipe.requirements);
|
||||
});
|
||||
tools.setVisible(()->
|
||||
!GameState.is(State.menu) && android && player.recipe != null && Inventory.hasItems(player.recipe.requirements) &&
|
||||
AndroidInput.mode == PlaceMode.cursor
|
||||
);
|
||||
|
||||
tools.update(()->{
|
||||
tools.setPosition(AndroidInput.mousex, Gdx.graphics.getHeight()-AndroidInput.mousey-15*Core.cameraScale, Align.top);
|
||||
@@ -578,6 +635,16 @@ public class UI extends SceneModule{
|
||||
});
|
||||
}
|
||||
|
||||
public void showError(String text){
|
||||
new Dialog("[crimson]An error has occured", "dialog"){{
|
||||
content().pad(Unit.dp.inPixels(15));
|
||||
content().add(text);
|
||||
getButtonTable().addButton("OK", ()->{
|
||||
hide();
|
||||
}).size(90, 50).pad(4).units(Unit.dp);
|
||||
}}.show();
|
||||
}
|
||||
|
||||
public void showLoading(){
|
||||
showLoading("[orange]Loading..");
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ public class Vars{
|
||||
//respawn time in frames
|
||||
public static final float respawnduration = 60*4;
|
||||
//time between waves in frames
|
||||
public static final float wavespace = 35*60*(android ? 2 : 1);
|
||||
public static final float wavespace = 25*60*(android ? 1 : 1);
|
||||
//waves can last no longer than 6 minutes, otherwise the next one spawns
|
||||
public static final float maxwavespace = 60*60*6;
|
||||
//how far away from spawn points the player can't place blocks
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Enemy extends DestructibleEntity{
|
||||
|
||||
hitsize = 5;
|
||||
|
||||
maxhealth = 30;
|
||||
maxhealth = 50;
|
||||
heal();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ public class FastEnemy extends Enemy{
|
||||
speed = 0.7f;
|
||||
reload = 30;
|
||||
|
||||
maxhealth = 20;
|
||||
maxhealth = 30;
|
||||
heal();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package io.anuke.mindustry.entities.enemies;
|
||||
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.entities.Bullet;
|
||||
import io.anuke.mindustry.entities.BulletType;
|
||||
import io.anuke.ucore.util.Angles;
|
||||
|
||||
public class TankEnemy extends Enemy{
|
||||
|
||||
@@ -9,8 +12,19 @@ public class TankEnemy extends Enemy{
|
||||
|
||||
maxhealth = 400;
|
||||
speed = 0.2f;
|
||||
reload = 140f;
|
||||
bullet = BulletType.iron;
|
||||
reload = 90f;
|
||||
bullet = BulletType.small;
|
||||
}
|
||||
|
||||
void shoot(){
|
||||
vector.set(length, 0).rotate(direction.angle());
|
||||
|
||||
Angles.shotgun(3, 4f, direction.angle(), f->{
|
||||
Bullet out = new Bullet(bullet, this, x+vector.x, y+vector.y, f).add();
|
||||
out.damage = (int)(damage*Vars.multiplier);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ import io.anuke.ucore.util.Mathf;
|
||||
|
||||
public class AndroidInput extends InputAdapter{
|
||||
public static float mousex, mousey;
|
||||
public static PlaceMode mode = PlaceMode.cursor;
|
||||
public static boolean brokeBlock = false;
|
||||
private static float lmousex, lmousey;
|
||||
private static float warmup;
|
||||
private static float warmupDelay = 20;
|
||||
@@ -30,6 +32,12 @@ public class AndroidInput extends InputAdapter{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean touchUp (int screenX, int screenY, int pointer, int button) {
|
||||
brokeBlock = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean touchDown (int screenX, int screenY, int pointer, int button) {
|
||||
ui.hideTooltip();
|
||||
@@ -49,7 +57,9 @@ public class AndroidInput extends InputAdapter{
|
||||
public static void breakBlock(){
|
||||
Tile tile = selected();
|
||||
player.breaktime += Timers.delta();
|
||||
|
||||
if(player.breaktime >= tile.block().breaktime){
|
||||
brokeBlock = true;
|
||||
if(tile.block().drops != null){
|
||||
Inventory.addItem(tile.block().drops.item, tile.block().drops.amount);
|
||||
}
|
||||
@@ -92,9 +102,11 @@ public class AndroidInput extends InputAdapter{
|
||||
public static void doInput(){
|
||||
if(Gdx.input.isTouched(0)
|
||||
&& Mathf.near2d(lmousex, lmousey, Gdx.input.getX(0), Gdx.input.getY(0), 50)
|
||||
&& !ui.hasMouse() && player.recipe == null){
|
||||
&& !ui.hasMouse() /*&& (player.recipe == null || mode == PlaceMode.touch)*/){
|
||||
warmup += Timers.delta();
|
||||
|
||||
float lx = mousex, ly = mousey;
|
||||
|
||||
mousex = Gdx.input.getX(0);
|
||||
mousey = Gdx.input.getY(0);
|
||||
|
||||
@@ -110,6 +122,9 @@ public class AndroidInput extends InputAdapter{
|
||||
player.breaktime = 0;
|
||||
}
|
||||
}
|
||||
|
||||
mousex = lx;
|
||||
mousey = ly;
|
||||
}else{
|
||||
warmup = 0;
|
||||
lmousex = Gdx.input.getX(0);
|
||||
|
||||
@@ -6,13 +6,9 @@ import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.input.GestureDetector.GestureAdapter;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
import io.anuke.mindustry.GameState;
|
||||
import io.anuke.mindustry.GameState.State;
|
||||
import io.anuke.mindustry.Inventory;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.World;
|
||||
import io.anuke.mindustry.world.blocks.Blocks;
|
||||
import io.anuke.ucore.core.*;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.ucore.core.Core;
|
||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||
|
||||
public class GestureHandler extends GestureAdapter{
|
||||
@@ -23,6 +19,7 @@ public class GestureHandler extends GestureAdapter{
|
||||
|
||||
@Override
|
||||
public boolean longPress(float x, float y){
|
||||
/*
|
||||
Tile tile = World.cursorTile();
|
||||
player.breaktime += Timers.delta();
|
||||
if(!GameState.is(State.menu) && player.breaktime >= tile.block().breaktime){
|
||||
@@ -31,16 +28,28 @@ public class GestureHandler extends GestureAdapter{
|
||||
tile.setBlock(Blocks.air);
|
||||
player.breaktime = 0f;
|
||||
Sounds.play("break");
|
||||
}*/
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean tap (float x, float y, int count, int button) {
|
||||
if(AndroidInput.mode == PlaceMode.touch && !ui.hasMouse() && player.recipe != null &&
|
||||
Inventory.hasItems(player.recipe.requirements) && !Vars.ui.hasMouse() && !AndroidInput.brokeBlock){
|
||||
AndroidInput.mousex = x;
|
||||
AndroidInput.mousey = y;
|
||||
AndroidInput.place();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean pan(float x, float y, float deltaX, float deltaY){
|
||||
if(player.recipe == null || !Inventory.hasItems(player.recipe.requirements)){
|
||||
if(player.recipe == null || !Inventory.hasItems(player.recipe.requirements) || AndroidInput.mode == PlaceMode.touch){
|
||||
player.x -= deltaX*Core.camera.zoom/Core.cameraScale;
|
||||
player.y += deltaY*Core.camera.zoom/Core.cameraScale;
|
||||
}else{
|
||||
}else if(AndroidInput.mode == PlaceMode.cursor){
|
||||
AndroidInput.mousex += deltaX;
|
||||
AndroidInput.mousey += deltaY;
|
||||
}
|
||||
|
||||
5
core/src/io/anuke/mindustry/input/PlaceMode.java
Normal file
5
core/src/io/anuke/mindustry/input/PlaceMode.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package io.anuke.mindustry.input;
|
||||
|
||||
public enum PlaceMode{
|
||||
cursor, touch;
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.math.MathUtils;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.entities.Bullet;
|
||||
import io.anuke.mindustry.entities.BulletType;
|
||||
import io.anuke.mindustry.entities.Player;
|
||||
@@ -72,6 +73,7 @@ public enum Weapon{
|
||||
float ang = mouseAngle(p);
|
||||
|
||||
bullet(p, p.x, p.y, ang);
|
||||
Effects.effect("railshoot", p.x + vector.x, p.y+vector.y);
|
||||
}
|
||||
},
|
||||
mortar(100, BulletType.shell, "Shoots a slow, but damaging shell.", stack(Item.titanium, 40), stack(Item.steel, 60)){
|
||||
@@ -80,6 +82,8 @@ public enum Weapon{
|
||||
public void shoot(Player p){
|
||||
float ang = mouseAngle(p);
|
||||
bullet(p, p.x, p.y, ang);
|
||||
Effects.effect("mortarshoot", p.x + vector.x, p.y+vector.y);
|
||||
Effects.shake(2f, 2f, Vars.player);
|
||||
}
|
||||
};
|
||||
public float reload;
|
||||
|
||||
@@ -16,52 +16,58 @@ public class LoadDialog extends Dialog{
|
||||
public LoadDialog() {
|
||||
super("Load Game");
|
||||
setup();
|
||||
|
||||
shown(()->{
|
||||
|
||||
shown(() -> {
|
||||
setup();
|
||||
});
|
||||
|
||||
getButtonTable().addButton("Back", ()->{
|
||||
|
||||
getButtonTable().addButton("Back", () -> {
|
||||
hide();
|
||||
}).pad(2).size(180, 44).units(Unit.dp);
|
||||
}
|
||||
|
||||
|
||||
private void setup(){
|
||||
content().clear();
|
||||
|
||||
|
||||
content().add("Select a save slot.").padBottom(2);
|
||||
content().row();
|
||||
|
||||
for(int i = 0; i < Vars.saveSlots; i ++){
|
||||
|
||||
for(int i = 0; i < Vars.saveSlots; i++){
|
||||
final int slot = i;
|
||||
|
||||
TextButton button = new TextButton("[orange]Slot " + (i+1));
|
||||
|
||||
TextButton button = new TextButton("[orange]Slot " + (i + 1));
|
||||
button.getLabelCell().top().left().growX();
|
||||
button.row();
|
||||
button.pad(Unit.dp.inPixels(10));
|
||||
button.add("[gray]" + (!SaveIO.isSaveValid(i) ? "<empty>" : "Last Saved: " + SaveIO.getTimeString(i))).padBottom(2);
|
||||
button.getLabel().setFontScale(0.75f);
|
||||
button.setDisabled(!SaveIO.isSaveValid(i) );
|
||||
|
||||
button.clicked(()->{
|
||||
button.getLabel().setFontScale(Unit.dp.inPixels(0.75f));
|
||||
button.setDisabled(!SaveIO.isSaveValid(i));
|
||||
|
||||
button.clicked(() -> {
|
||||
if(!button.isDisabled()){
|
||||
Vars.ui.showLoading();
|
||||
|
||||
|
||||
Timer.schedule(new Task(){
|
||||
@Override
|
||||
public void run(){
|
||||
SaveIO.loadFromSlot(slot);
|
||||
Vars.ui.hideLoading();
|
||||
hide();
|
||||
try{
|
||||
SaveIO.loadFromSlot(slot);
|
||||
}catch(Exception e){
|
||||
Vars.ui.showError("[orange]Save file corrupted or invalid!");
|
||||
return;
|
||||
}
|
||||
Vars.ui.hideMenu();
|
||||
GameState.set(State.playing);
|
||||
}
|
||||
}, 2f/60f);
|
||||
}, 3f/60f);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
content().add(button).size(400, 78).units(Unit.dp).pad(2);
|
||||
content().row();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class SaveDialog extends Dialog{
|
||||
button.row();
|
||||
button.pad(Unit.dp.inPixels(10));
|
||||
button.add((!SaveIO.isSaveValid(i) ? "[gray]<empty>" : "[LIGHT_GRAY]Last Saved: " + SaveIO.getTimeString(i))).padBottom(2);
|
||||
button.getLabel().setFontScale(0.75f);
|
||||
button.getLabel().setFontScale(Unit.dp.inPixels(0.75f));
|
||||
|
||||
button.clicked(()->{
|
||||
if(SaveIO.isSaveValid(slot)){
|
||||
@@ -62,16 +62,21 @@ public class SaveDialog extends Dialog{
|
||||
}
|
||||
|
||||
void save(int slot){
|
||||
Vars.ui.showLoading("[yellow]Saving...");
|
||||
Vars.ui.showLoading("[orange]Saving...");
|
||||
|
||||
Timer.schedule(new Task(){
|
||||
@Override
|
||||
public void run(){
|
||||
SaveIO.saveToSlot(slot);
|
||||
hide();
|
||||
try{
|
||||
SaveIO.saveToSlot(slot);
|
||||
}catch (Exception e){
|
||||
Vars.ui.showError("[orange]Failed to save game!");
|
||||
return;
|
||||
}
|
||||
Vars.ui.hideLoading();
|
||||
}
|
||||
}, 8f/60f);
|
||||
}, 5f/60f);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package io.anuke.mindustry.world;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.math.MathUtils;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
|
||||
@@ -9,8 +8,6 @@ import io.anuke.mindustry.entities.TileEntity;
|
||||
import io.anuke.mindustry.resource.Item;
|
||||
import io.anuke.mindustry.resource.ItemStack;
|
||||
import io.anuke.ucore.core.Draw;
|
||||
import io.anuke.ucore.graphics.Caches;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
public class Block{
|
||||
private static int lastid;
|
||||
@@ -157,48 +154,11 @@ public class Block{
|
||||
}
|
||||
|
||||
public void drawCache(Tile tile){
|
||||
MathUtils.random.setSeed(tile.id());
|
||||
|
||||
Caches.draw(vary ? (name() + MathUtils.random(1, 3)) : name(), tile.worldx(), tile.worldy());
|
||||
|
||||
for(int dx = -1; dx <= 1; dx ++){
|
||||
for(int dy = -1; dy <= 1; dy ++){
|
||||
|
||||
if(dx == 0 && dy == 0) continue;
|
||||
|
||||
Tile other = World.tile(tile.x+dx, tile.y+dy);
|
||||
|
||||
if(other == null) continue;
|
||||
|
||||
Block floor = other.floor();
|
||||
|
||||
if(floor.id <= this.id) continue;
|
||||
|
||||
TextureRegion region = Draw.hasRegion(floor.name() + "edge") ? Draw.region(floor.name() + "edge") :
|
||||
Draw.region(floor.edge + "edge");
|
||||
|
||||
int sx = -dx*8+2, sy = -dy*8+2;
|
||||
int x = Mathf.clamp(sx, 0, 12);
|
||||
int y = Mathf.clamp(sy, 0, 12);
|
||||
int w = Mathf.clamp(sx+8, 0, 12)-x, h = Mathf.clamp(sy+8, 0, 12)-y;
|
||||
|
||||
float rx = Mathf.clamp(dx*8, 0, 8-w);
|
||||
float ry = Mathf.clamp(dy*8, 0, 8-h);
|
||||
|
||||
temp.setTexture(region.getTexture());
|
||||
temp.setRegion(region.getRegionX()+x, region.getRegionY()+y+h, w, -h);
|
||||
|
||||
Caches.draw(temp, tile.worldx()-4 + rx, tile.worldy()-4 + ry, w, h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void draw(Tile tile){
|
||||
if(tile.floor() == this){
|
||||
throw new RuntimeException("Rendering non-cached tiles is disabled.");
|
||||
}else{
|
||||
Draw.rect(name(), tile.worldx(), tile.worldy(), rotate ? tile.rotation * 90 : 0);
|
||||
}
|
||||
Draw.rect(name(), tile.worldx(), tile.worldy(), rotate ? tile.rotation * 90 : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.anuke.mindustry.resource.Item;
|
||||
import io.anuke.mindustry.resource.ItemStack;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.blocks.types.Floor;
|
||||
import io.anuke.mindustry.world.blocks.types.Wall;
|
||||
|
||||
public class Blocks{
|
||||
@@ -11,38 +12,39 @@ public class Blocks{
|
||||
|
||||
air = new Block("air"){
|
||||
//no drawing here
|
||||
public void drawCache(Tile tile){}
|
||||
public void draw(Tile tile){}
|
||||
},
|
||||
|
||||
deepwater = new Block("deepwater"){{
|
||||
deepwater = new Floor("deepwater"){{
|
||||
vary = false;
|
||||
solid = true;
|
||||
}},
|
||||
|
||||
water = new Block("water"){{
|
||||
water = new Floor("water"){{
|
||||
vary = false;
|
||||
solid = true;
|
||||
}},
|
||||
|
||||
stone = new Block("stone"){{
|
||||
stone = new Floor("stone"){{
|
||||
drops = new ItemStack(Item.stone, 1);
|
||||
}},
|
||||
|
||||
iron = new Block("iron"){{
|
||||
iron = new Floor("iron"){{
|
||||
drops = new ItemStack(Item.iron, 1);
|
||||
}},
|
||||
|
||||
coal = new Block("coal"){{
|
||||
coal = new Floor("coal"){{
|
||||
drops = new ItemStack(Item.coal, 1);
|
||||
}},
|
||||
|
||||
titanium = new Block("titanium"){{
|
||||
titanium = new Floor("titanium"){{
|
||||
drops = new ItemStack(Item.titanium, 1);
|
||||
}},
|
||||
|
||||
dirt = new Block("dirt"),
|
||||
dirt = new Floor("dirt"),
|
||||
|
||||
grass = new Block("grass"),
|
||||
grass = new Floor("grass"),
|
||||
|
||||
stoneblock = new Block("stoneblock"){{
|
||||
solid = true;
|
||||
|
||||
@@ -26,12 +26,14 @@ public class Conduit extends Block{
|
||||
ConduitEntity entity = tile.entity();
|
||||
|
||||
Draw.rect(name() + "bottom", tile.worldx(), tile.worldy(), tile.rotation * 90);
|
||||
|
||||
if(entity.liquid != null && entity.liquidAmount > 0.01f){
|
||||
Draw.color(entity.liquid.color);
|
||||
Draw.alpha(entity.liquidAmount / liquidCapacity);
|
||||
Draw.rect("conduitliquid", tile.worldx(), tile.worldy(), tile.rotation * 90);
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
Draw.rect(name() + "top", tile.worldx(), tile.worldy(), tile.rotation * 90);
|
||||
|
||||
}
|
||||
|
||||
57
core/src/io/anuke/mindustry/world/blocks/types/Floor.java
Normal file
57
core/src/io/anuke/mindustry/world/blocks/types/Floor.java
Normal file
@@ -0,0 +1,57 @@
|
||||
package io.anuke.mindustry.world.blocks.types;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.math.MathUtils;
|
||||
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.World;
|
||||
import io.anuke.ucore.core.Draw;
|
||||
import io.anuke.ucore.graphics.Caches;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
|
||||
public class Floor extends Block{
|
||||
|
||||
public Floor(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawCache(Tile tile){
|
||||
MathUtils.random.setSeed(tile.id());
|
||||
|
||||
Caches.draw(vary ? (name() + MathUtils.random(1, 3)) : name(), tile.worldx(), tile.worldy());
|
||||
|
||||
for(int dx = -1; dx <= 1; dx ++){
|
||||
for(int dy = -1; dy <= 1; dy ++){
|
||||
|
||||
if(dx == 0 && dy == 0) continue;
|
||||
|
||||
Tile other = World.tile(tile.x+dx, tile.y+dy);
|
||||
|
||||
if(other == null) continue;
|
||||
|
||||
Block floor = other.floor();
|
||||
|
||||
if(floor.id <= this.id) continue;
|
||||
|
||||
TextureRegion region = Draw.hasRegion(floor.name() + "edge") ? Draw.region(floor.name() + "edge") :
|
||||
Draw.region(floor.edge + "edge");
|
||||
|
||||
int sx = -dx*8+2, sy = -dy*8+2;
|
||||
int x = Mathf.clamp(sx, 0, 12);
|
||||
int y = Mathf.clamp(sy, 0, 12);
|
||||
int w = Mathf.clamp(sx+8, 0, 12)-x, h = Mathf.clamp(sy+8, 0, 12)-y;
|
||||
|
||||
float rx = Mathf.clamp(dx*8, 0, 8-w);
|
||||
float ry = Mathf.clamp(dy*8, 0, 8-h);
|
||||
|
||||
temp.setTexture(region.getTexture());
|
||||
temp.setRegion(region.getRegionX()+x, region.getRegionY()+y+h, w, -h);
|
||||
|
||||
Caches.draw(temp, tile.worldx()-4 + rx, tile.worldy()-4 + ry, w, h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user