public override void SetSettings(taw.game.basicInterfaces.ISettingable obj) { if (!(obj is BasicUnit unit)) { throw new ApplicationException("Wrong unit in BasicUnitSettings.SetSettings"); } base.SetSettings(obj); unit.tickPerTurn = 10; }
public override void SetSettings(taw.game.basicInterfaces.ISettingable obj) { if (!(obj is BasicCity city)) { throw new ApplicationException("Wrong city in BasicCitySettings.SetSettings"); } base.SetSettings(obj); city.maxWarriors = 20; city.currWarriors = 10; city.sendPersent = 0.5f; city.atkPersent = 1.0f; city.defPersent = 1.0f; city.ticksPerIncome = 50; city.saveOvercapedUnits = true; city.removeOvercapedUnits = true; city.equalsMeanCapturedForNeutral = true; city.equalsMeanCaptured = false; }
public override void SetSettings(taw.game.basicInterfaces.ISettingable obj) { }
/// <summary> /// Заповнює всі поля обєкту вказаними значеннями. /// /// </summary> /// <example> /// public override void SetSettings(game.basicInterfaces.Settingable obj) { /// BasicUnit unit = obj as BasicUnit; /// if (unit == null) /// throw new ApplicationException("Wrong unit in BasicUnitSettings.SetSettings"); /// /// base.SetSettings(obj); /// /// unit.tickPerTurn = 10; /// } /// /// </example> /// <param name="obj">Відповідний обєкту SettinsSetter, обєкт Settingable </param> abstract public void SetSettings(taw.game.basicInterfaces.ISettingable obj);