Ejemplo n.º 1
0
    public void unMarkFood(Food_Marked _food)
    {
        //markedFoods.Find(_food);
        markedFoods.Remove(_food);
        Debug.Log("UNMARKED " + _food.name);
        Destroy(_food.gameObject);

        /*foreach (Food_Marked mFood in markedFoods)
         * {
         *  if(mFood == _food)
         *  {
         *      markedFoods.Remove(_food);
         *  }
         * }*/
    }
Ejemplo n.º 2
0
    /*public void changeColonySize(int _changeAmount)
     * {
     *  colonySize += _changeAmount;
     *  growColony();
     * }*/

    public void addMarkedFood(Food_Marked _markedFood)
    {
        //Debug.Log(_markedFood + "markedFood");

        //markedFood[(markedFood.Length)+1] = _markedFood;
        markedFoods.Add(_markedFood);

        //bool alreadyAdded = false;
        //Debug.Log(_markedFood + "markedFood");

        /*for (int i = 0; i < markedFoods.Count; i++)
         * {
         *  if (markedFoods[i].gameObject.name == _markedFood.name)
         *  {
         *      alreadyAdded = true;
         *  }
         * }
         *
         * if (alreadyAdded != true)
         * {
         *  markedFoods.Add(_markedFood);
         * }
         * //add _markedFood to markedFood*/
    }