Esempio n. 1
0
        private void GameCanvas_Draw(CanvasControl sender, CanvasDrawEventArgs args)
        {
            Gsm.GSM();
            //Player pieces intitialized
            Piece1 greenPiece1 = new Piece1(155, 35, "green", PieceImage, true);

            args.DrawingSession.DrawImage(Scaling.Img(BG));

            if (gameState == 1)
            {
                args.DrawingSession.DrawImage(Scaling.Img(greenPiece1.Image(PieceImage)), (greenPiece1.PieceX * scaleWidth) - (30 * scaleWidth), (greenPiece1.PieceY * scaleHeight) - (30 * scaleHeight));
            }

            GameCanvas.Invalidate();
        }
Esempio n. 2
0
 private void Current_SizeChanged(object sender, WindowSizeChangedEventArgs e)
 {
     bounds = ApplicationView.GetForCurrentView().VisibleBounds;
     Scaling.SetScale();
 }
Esempio n. 3
0
 public MainPage()
 {
     this.InitializeComponent();
     Window.Current.SizeChanged += Current_SizeChanged;
     Scaling.SetScale();
 }