Пример #1
0
 public void ImportData(HexMapData data)
 {
     _columns = data.Columns;
     _rows    = data.Rows;
     _listHexModel.Clear();
     foreach (var hexData in data.ListHexData)
     {
         HexModel hexModelTmp = new HexModel();
         hexModelTmp.ImportData(hexData);
         _listHexModel.Add(hexModelTmp);
     }
 }
Пример #2
0
        private void SelectHexMessageFunction(SelectHexMessage msg)
        {
            HexModel nextSelectedHexModel     = GetHexModel(msg.Column, msg.Row);
            HexModel previousSelectedHexModel = ListHexModel.FirstOrDefault(x => x.Selected);

            if (previousSelectedHexModel != null)
            {
                previousSelectedHexModel.UnselectHex();
                if (previousSelectedHexModel != nextSelectedHexModel)
                {
                    nextSelectedHexModel.SelectHex();
                }
            }
            else
            {
                nextSelectedHexModel.SelectHex();
            }
        }
Пример #3
0
        public void UpdateHexModel(int column, int row, TileColorModel tileColorModel, TileImageModel tileImageModel)
        {
            HexModel hexModel = GetHexModel(column, row);

            hexModel.UpdateColorImageModels(tileColorModel, tileImageModel);
        }