Zone objective abstraction, cleanup

This commit is contained in:
Anuken
2019-10-05 00:21:48 -04:00
parent 1b93da20f4
commit c1ff7812d8
12 changed files with 182 additions and 97 deletions
@@ -0,0 +1,12 @@
package io.anuke.mindustry.game;
/** Defines a specific objective for a game. */
public interface Objective{
/** @return whether this objective is met. */
boolean complete();
/** @return the string displayed when this objective is completed, in imperative form.
* e.g. when the objective is 'complete 10 waves', this would display "complete 10 waves".*/
String display();
}
@@ -0,0 +1,38 @@
package io.anuke.mindustry.game;
/** Holds objective classes. */
public class Objectives{
public static class WaveObjective implements Objective{
public int wave;
public WaveObjective(int wave){
this.wave = wave;
}
protected WaveObjective(){}
@Override
public boolean complete(){
return false;
}
@Override
public String display(){
return null;
}
}
public static class LaunchObjective implements Objective{
@Override
public boolean complete(){
return false;
}
@Override
public String display(){
return null;
}
}
}