mirror of
https://github.com/jneug/zeichenmaschine.git
synced 2026-04-14 06:33:34 +02:00
Partikel Beispiel
This commit is contained in:
30
examples/zm_partikel/PartikelBeispiel.java
Normal file
30
examples/zm_partikel/PartikelBeispiel.java
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
import schule.ngb.zm.DrawableLayer;
|
||||||
|
import schule.ngb.zm.Zeichenmaschine;
|
||||||
|
import schule.ngb.zm.partikel.PartikelGenerator;
|
||||||
|
|
||||||
|
public class PartikelBeispiel extends Zeichenmaschine {
|
||||||
|
|
||||||
|
public static void main( String[] args ) {
|
||||||
|
new PartikelBeispiel();
|
||||||
|
}
|
||||||
|
|
||||||
|
public PartikelBeispiel() {
|
||||||
|
super(400, 400, "ZM: Partikel");
|
||||||
|
}
|
||||||
|
|
||||||
|
PartikelGenerator pgen;
|
||||||
|
|
||||||
|
public void setup() {
|
||||||
|
pgen = new PartikelGenerator(200, 200, 3, 20);
|
||||||
|
DrawableLayer drawables = new DrawableLayer();
|
||||||
|
addLayer(drawables);
|
||||||
|
drawables.add(pgen);
|
||||||
|
pgen.starten();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update( double delta ) {
|
||||||
|
pgen.update(delta);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user