Conditional branch C#

I want to make a program that when an object reaches a certain point, the next point moves. I think it will be a whack-a-mole kind of program.
Has anyone ever made such a program?
I would like to know any reference material you can give me.

thank you

Gonna need more info than that.

It look like this.
I want the program to make this moving bar start moving again the next point when it returns to zero value.

For example, I want to prepare a list of start points in a list reproduce this kind of movement.