Skip to content

Commit

Permalink
Version 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bennahugo@gmail.com committed Mar 19, 2013
1 parent ae12009 commit 928f1fd
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public void kill(){
@Override
public void update(float delta) {

if (!hasTriggered) {
float angle = (player.getPosition().cpy().sub(this.getPosition()
.cpy())).angle();
this.setRotation(angle - 90);
}
if (isDead()){
removeable = true;
}
Expand All @@ -51,11 +56,6 @@ public void update(float delta) {
GameScreen.addObject(new Tongue(this.getPosition().cpy(), this.getWidth()/4f, 1,
this.speed, screenWidth, screenHeight, player));
}
if (!hasTriggered) {
float angle = (player.getPosition().cpy().sub(this.getPosition()
.cpy())).angle();
this.setRotation(angle - 90);
}

super.update(delta);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class Player extends GameObject {
/**
* Static set up vars
*/
protected static final float maxVertPath = 1.0f, upSpeedPercent = 0.8f,
protected static final float maxVertPath = 0.8f, upSpeedPercent = 0.8f,
downSpeedPercent = 1.2f, mosDamage = 0.2f, flyDamage = 0.8f,
manaRegen = 0.5f, manaUse = 5, maxMana = 15;
protected static final float[] mosColor = { 0.047058824f, 0.105882354f,
Expand Down Expand Up @@ -361,6 +361,7 @@ public float getMana() {
@Override
public void kill() {
numLives--;
counter=0;
if (numLives < 0)
super.kill();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class GameScreen implements Screen {
/**
* Final static vars for global use
*/
public static final float width = 800, height = 1280, scrollSpeed = 200, TIME_POINTS_INCREASE_RATE = 50f;
public static final float width = 800, height = 1280, scrollSpeed = 200, TIME_POINTS_INCREASE_RATE = 35f;

/**
* global variables for class
Expand Down Expand Up @@ -482,7 +482,9 @@ public void dispose() {
enemies = new ArrayList<GameObject>();
rocks = new ArrayList<GameObject>();
boids = new ArrayList<GameObject>();

MediaPlayer.stopAllSoundInstances();
MediaPlayer.stopMusic("data/sound/flydragonfly_bg_music.mp3");
MediaPlayer.disposeInstances();
livesTex.dispose();
livesTexBack.dispose();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ public void drawTutorialScreen(SpriteBatch spritebatch, float delta){

int starCount = 0;
int numGoldStars = 0;
if (fancyScoreCounter < 1000)
if (fancyScoreCounter < 2000)
numGoldStars = 1;
else if (fancyScoreCounter < 1600)
else if (fancyScoreCounter < 3500)
numGoldStars = 2;
else if (fancyScoreCounter < 2000)
else if (fancyScoreCounter < 4400)
numGoldStars = 3;
else if (fancyScoreCounter < 2300)
else if (fancyScoreCounter < 5500)
numGoldStars = 4;
else
numGoldStars = 5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,16 @@ public static void stopAllSoundInstances(){
for (String s:allSound.keySet())
allSound.get(s).stop();
}

public static void disposeInstances(){
for (String s:allSound.keySet())
allSound.get(s).dispose();
for (String s:allMusic.keySet()){
allMusic.get(s).getVal1().dispose();
}
allSound.clear();
allMusic.clear();
allSndInstances.clear();
}
/**
* pauses the music file if it is playing. If not the call is ignored
* @param filename
Expand Down

0 comments on commit 928f1fd

Please sign in to comment.