Esempio n. 1
0
    // functions

    public int AddPlaceData(TargetPlaceType type)
    {
        int id = PlaceIdBase + placeIdCounter;

        if (type == TargetPlaceType.City)
        {
            CityData city = new CityData(id, type);
            _placesDicById[id] = city;
        }

        placeIdCounter++;
        return(id);
    }
 // constructor
 public CityData(int id, TargetPlaceType type)
 {
     this.id   = id;
     this.type = type;
     isActive  = true;
 }