private void paint_form1(object sender, PaintEventArgs e) { g = e.Graphics; var _bazooka = new BAZOOKA("mainGun", bazooka, worm); var _map = new Map(); drawer = new Drawer(g, _worm, _bazooka); _map.FillMap(); drawer.DrawMap(); drawer.DrawWorm(moveX, moveY); drawer.CalculateAngle(PointToClient(Cursor.Position), moveX); IsBazookaFlipped = drawer.DrawBazooka(g, moveX, ref IsBazookaFlipped); if (!IsWormRotate) { _worm.WormImage.RotateFlip(RotateFlipType.RotateNoneFlipX); IsWormRotate = true; } }
public Drawer(Graphics g, Worm worm, BAZOOKA bazooka) { this.worm = worm; this.bazooka = bazooka; this.g = g; }