Beispiel #1
0
        public static NaturalResourceCellBase ConvertResourceCell(int id)
        {
            var cells = Singleton <NaturalResourceManager> .instance.m_naturalResources;
            NaturalResourceCellBase _base = default;

            _base.ore       = cells[id].m_ore;
            _base.oil       = cells[id].m_oil;
            _base.forest    = cells[id].m_forest;
            _base.fertility = cells[id].m_fertility;
            _base.pollution = cells[id].m_pollution;
            _base.water     = cells[id].m_water;
            return(_base);
        }
Beispiel #2
0
        public static object GetNaturalResourceCells(object msg)
        {
            var cells  = Singleton <NaturalResourceManager> .instance.m_naturalResources;
            var mapped = new NaturalResourceCellBase[cells.Length];

            for (int i = 0; i < cells.Length; i++)
            {
                mapped[i] = ManagersLogic.ConvertResourceCell(i);

                /*mapped[i].ore = cells[i].m_ore;
                 * mapped[i].oil = cells[i].m_oil;
                 * mapped[i].forest = cells[i].m_forest;
                 * mapped[i].fertility = cells[i].m_fertility;
                 * mapped[i].pollution = cells[i].m_pollution;
                 * mapped[i].water = cells[i].m_water;*/
            }
            return(mapped);
        }
 public CellWrapper(NaturalResourceCellBase _base)
 {
     this._base = _base;
 }