Tag Info

New answers tagged

1

Rather than move your enemy every 500ms you should define how far an enemy should move in 1 second. For example, say an enemy can move 3 distance units every second. If you know the time between the last frame in milliseconds you can simply do this: (pseudo code) enemy_units_per_second = 3.0; delta_time_ms = get_elapsed_time_ms(); enemy_movement_distance = ...


0

You can add System.Windows.Forms.Timer to your Form add a label and manage the timer tick event like this private void timer1_Tick(object sender, EventArgs e) { //tt is declared and intialized in form load tt = tt + timer1.Interval ; label1.Text = "Time: " + (tt).ToString(); } finaly to start ...



Top 50 recent answers are included