Events
This commit is contained in:
@@ -2,6 +2,7 @@ package io.anuke.mindustry.ui.dialogs;
|
||||
|
||||
import io.anuke.arc.*;
|
||||
import io.anuke.mindustry.core.GameState.*;
|
||||
import io.anuke.mindustry.game.EventType.*;
|
||||
import io.anuke.mindustry.game.Stats.*;
|
||||
import io.anuke.mindustry.game.*;
|
||||
import io.anuke.mindustry.type.*;
|
||||
@@ -21,6 +22,11 @@ public class GameOverDialog extends FloatingDialog{
|
||||
public void show(Team winner){
|
||||
this.winner = winner;
|
||||
show();
|
||||
if(winner == player.getTeam()){
|
||||
Events.fire(new WinEvent());
|
||||
}else{
|
||||
Events.fire(new LoseEvent());
|
||||
}
|
||||
}
|
||||
|
||||
void rebuild(){
|
||||
|
||||
@@ -9,6 +9,7 @@ import io.anuke.arc.scene.ui.*;
|
||||
import io.anuke.arc.scene.ui.layout.*;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.mindustry.*;
|
||||
import io.anuke.mindustry.game.EventType.*;
|
||||
import io.anuke.mindustry.gen.*;
|
||||
import io.anuke.mindustry.graphics.*;
|
||||
import io.anuke.mindustry.io.*;
|
||||
@@ -56,6 +57,7 @@ public class MapsDialog extends FloatingDialog{
|
||||
hide();
|
||||
ui.editor.show();
|
||||
ui.editor.editor.getTags().put("name", text);
|
||||
Events.fire(new MapMakeEvent());
|
||||
});
|
||||
});
|
||||
}).size(210f, 64f);
|
||||
|
||||
Reference in New Issue
Block a user