Exemple #1
0
        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();
        }
Exemple #2
0
 public LabyRenderer(LabyModel model)
 {
     this.model = model;
 }
Exemple #3
0
 public LabyLogic(LabyModel model, string fname)
 {
     this.model = model;
     this.fname = fname;
     InitModel(string.Format(fname, model.Level));
 }