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

com.almasb.fxgl.entity.action.InstantAction Maven / Gradle / Ivy

There is a newer version: 21.1
Show newest version
/*
 * FXGL - JavaFX Game Library. The MIT License (MIT).
 * Copyright (c) AlmasB ([email protected]).
 * See LICENSE for details.
 */

package com.almasb.fxgl.entity.action;

/**
 * Instant action is always complete after performed once.
 *
 * @author Almas Baimagambetov ([email protected])
 */
public abstract class InstantAction extends Action {

    @Override
    protected final void onUpdate(double tpf) {
        performOnce(tpf);
        setComplete();
    }

    protected abstract void performOnce(double tpf);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy