api:documentation:grafik:animation
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
api:documentation:grafik:animation [2021/01/09 23:00] – [Beispiel 4: Feuerwerk] Martin Pabst | api:documentation:grafik:animation [2021/12/29 11:29] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 14: | Zeile 14: | ||
* Die Bewegung des Rechtecks ist sehr weich (ohne Ruckeln), da die '' | * Die Bewegung des Rechtecks ist sehr weich (ohne Ruckeln), da die '' | ||
< | < | ||
- | <div class=" | + | <div class=" |
<script type=" | <script type=" | ||
new World(1000, 1000); | new World(1000, 1000); | ||
Zeile 37: | Zeile 37: | ||
* Das '' | * Das '' | ||
< | < | ||
- | <div class=" | + | <div class=" |
<script type=" | <script type=" | ||
new World(1000, 1000); | new World(1000, 1000); | ||
Zeile 83: | Zeile 83: | ||
< | < | ||
- | <div class=" | + | <div class=" |
<script type=" | <script type=" | ||
new World(800, 1000); | new World(800, 1000); | ||
Zeile 126: | Zeile 126: | ||
{{ youtube> | {{ youtube> | ||
< | < | ||
- | <div class=" | + | <div class=" |
<script type=" | <script type=" | ||
new Feuerwerk(); | new Feuerwerk(); | ||
Zeile 136: | Zeile 136: | ||
int funkenzahl = Math.floor(Math.random() * 50 + 30); | int funkenzahl = Math.floor(Math.random() * 50 + 30); | ||
- | int farbe = Math.floor(Math.random() * 0xffffff); | + | int farbe = Color.randomColor(128); |
| | ||
| | ||
Zeile 143: | Zeile 144: | ||
new Funke(x, y, farbe, lebensdauer); | new Funke(x, y, farbe, lebensdauer); | ||
} | } | ||
- | System.playSound(Sound.cannon_boom); | + | Sound.playSound(Sound.cannon_boom); |
} | } |
api/documentation/grafik/animation.1610229601.txt.gz · Zuletzt geändert: 2021/12/29 11:29 (Externe Bearbeitung)