private void LabyControl_Loaded(object sender, RoutedEventArgs e) { stw = new Stopwatch(); model = new LabyModel(ActualWidth, ActualHeight); logic = new LabyLogic(model, "LabyMaze.Levels.L0{0}.lvl"); renderer = new LabyRenderer(model); Window win = Window.GetWindow(this); if (win != null) { win.KeyDown += Win_KeyDown; } InvalidateVisual(); stw.Start(); }
public LabyRenderer(LabyModel model) { this.model = model; }
public LabyLogic(LabyModel model, string fname) { this.model = model; this.fname = fname; InitModel(string.Format(fname, model.Level)); }