public static FightTracker GetFightTracker() { Weebul.Core.Model.Fighter f1 = new Weebul.Core.Model.Fighter() { Stats = new FighterStats(Shared.Locator().Fighter1.SelectedFighter) }; Weebul.Core.Model.Fighter f2 = new Weebul.Core.Model.Fighter() { Stats = new FighterStats(Shared.Locator().Fighter2.SelectedFighter) }; Weebul.Core.Model.FightPlan fp1 = new Weebul.Core.Model.FightPlan() { FightPlanText = Shared.Locator().FightPlanF1.FightPlanText, WeblScript = new Scripting.WeblScript() }; Weebul.Core.Model.FightPlan fp2 = new Weebul.Core.Model.FightPlan() { FightPlanText = Shared.Locator().FightPlanF2.FightPlanText, WeblScript = new Scripting.WeblScript() }; if (!fp1.Validate()) { MessageBox.Show("Fight plan 1 is invalid"); return(null); } if (!fp2.Validate()) { MessageBox.Show("Fight plan 2 is invalid"); return(null); } FightTracker tracker = new FightTracker(f1, f2, fp1, fp2, Shared.Locator().Options.Options); return(tracker); }
public FightTracker(Fighter fighter1, Fighter fighter2, FightPlan fighter1Plan, FightPlan fighter2Plan, FightOptions options) : this() { this.Fighter1 = new FighterFight(fighter1, fighter1Plan); this.Fighter2 = new FighterFight(fighter2, fighter2Plan); this.Options = options; }
public FighterFight(Fighter fighter, FightPlan fp) { this.Fighter = fighter; this.FightPlan = fp; Reset(); }