Example #1
0
        // Constructor
        public Pacman()
        {
            InitializeComponent();

            DependencyInjectionHelper.Init(((MainWindow)Application.Current.MainWindow));
            DependencyInjectionHelper.getGameComponent().inject(this);


            upStartFrame = 6;
            upEndFrame   = 7;

            downStartFrame = 2;
            downEndFrame   = 3;

            leftStartFrame = 4;
            leftEndFrame   = 5;

            rightStartFrame = 0;
            rightEndFrame   = 1;

            defaultStartFrame = 0;
            defaultEndFrame   = 0;

            speed   = 2;
            offsetX = 0;
            offsetY = 0;
        }
Example #2
0
        private BoardLocation[,] bl;  // Locations on the board - used to contain dots, etc.

        public GameBoard()
        {
            InitializeComponent();

            DependencyInjectionHelper.Init(((MainWindow)Application.Current.MainWindow));
            DependencyInjectionHelper.getGameComponent().inject(this);

            this.Focusable = true;

            bl = new BoardLocation[13, 27];

            ResetBoardLocations();
            PM.StartTimer();
        }