private void InitDraw1() { IView viewScript = InstantiateView <DrawView>("DrawCard/Prefabs/DrawView"); _control = new DrawController(); _control.DrawView = (DrawView)viewScript; _control.Start(); RegisterController(_control); }
private void Form1_Load(object sender, EventArgs e) { ActiveControl = label1; GetAllControls(this, AllControls); AllControls.Reverse(); List <Timer> tempTimers = new List <Timer>() { TimeController, AnimationController, DrawController, EngineController }; Finder.SetTimers(tempTimers); Finder.SetAllControls(AllControls); ScoreInterface.Instance.GetType(); Games = new List <Game>(); Games.Add(new LoLGame((MetroPanel)Finder.FindElementWithTag("WoWPanel1"))); Games.Add(new LoLGame((MetroPanel)Finder.FindElementWithTag("WoWPanel2"))); Games.Add(new JumperGame((MetroPanel)Finder.FindElementWithTag("JumperPanel1"))); Games.Add(new JumperGame((MetroPanel)Finder.FindElementWithTag("JumperPanel2"))); GameManager.Instance.SetGames(Games); AnimationController.Start(); DrawController.Start(); foreach (Control c in AllControls) { if (c is MetroTile) { c.Click += ChangeFocus; } } metroToggle1.Checked = true; metroComboBox1.SelectedIndex = 0; }