Skip to content

Commit

Permalink
Merge pull request #43 from protito/master
Browse files Browse the repository at this point in the history
Added different tracks to the levels and menu, adjustments to lvl 1
  • Loading branch information
Jo Grimstad authored Apr 22, 2017
2 parents 5fa119e + afc2cb2 commit 0d37f3e
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 62 deletions.
9 changes: 8 additions & 1 deletion Classes/MarsScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ bool Mars::init()
}
auto cache = SpriteFrameCache::getInstance();
cache->addSpriteFramesWithFile("mars.plist");
cache->addSpriteFramesWithFile("marsTips.plist");
setupAudio();
return true;
}

Expand All @@ -41,6 +41,13 @@ void Mars::loadMap()
GameMap::loadMap();
}

void Mars::setupAudio()
{
auto audio = SimpleAudioEngine::getInstance();
audio->stopBackgroundMusic();
audio->playBackgroundMusic("sfx/marsMusic.mp3", true);
}

void Mars::setupBackground()
{
dust = ParticleRain::create();
Expand Down
7 changes: 2 additions & 5 deletions Classes/MenugScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,8 @@ void Menug::loadAudio()
{
auto audio = SimpleAudioEngine::getInstance();
audio->preloadEffect("sfx/button.wav");
if (!audio->isBackgroundMusicPlaying())
{
audio->stopBackgroundMusic();
audio->playBackgroundMusic("sfx/marsMusic.mp3", true);
}
audio->stopBackgroundMusic();
audio->playBackgroundMusic("sfx/introMusic.mp3", true);
}

void Menug::cacheImages()
Expand Down
8 changes: 8 additions & 0 deletions Classes/UranusScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,17 @@ void Uranus::loadMap()
setupBackground();
setupParallaxImages();
setupSpikes();
setupAudio();
GameMap::loadMap();
}

void Uranus::setupAudio()
{
auto audio = SimpleAudioEngine::getInstance();
audio->stopBackgroundMusic();
audio->playBackgroundMusic("sfx/uranusMusic.mp3",true);
}

void Uranus::setupBackground()
{
auto bgSprite = Sprite::createWithSpriteFrameName("bg.png");
Expand Down
19 changes: 5 additions & 14 deletions RAW/marsLevel.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</tileset>
<layer name="propertiesLayer" width="365" height="20">
<data encoding="base64" compression="zlib">
eJzt28sOwiAQBdD2/3/ahTtTW0AeM3hOwk4NmYHbNtTzOI7TMAzDSDMAiE9mA+QhswHykNkAecjsuPQG+CQXAPIYndl3v5/9ejHz3Rvv/cR0VX+9YSTrah05TATWXS69+6Tv9gB78d+PWHaoa+ma6f25qLLNFyjXsrdXZMIOORRh7hHmkFmm+mW/9+Da6j5aV+zAWSSzRMhJeb2GOsNaLXtwxL5170x2s87XIpzv7XquE9m3Wrd8txd9hv8h38s81aOkXmoKMFZtzt59vuUZzDV0H78+m48eM+fOHKV1r+3X6rUaZV8A8CZDAaj1AhczAvY=
eJzt20EOgyAQBVC9/6W76K6xFqnAzPheMjubkAG+Guy+bduulFIqTQEQn8wGyENmA+QhswHykNlxmRvgk1wAyGN0Zle+J8z89sZ3PzEd9d/cMNLKdfX0NS2HicC6y+XueTLv9gC1+O9HLBX62rpm7r4uqmzjBdr17O0VmVAhhyKMPcIYMsvUv+zPHhxbPY/WFRU4i2SWCDkpr9fQZ1irZw+O2Leenclu1vlahPO9quc6kX3rdc9v72Ke4Tnke5tf/Wjpl54CjHU1Z8+u73kHcw+t499389E1c+zM0dr3q/O1eq1G2RcAvMlQAK56AQvLAvY=
</data>
</layer>
<objectgroup name="objects">
Expand All @@ -34,7 +34,7 @@
<object id="262" name="plat2.png" x="2624" y="706" width="256" height="80"/>
<object id="263" name="plat3.png" x="1215" y="544" width="129" height="68"/>
<object id="275" name="plat3.png" x="1470.5" y="418" width="129" height="68"/>
<object id="277" name="plat3.png" x="1919.5" y="419" width="129" height="68"/>
<object id="277" name="plat3.png" x="1916" y="480" width="129" height="68"/>
<object id="278" name="plat1.png" x="3071" y="640" width="512" height="144"/>
<object id="283" name="plat1.png" x="3712" y="639" width="512" height="144"/>
<object id="285" name="plat1.png" x="4351" y="639" width="512" height="144"/>
Expand Down Expand Up @@ -162,7 +162,7 @@
<object id="380" x="1664" y="320">
<ellipse/>
</object>
<object id="382" x="1792" y="256">
<object id="382" x="1788" y="294">
<ellipse/>
</object>
<object id="384" x="1920" y="320">
Expand All @@ -171,7 +171,7 @@
<object id="385" x="1983" y="381">
<ellipse/>
</object>
<object id="386" x="2112" y="256">
<object id="386" x="2108" y="378">
<ellipse/>
</object>
<object id="392" x="2944" y="512">
Expand Down Expand Up @@ -561,7 +561,7 @@
<object id="595" x="13136" y="512">
<ellipse/>
</object>
<object id="599" x="2176" y="314">
<object id="599" x="2176" y="340">
<ellipse/>
</object>
<object id="600" x="2242" y="380">
Expand Down Expand Up @@ -615,9 +615,6 @@
<object id="616" x="2432" y="704">
<ellipse/>
</object>
<object id="617" x="2624" y="640">
<ellipse/>
</object>
<object id="618" x="2688" y="640">
<ellipse/>
</object>
Expand All @@ -627,9 +624,6 @@
<object id="620" x="2816" y="640">
<ellipse/>
</object>
<object id="621" x="2880" y="640">
<ellipse/>
</object>
<object id="622" x="3776" y="576">
<ellipse/>
</object>
Expand All @@ -648,9 +642,6 @@
<object id="627" x="1856" y="704">
<ellipse/>
</object>
<object id="628" x="1984" y="704">
<ellipse/>
</object>
<object id="629" x="2496" y="704">
<ellipse/>
</object>
Expand Down
19 changes: 5 additions & 14 deletions Resources/HD/marsLevel.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</tileset>
<layer name="propertiesLayer" width="365" height="20">
<data encoding="base64" compression="zlib">
eJzt28sOwiAQBdD2/3/ahTtTW0AeM3hOwk4NmYHbNtTzOI7TMAzDSDMAiE9mA+QhswHykNkAecjsuPQG+CQXAPIYndl3v5/9ejHz3Rvv/cR0VX+9YSTrah05TATWXS69+6Tv9gB78d+PWHaoa+ma6f25qLLNFyjXsrdXZMIOORRh7hHmkFmm+mW/9+Da6j5aV+zAWSSzRMhJeb2GOsNaLXtwxL5170x2s87XIpzv7XquE9m3Wrd8txd9hv8h38s81aOkXmoKMFZtzt59vuUZzDV0H78+m48eM+fOHKV1r+3X6rUaZV8A8CZDAaj1AhczAvY=
eJzt20EOgyAQBVC9/6W76K6xFqnAzPheMjubkAG+Guy+bduulFIqTQEQn8wGyENmA+QhswHykNlxmRvgk1wAyGN0Zle+J8z89sZ3PzEd9d/cMNLKdfX0NS2HicC6y+XueTLv9gC1+O9HLBX62rpm7r4uqmzjBdr17O0VmVAhhyKMPcIYMsvUv+zPHhxbPY/WFRU4i2SWCDkpr9fQZ1irZw+O2Leenclu1vlahPO9quc6kX3rdc9v72Ke4Tnke5tf/Wjpl54CjHU1Z8+u73kHcw+t499389E1c+zM0dr3q/O1eq1G2RcAvMlQAK56AQvLAvY=
</data>
</layer>
<objectgroup name="objects">
Expand All @@ -34,7 +34,7 @@
<object id="262" name="plat2.png" x="2624" y="706" width="256" height="80"/>
<object id="263" name="plat3.png" x="1215" y="544" width="129" height="68"/>
<object id="275" name="plat3.png" x="1470.5" y="418" width="129" height="68"/>
<object id="277" name="plat3.png" x="1919.5" y="419" width="129" height="68"/>
<object id="277" name="plat3.png" x="1916" y="480" width="129" height="68"/>
<object id="278" name="plat1.png" x="3071" y="640" width="512" height="144"/>
<object id="283" name="plat1.png" x="3712" y="639" width="512" height="144"/>
<object id="285" name="plat1.png" x="4351" y="639" width="512" height="144"/>
Expand Down Expand Up @@ -162,7 +162,7 @@
<object id="380" x="1664" y="320">
<ellipse/>
</object>
<object id="382" x="1792" y="256">
<object id="382" x="1788" y="294">
<ellipse/>
</object>
<object id="384" x="1920" y="320">
Expand All @@ -171,7 +171,7 @@
<object id="385" x="1983" y="381">
<ellipse/>
</object>
<object id="386" x="2112" y="256">
<object id="386" x="2108" y="378">
<ellipse/>
</object>
<object id="392" x="2944" y="512">
Expand Down Expand Up @@ -561,7 +561,7 @@
<object id="595" x="13136" y="512">
<ellipse/>
</object>
<object id="599" x="2176" y="314">
<object id="599" x="2176" y="340">
<ellipse/>
</object>
<object id="600" x="2242" y="380">
Expand Down Expand Up @@ -615,9 +615,6 @@
<object id="616" x="2432" y="704">
<ellipse/>
</object>
<object id="617" x="2624" y="640">
<ellipse/>
</object>
<object id="618" x="2688" y="640">
<ellipse/>
</object>
Expand All @@ -627,9 +624,6 @@
<object id="620" x="2816" y="640">
<ellipse/>
</object>
<object id="621" x="2880" y="640">
<ellipse/>
</object>
<object id="622" x="3776" y="576">
<ellipse/>
</object>
Expand All @@ -648,9 +642,6 @@
<object id="627" x="1856" y="704">
<ellipse/>
</object>
<object id="628" x="1984" y="704">
<ellipse/>
</object>
<object id="629" x="2496" y="704">
<ellipse/>
</object>
Expand Down
19 changes: 5 additions & 14 deletions Resources/HDR/marsLevel.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</tileset>
<layer height="20" name="propertiesLayer" width="365">
<data compression="zlib" encoding="base64">
eJzt28sOwiAQBdD2/3/ahTtTW0AeM3hOwk4NmYHbNtTzOI7TMAzDSDMAiE9mA+QhswHykNkAecjsuPQG+CQXAPIYndl3v5/9ejHz3Rvv/cR0VX+9YSTrah05TATWXS69+6Tv9gB78d+PWHaoa+ma6f25qLLNFyjXsrdXZMIOORRh7hHmkFmm+mW/9+Da6j5aV+zAWSSzRMhJeb2GOsNaLXtwxL5170x2s87XIpzv7XquE9m3Wrd8txd9hv8h38s81aOkXmoKMFZtzt59vuUZzDV0H78+m48eM+fOHKV1r+3X6rUaZV8A8CZDAaj1AhczAvY=
eJzt20EOgyAQBVC9/6W76K6xFqnAzPheMjubkAG+Guy+bduulFIqTQEQn8wGyENmA+QhswHykNlxmRvgk1wAyGN0Zle+J8z89sZ3PzEd9d/cMNLKdfX0NS2HicC6y+XueTLv9gC1+O9HLBX62rpm7r4uqmzjBdr17O0VmVAhhyKMPcIYMsvUv+zPHhxbPY/WFRU4i2SWCDkpr9fQZ1irZw+O2Leenclu1vlahPO9quc6kX3rdc9v72Ke4Tnke5tf/Wjpl54CjHU1Z8+u73kHcw+t499389E1c+zM0dr3q/O1eq1G2RcAvMlQAK56AQvLAvY=
</data>
</layer>
<objectgroup name="objects">
Expand All @@ -33,7 +33,7 @@
<object height="160" id="262" name="plat2.png" width="512" x="5248" y="1412" />
<object height="136" id="263" name="plat3.png" width="258" x="2430" y="1088" />
<object height="136" id="275" name="plat3.png" width="258" x="2941" y="836" />
<object height="136" id="277" name="plat3.png" width="258" x="3839" y="838" />
<object height="136" id="277" name="plat3.png" width="258" x="3832" y="960" />
<object height="288" id="278" name="plat1.png" width="1024" x="6142" y="1280" />
<object height="288" id="283" name="plat1.png" width="1024" x="7424" y="1278" />
<object height="288" id="285" name="plat1.png" width="1024" x="8702" y="1278" />
Expand Down Expand Up @@ -161,7 +161,7 @@
<object id="380" x="3328" y="640">
<ellipse />
</object>
<object id="382" x="3584" y="512">
<object id="382" x="3576" y="588">
<ellipse />
</object>
<object id="384" x="3840" y="640">
Expand All @@ -170,7 +170,7 @@
<object id="385" x="3966" y="762">
<ellipse />
</object>
<object id="386" x="4224" y="512">
<object id="386" x="4216" y="756">
<ellipse />
</object>
<object id="392" x="5888" y="1024">
Expand Down Expand Up @@ -560,7 +560,7 @@
<object id="595" x="26272" y="1024">
<ellipse />
</object>
<object id="599" x="4352" y="628">
<object id="599" x="4352" y="680">
<ellipse />
</object>
<object id="600" x="4484" y="760">
Expand Down Expand Up @@ -614,9 +614,6 @@
<object id="616" x="4864" y="1408">
<ellipse />
</object>
<object id="617" x="5248" y="1280">
<ellipse />
</object>
<object id="618" x="5376" y="1280">
<ellipse />
</object>
Expand All @@ -626,9 +623,6 @@
<object id="620" x="5632" y="1280">
<ellipse />
</object>
<object id="621" x="5760" y="1280">
<ellipse />
</object>
<object id="622" x="7552" y="1152">
<ellipse />
</object>
Expand All @@ -647,9 +641,6 @@
<object id="627" x="3712" y="1408">
<ellipse />
</object>
<object id="628" x="3968" y="1408">
<ellipse />
</object>
<object id="629" x="4992" y="1408">
<ellipse />
</object>
Expand Down
19 changes: 5 additions & 14 deletions Resources/SD/marsLevel.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</tileset>
<layer height="20" name="propertiesLayer" width="365">
<data compression="zlib" encoding="base64">
eJzt28sOwiAQBdD2/3/ahTtTW0AeM3hOwk4NmYHbNtTzOI7TMAzDSDMAiE9mA+QhswHykNkAecjsuPQG+CQXAPIYndl3v5/9ejHz3Rvv/cR0VX+9YSTrah05TATWXS69+6Tv9gB78d+PWHaoa+ma6f25qLLNFyjXsrdXZMIOORRh7hHmkFmm+mW/9+Da6j5aV+zAWSSzRMhJeb2GOsNaLXtwxL5170x2s87XIpzv7XquE9m3Wrd8txd9hv8h38s81aOkXmoKMFZtzt59vuUZzDV0H78+m48eM+fOHKV1r+3X6rUaZV8A8CZDAaj1AhczAvY=
eJzt20EOgyAQBVC9/6W76K6xFqnAzPheMjubkAG+Guy+bduulFIqTQEQn8wGyENmA+QhswHykNlxmRvgk1wAyGN0Zle+J8z89sZ3PzEd9d/cMNLKdfX0NS2HicC6y+XueTLv9gC1+O9HLBX62rpm7r4uqmzjBdr17O0VmVAhhyKMPcIYMsvUv+zPHhxbPY/WFRU4i2SWCDkpr9fQZ1irZw+O2Leenclu1vlahPO9quc6kX3rdc9v72Ke4Tnke5tf/Wjpl54CjHU1Z8+u73kHcw+t499389E1c+zM0dr3q/O1eq1G2RcAvMlQAK56AQvLAvY=
</data>
</layer>
<objectgroup name="objects">
Expand All @@ -33,7 +33,7 @@
<object height="40" id="262" name="plat2.png" width="128" x="1312" y="353" />
<object height="34" id="263" name="plat3.png" width="65" x="608" y="272" />
<object height="34" id="275" name="plat3.png" width="65" x="735" y="209" />
<object height="34" id="277" name="plat3.png" width="65" x="960" y="210" />
<object height="34" id="277" name="plat3.png" width="65" x="958" y="240" />
<object height="72" id="278" name="plat1.png" width="256" x="1536" y="320" />
<object height="72" id="283" name="plat1.png" width="256" x="1856" y="320" />
<object height="72" id="285" name="plat1.png" width="256" x="2176" y="320" />
Expand Down Expand Up @@ -161,7 +161,7 @@
<object id="380" x="832" y="160">
<ellipse />
</object>
<object id="382" x="896" y="128">
<object id="382" x="894" y="147">
<ellipse />
</object>
<object id="384" x="960" y="160">
Expand All @@ -170,7 +170,7 @@
<object id="385" x="992" y="191">
<ellipse />
</object>
<object id="386" x="1056" y="128">
<object id="386" x="1054" y="189">
<ellipse />
</object>
<object id="392" x="1472" y="256">
Expand Down Expand Up @@ -560,7 +560,7 @@
<object id="595" x="6568" y="256">
<ellipse />
</object>
<object id="599" x="1088" y="157">
<object id="599" x="1088" y="170">
<ellipse />
</object>
<object id="600" x="1121" y="190">
Expand Down Expand Up @@ -614,9 +614,6 @@
<object id="616" x="1216" y="352">
<ellipse />
</object>
<object id="617" x="1312" y="320">
<ellipse />
</object>
<object id="618" x="1344" y="320">
<ellipse />
</object>
Expand All @@ -626,9 +623,6 @@
<object id="620" x="1408" y="320">
<ellipse />
</object>
<object id="621" x="1440" y="320">
<ellipse />
</object>
<object id="622" x="1888" y="288">
<ellipse />
</object>
Expand All @@ -647,9 +641,6 @@
<object id="627" x="928" y="352">
<ellipse />
</object>
<object id="628" x="992" y="352">
<ellipse />
</object>
<object id="629" x="1248" y="352">
<ellipse />
</object>
Expand Down
Binary file added Resources/sfx/introMusic.mp3
Binary file not shown.
Binary file added Resources/sfx/uranusMusic.mp3
Binary file not shown.

0 comments on commit 0d37f3e

Please sign in to comment.