Implemented drone sprite, basic AI
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
package io.anuke.mindustry.ui;
|
||||
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
|
||||
import io.anuke.ucore.scene.ui.Button;
|
||||
|
||||
public class PressGroup{
|
||||
private Array<Button> buttons = new Array<>();
|
||||
private boolean active = true;
|
||||
|
||||
public void add(Button button){
|
||||
//TODO make only one button in the group be clickable, add implementation
|
||||
buttons.add(button);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,12 +3,9 @@ package io.anuke.mindustry.ui.dialogs;
|
||||
import com.badlogic.gdx.utils.reflect.ClassReflection;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
import io.anuke.mindustry.ui.PressGroup;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
import io.anuke.ucore.scene.Element;
|
||||
import io.anuke.ucore.scene.builders.build;
|
||||
import io.anuke.ucore.scene.builders.imagebutton;
|
||||
import io.anuke.ucore.scene.ui.ImageButton;
|
||||
import io.anuke.ucore.util.Bundles;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
@@ -78,8 +75,6 @@ public class PausedDialog extends FloatingDialog{
|
||||
}else{
|
||||
build.begin(content());
|
||||
|
||||
PressGroup group = new PressGroup();
|
||||
|
||||
content().defaults().size(120f).pad(5);
|
||||
float isize = 14f*4;
|
||||
|
||||
@@ -114,12 +109,6 @@ public class PausedDialog extends FloatingDialog{
|
||||
});
|
||||
}).text("Quit").padTop(4f);
|
||||
|
||||
for(Element e : content().getChildren()){
|
||||
if(e instanceof ImageButton){
|
||||
group.add((ImageButton)e);
|
||||
}
|
||||
}
|
||||
|
||||
build.end();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,6 @@ public class ChatFragment extends Table implements Fragment{
|
||||
|
||||
setVisible(() -> !state.is(State.menu) && Net.active());
|
||||
|
||||
//TODO put it in input?
|
||||
update(() -> {
|
||||
if(!Net.active() && chatOpen){
|
||||
hide();
|
||||
|
||||
@@ -67,9 +67,9 @@ public class DebugFragment implements Fragment {
|
||||
row();
|
||||
new button("death", () -> player.damage(99999, false));
|
||||
row();
|
||||
new button("spawn1", () -> new BaseUnit(UnitTypes.vtol, Team.red).set(player.x, player.y).add());
|
||||
new button("spawnf", () -> new BaseUnit(UnitTypes.drone, player.team).set(player.x, player.y).add());
|
||||
row();
|
||||
new button("spawn2", () -> new BaseUnit(UnitTypes.scout, Team.red).set(player.x, player.y).add());
|
||||
new button("spawng", () -> new BaseUnit(UnitTypes.scout, player.team).set(player.x, player.y).add());
|
||||
row();
|
||||
}}.end();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user