예제 #1
0
    private void OnBuildingCellPrefabClicked(Cell buildingPrefab)
    {
        SelectedBuildingPrefab.Type         = buildingPrefab.Type;
        SelectedBuildingPrefab.Image.sprite = ArtCollection.GetSpriteForCellType(SelectedBuildingPrefab.Type);

        SetTypeTooltip(buildingPrefab.Type);
    }
예제 #2
0
    public void RefreshBoardArt()
    {
        foreach (List <Cell> cellRow in Cells)
        {
            foreach (Cell cell in cellRow)
            {
                if (cell.Type == CellType.RoadHor || cell.Type == CellType.RoadVer || cell.Type == CellType.RoadCross)
                {
                    TryFixRoad(cell);
                }

                Sprite art = _artMapping.GetSpriteForCellType(cell.Type);
                cell.Image.sprite = art;
            }
        }
    }