private void StartCaptureTheBannerLord() { var p = new CaptureTheBannerLordParams(); try { p.playerSoldierCount = System.Convert.ToInt32(this.PlayerSoldierCount); p.enemySoldierCount = System.Convert.ToInt32(this.EnemySoldierCount); p.distance = System.Convert.ToSingle(this.Distance); p.soldierXInterval = System.Convert.ToSingle(this.SoldierXInterval); p.soldierYInterval = System.Convert.ToSingle(this.SoldierYInterval); p.soldiersPerRow = System.Convert.ToInt32(this.SoldiersPerRow); var posParts = this.FormationPosition.Split(','); var dirParts = this.FormationDirection.Split(','); p.FormationPosition = new Vec2(System.Convert.ToSingle(posParts[0]), System.Convert.ToSingle(posParts[1])); p.formationDirection = (new Vec2(System.Convert.ToSingle(dirParts[0]), System.Convert.ToSingle(dirParts[1]))).Normalized(); p.skyBrightness = System.Convert.ToSingle(this.SkyBrightness); p.rainDensity = System.Convert.ToSingle(this.RainDensity); p.tempVar = System.Convert.ToSingle(this.TempVar); p.playerCharacterId = this.PlayerCharacter.id; p.playerSoldierCharacterId = this.PlayerSoldierCharacter.id; p.enemySoldierCharacterId = this.EnemySoldierCharacter.id; p.useFreeCamera = this.UseFreeCamera; } catch { return; } if (!p.validate()) { return; } lastParams = p; ModuleLogger.Writer.WriteLine("StartCaptureTheBannerLord"); MBGameManager.StartNewGame(new CaptureTheBannerLordGameManager(p)); }
public static CaptureTheBannerLordParams createDefault() { var p = new CaptureTheBannerLordParams(); p.playerSoldierCount = 1; p.enemySoldierCount = 0; // p.playerSoldierCount = 50; // p.enemySoldierCount = 1; p.distance = 1; p.soldierXInterval = 5f; p.soldierYInterval = 1.5f; p.soldiersPerRow = 100; // p.soldiersPerRow = 10; p.FormationPosition = new Vec2(150, 100); p.formationDirection = new Vec2(1, 0); p.skyBrightness = -1; p.rainDensity = 0; p.tempVar = 0.0f; p.playerCharacterId = "mp_light_cavalry_vlandia_hero"; p.playerSoldierCharacterId = "mp_heavy_infantry_vlandia_troop"; p.enemySoldierCharacterId = "mp_heavy_ranged_aserai_troop"; p.useFreeCamera = false; return(p); }
public CaptureTheBannerLordGameManager(CaptureTheBannerLordParams p) : base() { this._params = p; }