Example #1
0
        public void UnitInit(MapElementInfo mei, string type, int town, int player, CalculatedData calc)
        {
            this.type = type;
            DataUnit u = L.b.units[type];

            BaseInit(mei, u, calc);
            townId   = town;
            playerId = player;
        }
Example #2
0
        public void BuildingInit(MapElementInfo mei, string type, int town, CalculatedData calc)
        {
            this.type = type;
            DataBuilding b = L.b.buildings[type];

            BaseInit(mei, b, calc);
            townId = town;
            BuildingUpdate();
        }
Example #3
0
 private void BaseInit(MapElementInfo mei, BaseDataBuildingUnit d, CalculatedData calc)
 {
     action              = new ActionHolders(d.action);
     sprite              = d.Icon;
     name                = d.Name();
     hp                  = calc.hp;
     hpMax               = calc.hp;
     ap                  = calc.ap;
     apMax               = calc.ap;
     atk                 = d.atk;
     def                 = d.def;
     visibilityRange     = d.visibilityRange;
     data                = new Dictionary <string, string>();
     items               = new Dictionary <string, string>();
     modi                = new Dictionary <string, string>();
     spells              = new MapElementSpells();
     info                = new MapElementInfoInfoMgmt();
     info.mapElementInfo = mei;
 }
Example #4
0
 public MapElementSplitInfo(MapElementInfo info) : base(info.name, info.baseData.Sprite())
 {
     this._info = info;
 }