示例#1
0
        public void ShootLaser(LaserCollection lasers)
        {
            int   laserX = X + Width / 2;
            int   laserY = Y - Height;
            Laser laser  = new Laser(laserX, laserY, lasers);

            laser.DisplayOn(canvas);
        }
示例#2
0
        private void gameCanvas_MouseUp(object sender, MouseButtonEventArgs e)
        {
            int   x     = user.X + user.Width / 2;
            int   y     = user.Y - user.Height;
            Laser laser = new Laser(x, y, lasers);

            laser.DisplayOn(gameCanvas);
        }