void Start() { _towerExist = false; _confirmed = false; _towerIndex = -1; _clearBeforeBattle = false; _currentTowerType = -1; _levelManager = GameManager.Instance.CurrentLevelManager; _gameBoard = _levelManager.GameBoardSystem; _towerController = TowerController.Instance; _towerBuildPanel = TowerBuildPanel.Instance; _towerOperationPanel = TowerOperationPanel.Instance; _towerInfoPanel = TowerInfoPanel.Instance; _buildCheckPanel = BuildCheckPanel.Instance; _notificationPanel = NotificationPanel.Instance; _tankTowerButton = TankTowerButton.Instance; _rangeTowerButton = RangeTowerButton.Instance; _slowTowerButton = SlowTowerButton.Instance; _healTowerButton = HealTowerButton.Instance; _goldTowerButton = GoldTowerButton.Instance; _upgradeButton = UpgradeButton.Instance; _repairButton = RepairButton.Instance; _sellButton = SellButton.Instance; _yesButton = BCP_Yes.Instance; TowerOperation = Operation.Nop; }
void Awake() { myTransform = transform; Instance = this; windowPanel = myTransform.Find("Window"); warTexture = windowPanel.Find("Warmap").Find("WarTexture").GetComponent <UITexture>(); followersPanel = windowPanel.Find("Followers"); Close(); }
void Start() { _gameBoard = GameManager.Instance.CurrentLevelManager.GameBoardSystem; _buildCheckPanel = BuildCheckPanel.Instance; _towerInfoPanel = TowerInfoPanel.Instance; _notificationPanel = NotificationPanel.Instance; _towerBuildPanel = TowerBuildPanel.Instance; _towerOperationPanel = TowerOperationPanel.Instance; }
public void setTowerEventHandler(TileEventHandler teh) { _tileEventHandler = teh; //Debug.Log("SB: setTowerEventHandler called, position" + _tileEventHandler.GridX + " " + _tileEventHandler.GridY); if (null == _buildCheckPanel) { _buildCheckPanel = BuildCheckPanel.Instance; _towerInfoPanel = TowerInfoPanel.Instance; _notificationPanel = NotificationPanel.Instance; } }
public void setTowerEventHandler(TileEventHandler teh) { _enoughGold = true; _destroy = false; if (null == _tileEventHandler) { _buildCheckPanel = BuildCheckPanel.Instance; _towerInfoPanel = TowerInfoPanel.Instance; _notificationPanel = NotificationPanel.Instance; } _tileEventHandler = teh; }
public void setTowerEventHandler(TileEventHandler teh) { _tileEventHandler = teh; if (null == _gameBoard) { _towerController = TowerController.Instance; // used for check range _gameBoard = GameManager.Instance.CurrentLevelManager.GameBoardSystem; // used for highlight _buildCheckPanel = BuildCheckPanel.Instance; // used for set appear _towerInfoPanel = TowerInfoPanel.Instance; // used for set appear _notificationPanel = NotificationPanel.Instance; // used for notification, set appear } }
// set current selected TileEventHandler public void setTileEventHandler(TileEventHandler teh) { _upgradeCase = false; _tileEventHandler = teh; if (null == _gameBoard) { _levelManager = GameManager.Instance.CurrentLevelManager; _gameBoard = _levelManager.GameBoardSystem; _towerBuildPanel = TowerBuildPanel.Instance; _buildCheckPanel = BuildCheckPanel.Instance; _towerInfoPanel = TowerInfoPanel.Instance; _towerOperationPanel = TowerOperationPanel.Instance; _notificationPanel = NotificationPanel.Instance; } }
public void OperationDenied() { if (null == _gameBoard) { _gameBoard = GameManager.Instance.CurrentLevelManager.GameBoardSystem; _towerBuildPanel = TowerBuildPanel.Instance; _buildCheckPanel = BuildCheckPanel.Instance; _towerInfoPanel = TowerInfoPanel.Instance; _towerOperationPanel = TowerOperationPanel.Instance; _notificationPanel = NotificationPanel.Instance; } _towerBuildPanel.DisAppear(); _buildCheckPanel.DisAppear(); _towerInfoPanel.DisAppear(); _towerOperationPanel.DisAppear(); _notificationPanel.DisAppear(); _gameBoard.ClearHighlightTiles(); }
void Awake() { Instance = this; }