public BTD6Menu(WindowInteractions winInteractions) { _winInteractions = winInteractions; _btd6GamePlayer = new BTD6GamePlayer(winInteractions); LoadScripts(_scriptLoader); _moneyReader = new MoneyReader(1920, 1080); }
public ParsedScript(BTD6GamePlayer player, string file) { _player = player; var lines = File.ReadAllLines(file); _name = lines[0]; var resolution = lines[1].Split(' '); _resolution = new Size(int.Parse(resolution[0]), int.Parse(resolution[1])); _moneyReader = new MoneyReader(_resolution.Width, _resolution.Height); _actions = lines.Skip(1); PrepareKeyWordDictionary(); }
public IEnumerable <ScriptedGame> LoadScripts(BTD6GamePlayer btd6GamePlayer, string fileExtension) { foreach (var path in SCRIPT_PATHS) { if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } var files = Directory.EnumerateFiles(path, "*" + fileExtension, SearchOption.TopDirectoryOnly); foreach (var strategyFile in files) { yield return(new ParsedScript(btd6GamePlayer, strategyFile)); } } }
public MuddyPuddlesEasy(BTD6GamePlayer player) { _player = player; }