|
|
@@ -6,20 +6,25 @@ import model.tiles.InteractiveTileModel;
|
|
|
import util.Translator;
|
|
|
import view.popUpMenu.PopupMenu;
|
|
|
import view.popUpMenu.UpgradeMenu;
|
|
|
+import view.tile.interactive.IronMineView;
|
|
|
import view.tile.interactive.LighthouseView;
|
|
|
|
|
|
public class LighthouseController extends InteractiveTileController {
|
|
|
-
|
|
|
+ GameController gc;
|
|
|
public LighthouseController(GameController gc, InteractiveTileModel model) {
|
|
|
super(model, null, gc);
|
|
|
- setView(new LighthouseView(2, 2, gc, this));
|
|
|
+ setView(new LighthouseView(2, 2, gc, this, 1));
|
|
|
PopupMenu popup = new UpgradeMenu(100, 110, Translator.translate("popup.title.lighthouse"), this);
|
|
|
setPopupOnClick(popup);
|
|
|
+ this.gc = gc;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void upgrade() {
|
|
|
-
|
|
|
+ int level = getModel().getLevel();
|
|
|
+ setView(new LighthouseView(2, 2,gc, this, level + 1));
|
|
|
+ PopupMenu popup = new UpgradeMenu(100, 100, Translator.translate("popup.title.lighthouse"), this);
|
|
|
+ setPopupOnClick(popup);
|
|
|
}
|
|
|
|
|
|
@Override
|