annotate game/SoundElement.java @ 57:1435e9d7fd1a

Bugfix.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 23 Feb 2011 20:36:07 +0200
parents 736de7b28701
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 * Ristipolku Game Engine
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 * (C) Copyright 2011 Matti 'ccr' Hämäläinen <ccr@tnsp.org>
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 */
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 package game;
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7
38
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
8 public enum SoundElement
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
9 {
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
10 // Music loops
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
11 MUSIC_GAME1 ("gamemusic.wav", true),
22
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12
38
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
13 // SoundElement effects
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
14 PIECE_PLACED ("placed.wav", false);
22
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17
38
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
18 private final String name;
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
19 private final boolean streaming;
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
20
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
21 SoundElement(String name, boolean streaming)
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
22 {
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
23 this.name = name;
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
24 this.streaming = streaming;
22
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 }
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26
38
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
27 public String getName()
22
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 {
38
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
29 return this.name;
22
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 }
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31
38
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
32 public boolean isStreaming()
22
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 {
38
736de7b28701 Non-working sound code ...
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
34 return streaming;
22
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 }
afde253ec705 More work.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 }