diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-02-10 18:32:04 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-02-10 18:32:04 -0500 |
commit | 41ce65d9ae3e75cd374b6f5f99486ee057194a06 (patch) | |
tree | af1ba68caa97a80b19271e4668ba4f423114add6 /src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java | |
parent | 7fbf2187cf557f75c3f63ba36d2563592b066536 (diff) | |
download | fourpuzzle-41ce65d9ae3e75cd374b6f5f99486ee057194a06.tar.gz fourpuzzle-41ce65d9ae3e75cd374b6f5f99486ee057194a06.tar.bz2 fourpuzzle-41ce65d9ae3e75cd374b6f5f99486ee057194a06.zip |
Engine: Added some control to Music
MapViewGameState now plays music depending on the variables of its Map, which can tell it to either stop the music, keep the previous music playing or start playing a specified music.
Diffstat (limited to 'src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java')
-rwxr-xr-x | src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java index 22e464d..7ca08ff 100755 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/SpecialEvent.java | |||
@@ -298,4 +298,26 @@ public class SpecialEvent { | |||
298 | })); | 298 | })); |
299 | } | 299 | } |
300 | 300 | ||
301 | /** | ||
302 | * Starts playing a Music file | ||
303 | * | ||
304 | * @param filename The name of the Music file to play | ||
305 | * @param loop Whether or not you want this Music to loop | ||
306 | * @param speed The Tempo Factor. If this is 1, the Music will play at | ||
307 | * normal speed. If this is 2, the Music will play at twice the normal | ||
308 | * speed, and so on. | ||
309 | */ | ||
310 | public void PlayMusic(String filename, boolean loop, float speed) | ||
311 | { | ||
312 | Audio.playMusic(filename, loop, speed); | ||
313 | } | ||
314 | |||
315 | /** | ||
316 | * Stops playing the currently playing Music file | ||
317 | */ | ||
318 | public void StopMusic() | ||
319 | { | ||
320 | Audio.stopMusic(); | ||
321 | } | ||
322 | |||
301 | } | 323 | } |