1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-11-11 03:31:19 +03:00

Improved background

This commit is contained in:
Anuken 2017-05-03 14:24:20 -04:00
parent 6a453ce84b
commit 7935804517
5 changed files with 17 additions and 14 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -95,8 +95,6 @@ public class Control extends RendererModule{
Input.doInput();
}
if(core.block() == ProductionBlocks.core)
camera.position.set(player.x, player.y, 0f);
else

View File

@ -58,7 +58,7 @@ public class GameState{
Enemy enemy = null;
if(wave%5 == 0 /*&& point == 1 */&& pos == 0){
if(wave%5 == 0 & pos <= wave/5){
enemy = new BossEnemy(point);
}else if(wave > 3 && pos < amount/2){
enemy = new FastEnemy(point);
@ -89,7 +89,6 @@ public class GameState{
Timers.run(i*2, ()->{
Effects.effect("explosion", core.worldx()+Mathf.range(40), core.worldy()+Mathf.range(40));
});
}
Effects.effect("coreexplosion", core.worldx(), core.worldy());

View File

@ -6,8 +6,6 @@ import java.util.function.BooleanSupplier;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.Texture.TextureWrap;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.utils.Array;
@ -15,6 +13,8 @@ import com.badlogic.gdx.utils.Array;
import io.anuke.mindustry.resource.*;
import io.anuke.ucore.core.Draw;
import io.anuke.ucore.core.Settings;
import io.anuke.ucore.graphics.Hue;
import io.anuke.ucore.graphics.Textures;
import io.anuke.ucore.modules.SceneModule;
import io.anuke.ucore.scene.Scene;
import io.anuke.ucore.scene.builders.*;
@ -29,7 +29,7 @@ public class UI extends SceneModule{
SettingsDialog prefs;
KeybindDialog keys;
Dialog about, menu, restart, tutorial, levels;
Texture conveyor = new Texture("sprites/conveyor.png"), conveyort = new Texture("sprites/conveyort.png");
//Texture conveyor = new Texture("sprites/conveyor.png"), conveyort = new Texture("sprites/conveyort.png");
int selectedMap = 0;
BooleanSupplier play = () -> {
@ -46,8 +46,9 @@ public class UI extends SceneModule{
Dialog.closePadR = -1;
Dialog.closePadT = 4;
conveyor.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);
conveyort.setWrap(TextureWrap.Repeat, TextureWrap.Repeat);
Textures.load("sprites/");
Textures.repeatWrap("conveyor", "conveyort", "back");
}
void drawBackground(){
@ -57,16 +58,21 @@ public class UI extends SceneModule{
int w = gwidth();
int h = gheight();
Draw.color("gray");
batch.draw(conveyor, 0, 0, (int)Timers.time(), 0, w, h);
Draw.color(Hue.lightness(0.6f));
int tw = w/64+1;//, th = h/64+1;
batch.draw(Textures.get("back"), 0, 0, 0, 0, w, h);
for(int x = 0; x < tw; x ++){
batch.draw(conveyort, x*64, 0, 0, (int)Timers.time(), 32, h);
batch.draw(Textures.get("conveyort"), x*64, 0, 0, (int)(Timers.time()*2*(x%2-0.5f)), 32, h);
}
//for(int y = 0; y < th; y ++){
// batch.draw(Textures.get("conveyor"), 0, y*64, (int)(Timers.time()*2*(y%2-0.5f)), 0, w, 32);
//}
Draw.color();
Draw.tscl(1.5f);

View File

@ -53,7 +53,7 @@ public class WeaponBlocks{
shotgunturret = new Turret("shotgunturret"){
{
range = 50;
reload = 40f;
reload = 30f;
bullet = BulletType.iron;
ammo = Item.iron;
health = 70;