Esempio n. 1
0
        private void Bar_KeyDown(object sender, KeyEventArgs e)
        {
            Movement movem = new Movement(32, mainChar);
            movem.moveChar(e);
            e.Handled = true;
            if (Canvas.GetTop(mainChar) == 270 + 32 && Canvas.GetLeft(mainChar) == 170)
            {
                City tCity = new City(500 + 4*32, 300 +6*32);
                ScreenManager.SetScreen(tCity);
                tCity.Focus();

            }
        }
Esempio n. 2
0
        private void city_KeyDown(object sender, KeyEventArgs e)
        {
            Movement move = new Movement(step, mainChar);
            move.moveChar(e);
            e.Handled = true;
            if (Canvas.GetTop(mainChar) == 300 - 2*step && Canvas.GetLeft(mainChar) == 500 - 4*step)
            {
                Tavern tTavern = new Tavern();
                ScreenManager.SetScreen(tTavern);
                tTavern.Focus();

            }
            else if (Canvas.GetTop(mainChar) == 300 + 5*step && Canvas.GetLeft(mainChar) == 500 + 4*step)
            {
                Shop tBar = new Shop();
                ScreenManager.SetScreen(tBar);
                tBar.Focus();
            }
        }