Zone objective abstraction, cleanup
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user