public void createNewUnitAndRegister(Player owner, clsUnitType newUnitType, Sektor targetSektor) { clsUnit newUnit = new clsUnit(newUnitType); newUnit.strOwnerID = owner.Id; owner.ListUnits.Add(newUnit); targetSektor.addUnit(newUnit); this.onTick += new delTick(newUnit.CampaignController_onTick); }
public clsUnit addUnit(Player owner, clsUnit newUnit, Sektor sektor) { newUnit.strOwnerID = owner.Id; owner.ListUnits.Add(newUnit); sektor.addUnit(newUnit); return newUnit; }