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; }
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(); }
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; }
public MapElementSplitInfo(MapElementInfo info) : base(info.name, info.baseData.Sprite()) { this._info = info; }