TimedAffect.java

codebase/src/net/sourceforge/pain/logic/TimedAffect.java · 990 B

From the archive pain_0_44.tgz

Download the archive   « Back to the archive contents

package net.sourceforge.pain.logic;

import net.sourceforge.pain.data.*;

/**
 * Affects timing (stop time) is automaticaly managed by codebase.
 * <p/>
 * this class is linked statically to Core (could not be reloaded)
 * all it's subclasses in '..logic.affect.*'  package are loaded(linked) dynamycally
 * <p/>
 * Codebase require from all affect controllers (Affect subclasses) to have constructor with (AffectData d) param.
 * this constructor is used for automatically affect controller instantiation and initialization with
 * persistent image
 */
public abstract class TimedAffect extends Affect {

    protected TimedAffect(AffectData ad) {
        super(ad);
    }

    /**
     * this method is automatially called when affect time is expired
     * affect impl could manually delete affect data or it will be deleted automatically
     * if it's stop time was not changed by this method call
     */
    public abstract void onAffectTimeExpired();

}

Site Stats

Snippets: 1791
Codebases: 571