Ejemplo n.º 1
0
        private void WindowKeyDown(object sender, KeyEventArgs e)
        {
            map = new Map();
            map.MapDrawer(foxDraw);


            if (e.Key == Key.Left)
            {
                hero.WalkLeft(foxDraw);
            }

            if (e.Key == Key.Right)
            {
                hero.WalkRight(foxDraw);
            }

            if (e.Key == Key.Up)
            {
                hero.WalkUp(foxDraw);
            }

            if (e.Key == Key.Down)
            {
                hero.WalkDown(foxDraw);
            }
        }