Jump to content
  • Advertisement
Sign in to follow this  
phil67rpg

pool game and c#

This topic is 4129 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am programming a simple pool game I am trying to animate the cue ball but I need some help, here is some code, if you need more info please ask private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { this.BackColor=Color.Black; Graphics g=e.Graphics; SolidBrush greenBrush=new SolidBrush(Color.Green); SolidBrush redBrush= new SolidBrush(Color.Red); Pen brownPen = new Pen (Color.Brown,20); Rectangle rect=new Rectangle(225,10,300,550); g.DrawRectangle(brownPen,rect); g.FillRectangle(greenBrush,rect); g.FillEllipse(Brushes.Red,400,50,20,20); g.FillEllipse(Brushes.Blue,380,50,20,20); g.FillEllipse(Brushes.Pink,360,50,20,20); g.FillEllipse(Brushes.Orange,340,50,20,20); g.FillEllipse(Brushes.Plum,390,70,20,20); g.FillEllipse(Brushes.Black,370,70,20,20); g.FillEllipse(Brushes.Purple,350,70,20,20); g.FillEllipse(Brushes.MistyRose,380,90,20,20); g.FillEllipse(Brushes.LightYellow,360,90,20,20); g.FillEllipse(Brushes.SkyBlue,370,110,20,20); for (int i=500;i>=130;i--) { g.FillEllipse(Brushes.White,370,i,20,20); } }

Share this post


Link to post
Share on other sites
Advertisement
What specifically are you having troubles with? Is the cue not animating correctly? Is it's motion on the screen incorrect? Is the program simply not compiling? Try to be as specific as possible - it will encourage the knowledgeable folks to answer your question in an expedient manner.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!