public StateWait(ControllGameMap controller, DataManager data, MessageManager manageMessage, ViewGameMap view) { this.controller = controller; this.data = data; this.manageMessage = manageMessage; this.view = view; typeMessage = ""; messageData = ""; }
public StateAttack(ControllGameMap controller, DataManager data, MessageManager manageMessage, ViewGameMap view) { this.controller = controller; this.data = data; this.view = view; this.manageMessage = manageMessage; nextPhaseLoad = this; firstLand = ""; secondLand = ""; nTanks = -1; controller.resetMemoryBuffer(); view.updatePhase(data.getPlayer(), data.getPhase()); view.changeCanvasOption("Attack phase"); view.updateTwoSelected("", ""); Debug.Log("Data phase: " + data.getPhase() + " - State : Attack"); }
public StateDeploy(ControllGameMap controller, DataManager data, MessageManager manageMessage, ViewGameMap view) { this.controller = controller; this.data = data; this.manageMessage = manageMessage; this.view = view; land = null; nTanks = -1; controller.resetMemoryBuffer(); data.giveTanks(); view.updatePhase(data.getPlayer(), data.getPhase()); view.updateDeploySelected("Selecet a state !!!"); view.changeCanvasOption("Deployment phase"); view.updateTanksRemain(data.getPlayerTanksReinforcement(data.getPlayer())); Debug.Log("Data phase: " + data.getPhase() + " - State : Deploy"); }
public StateDefend(ControllGameMap controller, DataManager data, MessageManager manageMessage, ViewGameMap view) { this.controller = controller; this.data = data; this.manageMessage = manageMessage; this.view = view; firstLand = null; secondLand = null; nextPhaseLoad = this; nTanksAttacker = -1; nTanksDefender = -1; view.changeCanvasOption("Defend phase"); view.updatePhase(data.getPlayer(), data.getPhase()); view.updateTanksRemain(data.getTankOfLand(controller.getSecondLand())); Debug.Log("Data phase: " + data.getPhase() + " - State : Defense Deploy"); }
public StateStartDeploy(ControllGameMap controller, DataManager data, MessageManager manageMessage, ViewGameMap view) { this.controller = controller; this.data = data; this.view = view; this.manageMessage = manageMessage; nextPhaseLoad = this; land = null; nTanks = -1; if (data.getPlayerTanksReinforcement(data.getPlayer()) < MAX_TANKS_PER_TIME) { nTanksRemain = data.getPlayerTanksReinforcement(data.getPlayer()); } else { nTanksRemain = MAX_TANKS_PER_TIME; } view.updatePhase(data.getPlayer(), data.getPhase()); view.changeCanvasOption("Initial Deploy phase"); view.updateTanksRemain(nTanksRemain); view.updateDeploySelected("Select a state !!!"); Debug.Log("Data phase: " + data.getPhase() + " - State : Intial Deploy"); }