Académique Documents
Professionnel Documents
Culture Documents
text
class Pacman{
color s;
float sc;
public Pacman(Color color, float scale){
s=color;
sc=scale;
}
public void DrawPacman(int x, int y, int angle, Graphics g){
SolidBrush b= new SolidBrush(s);
g.TranslateTransform(x,y);
g.ScaleTransform(sc,sc);
//g.RotateTransform(angle);
g.FillPie(b, -50,-50,100,100,angle,360-angle);
g.FillEllipse(Brushes.Black,0,-40,20,30);
g.ResetTransform();
PacMan p=new PacMan(Color.Yellow,2);
p.DrawPacMan(trackBar1.Value,trackbar2.Value,angle,g)