void CreateFoods()
        {
            _gridElements = new Dictionary <Vector2, FoodController>();
            _bread        = new List <FoodController>();
            _foods        = new List <FoodController>();

            if (_levelCount < FakeMapConfig.mapCOnfig.Length)
            {
                IMapConfig mC = FakeMapConfig.mapCOnfig[_levelCount];

                for (int i = 0; i < mC.foodConfigs.Length; i++)
                {
                    GameObject food          = Resources.Load <GameObject>("Prefabs/Food");
                    GameObject currentEntity = Instantiate(food, new Vector3(0, 0, 0), Quaternion.identity);
                    currentEntity.GetComponent <FoodController>().ChangeFoodType(mC.foodConfigs[i].name, mC.foodConfigs[i].startMatrix, mC.row, mC.coloumn);
                    FoodController fC = currentEntity.GetComponent <FoodController>();
                    fC.StartMatrix = mC.foodConfigs[i].startMatrix;
                    _gridElements[mC.foodConfigs[i].startMatrix] = fC;
                    if (fC.food.foodName == Food.FoodNames.Bread)
                    {
                        _bread.Add(fC);
                    }
                    _foods.Add(fC);
                }
                _levelCount++;
            }
            else
            {
                BlockElements(true);
                BlockUI(false);
                Managers.EventManager.TriggerEvent(Managers.EventManager.Listener.GameOver.ToString());
                Managers.EventManager.TriggerEvent(Managers.EventManager.Listener.SendMessage.ToString(), UIController.Information.LevelsFinished);
            }
        }
示例#2
0
 public MapMedia(
     IMapTable table,
     IMapDeserializer deserializer,
     IMapperOptions options,
     IMapConfig config)
 {
     this._table        = table;
     this._deserializer = deserializer;
     this._options      = options;
     this._config       = config;
 }
示例#3
0
 public Mapper(
     IMapperOptions options,
     IMapSerializer serializer,
     IMapDeserializer deserializer,
     IMapConfig config)
 {
     this._options      = options;
     this._serializer   = serializer;
     this._deserializer = deserializer;
     this._config       = config;
 }
示例#4
0
 public Map(IMapConfig config)
 {
     Console.WriteLine("Test map " + GetHashCode());
 }
示例#5
0
		public Map(IMapConfig config)
		{
			Console.WriteLine("Test map " + GetHashCode());
		}