Exemplo n.º 1
0
        private void OnPaint(UIElement element, SKCanvas canvas)
        {
            canvas.Clear(BackgroundColor);

            LayoutRecords.Draw();
            Planet.Draw();
            Triangle.Draw(HipsterEngine.Surface.Canvas);


            HipsterEngine.Surface.Canvas.Save();
            HipsterEngine.Surface.Canvas.Translate(Width / 2, Height / 2);
            //  HipsterEngine.Surface.Canvas.RotateRadians(_time);
            //    HipsterEngine.Surface.Canvas.Scale(0.5f, 0.5f);
            //  if (bitmap != null)
            //       HipsterEngine.Surface.Canvas.DrawBitmap(bitmap, -bitmap.Width / 2,-bitmap.Height / 2, paint);
            //HipsterEngine.Surface.Canvas.DrawBitmap(bitmap, SKRect.Create(0, 0, 100, 100), paint);
            HipsterEngine.Surface.Canvas.Restore();

            LabelTouchMe.Draw();

            PaintAnimation = new SKPaint
            {
                Style = SKPaintStyle.Fill,
                Color = new SKColor(0, 0, 0, Convert.ToByte(AnimationEndGame.CurrentValue))
            };
            HipsterEngine.Surface.Canvas.DrawRect(0, 0, Width, Height, PaintAnimation);
        }
Exemplo n.º 2
0
        private void OnUnloaded(Screen screen)
        {
            Update    -= OnUpdate;
            Paint     -= OnPaint;
            MouseDown -= OnMouseDown;
            Unloaded  -= OnUnloaded;

            LayoutRecords.Dispose();
            Planet.Dispose();
            Triangle.Dispose();
            LabelTouchMe.Dispose();
            paint.Dispose();
            AnimationEndGame.Dispose();
            PaintAnimation.Dispose();
        }