public void Init(EnergyCounter energyCounter, IExclusiveStateManagerData <ISelectionInteractor> turretShop, BasicExclusiveStateManager <ITileSelectionInteractor> tileSelectionManager, ExclusiveSubsectionFocusManager focusManager) { this.energyCounter = energyCounter; this.turretShop = turretShop; this.tileSelectionManager = tileSelectionManager; }
public void Init(int mrow, int mcol, int mheight, int mwidth, Grid mgrid, EnergyCounter mEnergyCounter) { col = mcol; row = mrow; width = mwidth; height = mheight; grid = mgrid; energyCounter = mEnergyCounter; // Center the Space in the middle of all of the Tiles it occupies. Vector3 tilePosTopLeft = grid.GetTilePosition(row, col); Vector3 tilePosBottomRight = grid.GetTilePosition(row + height - 1, col + width - 1); Vector3 averagePos = (tilePosTopLeft + tilePosBottomRight) * 0.5f; transform.localPosition = averagePos; // Scale the space as well. transform.localScale = new Vector3(width, height, 1.0f); }