Removed loading screen
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
package io.anuke.mindustry;
|
||||
|
||||
import io.anuke.arc.*;
|
||||
import io.anuke.arc.graphics.Color;
|
||||
import io.anuke.arc.graphics.g2d.*;
|
||||
import io.anuke.arc.math.Mathf;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.arc.util.Log;
|
||||
import io.anuke.arc.util.Time;
|
||||
import io.anuke.mindustry.core.*;
|
||||
import io.anuke.mindustry.game.EventType.GameLoadEvent;
|
||||
import io.anuke.mindustry.io.BundleLoader;
|
||||
|
||||
import static io.anuke.arc.Core.batch;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public class Mindustry extends ApplicationCore{
|
||||
@@ -23,34 +21,21 @@ public class Mindustry extends ApplicationCore{
|
||||
});
|
||||
|
||||
Time.mark();
|
||||
Vars.init();
|
||||
Log.setUseColors(false);
|
||||
BundleLoader.load();
|
||||
content.load();
|
||||
content.loadColors();
|
||||
|
||||
batch = new SpriteBatch();
|
||||
add(logic = new Logic());
|
||||
add(world = new World());
|
||||
add(control = new Control());
|
||||
add(renderer = new Renderer());
|
||||
add(ui = new UI());
|
||||
add(netServer = new NetServer());
|
||||
add(netClient = new NetClient());
|
||||
|
||||
Core.app.post(() -> Core.app.post(() -> {
|
||||
drawLoading();
|
||||
Core.app.post(() -> Core.app.post(() -> {
|
||||
Vars.init();
|
||||
Log.setUseColors(false);
|
||||
BundleLoader.load();
|
||||
content.load();
|
||||
content.loadColors();
|
||||
|
||||
add(logic = new Logic());
|
||||
add(world = new World());
|
||||
add(control = new Control());
|
||||
add(renderer = new Renderer());
|
||||
add(ui = new UI());
|
||||
add(netServer = new NetServer());
|
||||
add(netClient = new NetClient());
|
||||
|
||||
for(ApplicationListener listener : modules){
|
||||
listener.init();
|
||||
}
|
||||
|
||||
Log.info("Time to load [total]: {0}", Time.elapsed());
|
||||
Events.fire(new GameLoadEvent());
|
||||
}));
|
||||
}));
|
||||
Events.fire(new GameLoadEvent());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,19 +61,8 @@ public class Mindustry extends ApplicationCore{
|
||||
|
||||
@Override
|
||||
public void init(){
|
||||
setup();
|
||||
super.init();
|
||||
|
||||
Log.info("Time to load [total]: {0}", Time.elapsed());
|
||||
}
|
||||
|
||||
void drawLoading(){
|
||||
Core.graphics.clear(Color.BLACK);
|
||||
Draw.proj().setOrtho(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight());
|
||||
|
||||
//Texture icon = new Texture("sprites/logotext.png");
|
||||
//float width = Math.min(Core.graphics.getWidth() - 10f, icon.getWidth());
|
||||
//Draw.rect(Draw.wrap(icon), Core.graphics.getWidth()/2f, Core.graphics.getHeight()/2f, width, (float)icon.getHeight() / icon.getWidth() * width);
|
||||
//Draw.flush();
|
||||
|
||||
//icon.dispose();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,8 +2,7 @@ package io.anuke.mindustry.core;
|
||||
|
||||
import io.anuke.arc.*;
|
||||
import io.anuke.arc.graphics.Color;
|
||||
import io.anuke.arc.graphics.g2d.Draw;
|
||||
import io.anuke.arc.graphics.g2d.TextureAtlas;
|
||||
import io.anuke.arc.graphics.g2d.*;
|
||||
import io.anuke.arc.input.KeyCode;
|
||||
import io.anuke.arc.scene.ui.Dialog;
|
||||
import io.anuke.arc.scene.ui.TextField;
|
||||
@@ -23,6 +22,7 @@ import io.anuke.mindustry.world.Tile;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import static io.anuke.arc.Core.batch;
|
||||
import static io.anuke.arc.Core.scene;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
@@ -41,6 +41,7 @@ public class Control implements ApplicationListener{
|
||||
private InputHandler input;
|
||||
|
||||
public Control(){
|
||||
batch = new SpriteBatch();
|
||||
saves = new Saves();
|
||||
data = new GlobalData();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user