-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add music and change license accordingly
Add world select
- Loading branch information
1 parent
dc8f557
commit 34a5b29
Showing
45 changed files
with
442 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
You have slain the Icycle! | ||
You find a better weapon and notice a bit of hair growth... | ||
The Icycle's soul essence has filled the pedestal in the home world! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
You gaze upon the Icycle, | ||
It is frosty, just like that girl you met at the bar last week. | ||
You decide to help the Wizard's frozen beard and slay it! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
You have slain the Fist Thing! | ||
You find a better weapon and notice a bit of hair growth... | ||
The Fist Thing's soul essence has filled the pedestal in the home world! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This is the Fist Thing, just as the name suggests, a Fist... Thing... | ||
You decide to give it a good... | ||
... | ||
... POUNDING! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
You have slain the Eyesore! | ||
You find a better weapon and notice a bit of hair growth... | ||
The Eyesore's soul essence has filled the pedestal in the home world! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Eyesore really is a sight for sore eyes... | ||
Time to make it see reason... | ||
WITH YOUR BLADE! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
You have slain the Skullotor! | ||
You find a better weapon and notice a bit of hair growth... | ||
The Skullotor's soul essence has filled the pedestal in the home world! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Being a skull, it is evident this thing has been slain before... | ||
Does that make it a zombie or some sort of ghost? | ||
Does it even matter? | ||
Enough philosophy, killing time! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
You have slain the Rainbro! | ||
You find a better weapon and notice a bit of hair growth... | ||
The Rainbro's soul essence has filled the pedestal in the home world! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
You see Rainbro and you literally cannot even. | ||
Why do those grey people have a problem with such a cool little guy? | ||
But who are you to judge? | ||
Besides, you need to kill him to progress the game... |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
You have slain the Dragaragataramunam! | ||
And with that, you know that the world will once again be at peace! | ||
Congratulations, I'm sure some beautiful maiden will be waiting for you somewhere! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
So that old man was really working in collaberation with those wizards all along? | ||
He is actually some crazy flying demon man? | ||
Who could have guessed that amazing plot twist? | ||
Time to put that slime slaying training to good use and slay this foul beast! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<No one seems to be home> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Ah we have been expecting you hero... | ||
Thank you for helping us unlock Mr Old's true form... | ||
... | ||
BEHOLD! | ||
Dragaragataramunam! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<map version="1.0" orientation="orthogonal" width="8" height="8" tilewidth="32" tileheight="32"> | ||
<properties> | ||
<property name="textPrefix" value="maps/world7/npc/"/> | ||
</properties> | ||
<tileset firstgid="1" name="maptiles" tilewidth="32" tileheight="32"> | ||
<image source="World7Tileset.png" width="96" height="96"/> | ||
</tileset> | ||
<tileset firstgid="10" name="npcs" tilewidth="32" tileheight="32"> | ||
<image source="world7_npc.png" width="64" height="32"/> | ||
</tileset> | ||
<tileset firstgid="12" name="boss" tilewidth="32" tileheight="32"> | ||
<image source="final_boss.png" width="1664" height="128"/> | ||
</tileset> | ||
<layer name="floor" width="8" height="8"> | ||
<data encoding="base64"> | ||
AQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAACAAAAAgAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAIAAAACAAAAAQAAAAEAAAABAAAAAQAAAAIAAAACAAAAAQAAAAEAAAACAAAAAgAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAA== | ||
</data> | ||
</layer> | ||
<layer name="npc1" width="8" height="8"> | ||
<properties> | ||
<property name="npc" value="true"/> | ||
<property name="solid" value="true"/> | ||
</properties> | ||
<data encoding="base64"> | ||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | ||
</data> | ||
</layer> | ||
<layer name="npc2" width="8" height="8"> | ||
<properties> | ||
<property name="npc" value="true"/> | ||
<property name="solid" value="true"/> | ||
</properties> | ||
<data encoding="base64"> | ||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | ||
</data> | ||
</layer> | ||
<layer name="boss" width="8" height="8"> | ||
<properties> | ||
<property name="boss" value="Dragaragataramunam"/> | ||
<property name="hidden" value="true"/> | ||
<property name="solid" value="true"/> | ||
</properties> | ||
<data encoding="base64"> | ||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | ||
</data> | ||
</layer> | ||
<layer name="solidobs" width="8" height="8"> | ||
<properties> | ||
<property name="solid" value="true"/> | ||
</properties> | ||
<data encoding="base64"> | ||
BwAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAA== | ||
</data> | ||
</layer> | ||
<layer name="playerspawn" width="8" height="8"> | ||
<properties> | ||
<property name="hidden" value="true"/> | ||
<property name="playerspawn" value="true"/> | ||
</properties> | ||
<data encoding="base64"> | ||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== | ||
</data> | ||
</layer> | ||
</map> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
package uk.org.ulcompsoc.tesseract; | ||
|
||
import com.badlogic.gdx.Gdx; | ||
import com.badlogic.gdx.audio.Music; | ||
import com.badlogic.gdx.utils.Disposable; | ||
import com.badlogic.gdx.utils.GdxRuntimeException; | ||
|
||
/** | ||
* @author Ashley Davis (SgtCoDFish) | ||
*/ | ||
public class MusicManager implements Disposable { | ||
public static final float DEFAULT_VOLUME = 0.75f; | ||
public final Music[] loadedMusic; | ||
|
||
private int playingIndex = -1; | ||
private boolean isPaused = false; | ||
|
||
private float fadeDuration = -1.0f; | ||
private float remainingFadeTime = -1.0f; | ||
|
||
public MusicManager(String[] files) { | ||
Music[] temp = new Music[files.length]; | ||
|
||
for (int i = 0; i < files.length; i++) { | ||
temp[i] = Gdx.audio.newMusic(Gdx.files.internal(files[i])); | ||
temp[i].setLooping(true); | ||
temp[i].setVolume(DEFAULT_VOLUME); | ||
} | ||
|
||
loadedMusic = temp; | ||
} | ||
|
||
public void play(int index) { | ||
Gdx.app.debug("PLAY", ""); | ||
if (playingIndex != -1) { | ||
loadedMusic[playingIndex].stop(); | ||
} | ||
|
||
if (index < 0) { | ||
throw new GdxRuntimeException("Invalid index in MusicManager.play"); | ||
} else if (index >= loadedMusic.length) { | ||
index = index % loadedMusic.length; | ||
} | ||
|
||
loadedMusic[index].setVolume(DEFAULT_VOLUME); | ||
loadedMusic[index].play(); | ||
playingIndex = index; | ||
} | ||
|
||
public void pause() { | ||
if (playingIndex == -1) { | ||
return; | ||
} | ||
|
||
isPaused = true; | ||
loadedMusic[playingIndex].pause(); | ||
} | ||
|
||
public void stop() { | ||
if (playingIndex == -1) { | ||
return; | ||
} | ||
|
||
loadedMusic[playingIndex].stop(); | ||
playingIndex = -1; | ||
isPaused = false; | ||
} | ||
|
||
/** | ||
* Fades the currently playing song over duration seconds. | ||
* | ||
* @param duration | ||
* The duration of the fade. | ||
*/ | ||
public void fadeOut(float duration) { | ||
fadeDuration = duration; | ||
remainingFadeTime = fadeDuration; | ||
} | ||
|
||
public void update(float deltaTime) { | ||
if (fadeDuration >= 0.0f) { | ||
remainingFadeTime -= deltaTime; | ||
|
||
if (remainingFadeTime <= 0.0f) { | ||
Gdx.app.debug("FADE_COMPLETE", ""); | ||
fadeDuration = -1.0f; | ||
remainingFadeTime = -1.0f; | ||
loadedMusic[playingIndex].setVolume(DEFAULT_VOLUME); | ||
} else { | ||
loadedMusic[playingIndex].setVolume(Math.min(DEFAULT_VOLUME, remainingFadeTime / fadeDuration)); | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
public void dispose() { | ||
for (Music m : loadedMusic) { | ||
m.dispose(); | ||
} | ||
} | ||
} |
Oops, something went wrong.