All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.badlogic.gdx.scenes.scene2d.actions.CountdownEventAction Maven / Gradle / Ivy

There is a newer version: 1.12.1
Show newest version

package com.badlogic.gdx.scenes.scene2d.actions;

import com.badlogic.gdx.scenes.scene2d.Event;

/** An EventAction that is complete once it receives X number of events.
 * @author JavadocMD
 * @author Nathan Sweet */
public class CountdownEventAction extends EventAction {
	int count, current;

	public CountdownEventAction (Class eventClass, int count) {
		super(eventClass);
		this.count = count;
	}

	public boolean handle (T event) {
		current++;
		return current >= count;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy