Example #1
0
 //Fonction de débug. Passe la couleur de toute les cases d'un type en jaune
 public void HighlightTypeOfCell(cellTypeInitialisation.cellType type)
 {
     ResetTiles();
     temporaryListOfCells = new List <CellData>();
     temporaryListOfCells = GetAllCellFromType(type);
     foreach (CellData item in temporaryListOfCells)
     {
         item.ShowTile("");
     }
 }
Example #2
0
 public Carte(CellData _cell, int _id)
 {
     cardCell      = _cell;
     cardType      = cardCell.cellType;
     cardName      = cardType.ToString() + " " + cardCell.gameObject.transform.parent.name;
     cardId        = _id;
     front         = cardCell.assignedSprite;
     cardDirection = (directionFromChest)cardId;
     back          = Resources.Load <Sprite>("sprite/directions/" + cardDirection.ToString());
     cardRenderer  = Resources.Load <GameObject>("sprite/carte");
     currentFace   = visibleFace.back;
 }
Example #3
0
    // Retourne une liste de toute les cases d'un type
    public List <CellData> GetAllCellFromType(cellTypeInitialisation.cellType typeToCheck)
    {
        List <CellData> listOfAllObjects = new List <CellData>();

        foreach (CellData item in allCell)
        {
            if (item.cellType == typeToCheck)
            {
                listOfAllObjects.Add(item);
            }
        }
        return(listOfAllObjects);
    }