Create a countdown

Create a countdown

Lectures

Implementation | Create a countdown | How listeners work

How to create and make it accesable

after you implemented the CountdownAPI you can start creating countdowns.

Creation:

Countdown cd = new Countdown("some_name", 10, <? extends CountdownPlugin>);

if you want you can add it to the CountdownManager by using:

CountdownManager.addCountdown(countdown);

this allows you to acccess it everywhere by using:

CountdownManager.getCountdown("name_of_the_countdown", <? extends CountdownPlugin>);

Control countdowns

After you have a Countdown Object you can start using it with the CountdownManager. When you are asking yourself, why you can't invoke countdown_var.start();

I want to explain that. It's pretty easy, you have to use the CountdownManager, because it prevents you from performing invalid actions in your code.

You will notice that every method requires a CountdownPlugin object to make sure that you are the owner of the countdown.

To get a overview what methods are avaiable to you. Simply use the Auto-Completion of your IDE.