Thanks! This has all been very helpful.
So now I'm trying to do it OOP style, with a Class for the Ball.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication8
{
public partial class Form1 : Form
{
private bool direction;
class Ball
{
public int xCoord;
public int yCoord;
public int xVelocity;
public int yVelocity;
}
public void Form1()
{
InitializeComponent();
}
public void Form1_Load(object sender, EventArgs e)
{
direction = false;
Ball gameBall = new Ball();
}
public void button1_Click(object sender, EventArgs e)
{
//toggle ball movement on/off
if (timer1.Enabled == true)
timer1.Enabled = false;
else timer1.Enabled = true;
}
public void timer1_Tick(object sender, EventArgs e)
{
}
}
}
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.