Permalink
Browse files

Day 3 results

  • Loading branch information...
1 parent 170cfe6 commit 370c7275839225a99e619d86213413bff9602d35 Sergej Tatarincev committed Aug 27, 2012
Showing with 669 additions and 252 deletions.
  1. BIN background.png
  2. +15 −3 index.html
  3. +4 −1 lib/Cocos2d-html5-canvasmenu.js
  4. 0 resources/Darwin.plist
  5. 0 resources/Darwin.png
  6. 0 resources/bat.plist
  7. 0 resources/bat.png
  8. BIN resources/beach_bg.png
  9. BIN resources/beach_fg.png
  10. BIN resources/bgm.mp3
  11. BIN resources/bgm.ogg
  12. BIN resources/bgm.wav
  13. +10 −18 resources/cave00.tmx
  14. +13 −8 resources/cave01.tmx
  15. +15 −9 resources/cave02.tmx
  16. +15 −9 resources/cave03.tmx
  17. +11 −9 resources/cave04.tmx
  18. +15 −9 resources/cave05.tmx
  19. +29 −7 resources/cave06.tmx
  20. +29 −6 resources/cave07.tmx
  21. +21 −8 resources/cave08.tmx
  22. +13 −9 resources/cave09.tmx
  23. +12 −8 resources/cave10.tmx
  24. +15 −9 resources/cave11.tmx
  25. +11 −9 resources/cave12.tmx
  26. +13 −9 resources/cave13.tmx
  27. +16 −9 resources/cave14.tmx
  28. +11 −9 resources/cave15.tmx
  29. +10 −8 resources/cave16.tmx
  30. +11 −9 resources/cave17.tmx
  31. BIN resources/cave_background.png
  32. BIN resources/cave_beach_bg.png
  33. BIN resources/damage.mp3
  34. BIN resources/damage.ogg
  35. BIN resources/damage.wav
  36. BIN resources/heart.png
  37. BIN resources/hearts.png
  38. BIN resources/hit.mp3
  39. BIN resources/hit.ogg
  40. BIN resources/hit.wav
  41. BIN resources/jump.mp3
  42. BIN resources/jump.ogg
  43. BIN resources/jump.wav
  44. +3 −3 resources/level0.tmx
  45. BIN resources/lose.png
  46. BIN resources/pick.mp3
  47. BIN resources/pick.ogg
  48. BIN resources/pick.wav
  49. BIN resources/skull0.PNG
  50. BIN resources/skull1.PNG
  51. BIN resources/skull2.PNG
  52. BIN resources/skull3.PNG
  53. BIN resources/skull4.PNG
  54. BIN resources/skull5.PNG
  55. BIN resources/sleepingSailor.png
  56. 0 resources/snake.plist
  57. 0 resources/snake.png
  58. 0 resources/spider.plist
  59. 0 resources/spider.png
  60. BIN resources/tiles.png
  61. BIN resources/tiles_cave.png
  62. BIN resources/tiles_cave_bg.png
  63. BIN resources/title.png
  64. BIN resources/win.png
  65. +2 −2 src/AppDelegate.js
  66. +4 −0 src/actors/Bat.js
  67. +17 −6 src/actors/Darwin.js
  68. +14 −2 src/actors/Enemy.js
  69. +42 −0 src/actors/Heart.js
  70. +7 −1 src/actors/Skull.js
  71. +2 −2 src/actors/Spider.js
  72. +46 −0 src/layers/GUILayer.js
  73. +87 −54 src/main.js
  74. +65 −16 src/scenes/GameScene.js
  75. +39 −0 src/scenes/IdleScene.js
  76. +48 −0 src/scenes/PauseScene.js
  77. +4 −0 style.css
View
BIN background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
18 index.html
@@ -2,12 +2,24 @@
<html>
<head>
<meta http-equiv='content-type' content='text/html; charset=utf-8'>
-
- <title>Cocos2d Game with RequireJS</title>
+ <link href='http://fonts.googleapis.com/css?family=Chango|Press+Start+2P' rel='stylesheet' type='text/css'>
+
+ <title>Super Darwin</title>
<link rel="stylesheet" href="style.css" type="text/css">
<script type='text/javascript' data-main='src/main.js' src='lib/require.js'></script>
+ <style type="text/css">
+ table {
+ border-collapse: collapse;
+ border-spacing: 0;
+ }
+ th, td {
+ padding: 0;
+ }
+ </style>
</head>
<body>
- <canvas id='gameCanvas' width='640' height='480'></canvas>
+ <div style="width:720px;margin:0 auto;padding:40px;background:url('background.png') no-repeat;">
+ <canvas id='gameCanvas' width='640' height='480' tabindex="1"></canvas>
+ </div>
</body>
</html>
View
5 lib/Cocos2d-html5-canvasmenu.js
@@ -36030,7 +36030,7 @@ cc.AudioManager = cc.Class.extend(/** @lends cc.AudioManager# */{
_playingBgm:null,
_effectsVolume:1,
/**
- * Constructor
+ * @Constructor
*/
ctor:function () {
if (this._initialized)
@@ -36306,6 +36306,7 @@ cc.AudioManager = cc.Class.extend(/** @lends cc.AudioManager# */{
playEffect:function (path, loop) {
var soundCache = this._getEffectList(path);
if (soundCache) {
+ soundCache.currentTime = 0;
soundCache.loop = loop || false;
soundCache.play();
}
@@ -36464,3 +36465,5 @@ cc.AudioManager.sharedEngine = function () {
}
return cc.sharedEngine;
};
+
+
View
0 resources/Darwin.plist 100644 → 100755
File mode changed.
View
0 resources/Darwin.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 resources/bat.plist 100644 → 100755
File mode changed.
View
0 resources/bat.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/beach_bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/beach_fg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/bgm.mp3
Binary file not shown.
View
BIN resources/bgm.ogg
Binary file not shown.
View
BIN resources/bgm.wav
Binary file not shown.
View
28 resources/cave00.tmx
@@ -5,33 +5,25 @@
<property name="leftPortal" value="resources/level1.tmx"/>
<property name="topPortal" value="resources/cave05.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
- </tileset>
- <layer name="beach_background" width="32" height="24">
- <data encoding="base64" compression="gzip">
- H4sIAAAAAAAAA+3NN1YCUABEUdarFAYMyA6UYEAU3IEBBTHvwJzjDsyKmYZb2/7Cwv/Ouc00k0jEYrFYLPb3ddBJ8tfeRTc99JKij34GGCTNEJmA/2FGyJIjT4FRxhhngiKTlJhimjIVZgL+Z5ljngWqLLJEjTrLNFhhlTXW2WCTrYD/bXbYZY99DjjkiGNOOOWMcy645IprbgL+b7njngceeeKZF15p8sY7H3zyxTc/tAL+Y7H/VBtVEYoCAAwAAA==
- </data>
- </layer>
- <layer name="cave_background" width="32" height="24">
+ <layer name="background" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAA2NgGAWjYBSMglEwCgYeMAIxExAzU0CzUGA/KwV6YYCDAr2cVLCfZwjbzwvEfEDMTwKNzhagwP5RMApGEgAAxWzvCwAMAAA=
+ H4sIAAAAAAAAA2NgoD5wIQLTEozaP7D2OwGx8wDaHwbE4TSyPwuIs3GYmQHEmQTUUGp/HRDX4zCzBohrCahxAGJHCuwnJm3RMv1Rai8sjqjtH2IxLI4Gyn708B+1f/DZvw+I9wPxASA+OAD2XwLiy0B8BYivDoD9z4D4ORC/AOKXA2D/QMf/YLGfj5GBgR+IBRhpZz81wUDbT0y7Z7D5HwBKVmo6AAwAAA==
</data>
</layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAA2NgoC6QJ1KdKpXtRbZfBIjVoFh0AOwnBozaTzoQBGJJAliFhvYT67dR+zEBep6E2U8oPsmJW2IArdL/SLafmHKXlvaTAoay/aSEMy3spwYYtX/UfhAQphKWI9N+agFS60Za2I9cLhAqG2D2AwBXZ5EAAAwAAA==
+ H4sIAAAAAAAAA2NgoC4QJFKdBJXtRbafBYgloZh1AOwnBozaTzpgBGIuAlichvYT67dR+zEBep6E2U8oPsmJW2IArdL/SLafmHKXlvaTAoay/aSEMy3spwYYtX/UfhBgphIWINN+agFS60Za2I9cLhAqG2D2AwAZsjo0AAwAAA==
</data>
</layer>
<objectgroup name="objects" width="32" height="24">
- <object name="Bat1" type="Bat" x="274" y="122" width="47" height="172"/>
- <object name="Bat2" type="Bat" x="393" y="406" width="202" height="43"/>
- <object name="Snake1" type="Snake" x="5" y="378" width="370" height="42"/>
+ <object name="Spider1" type="Spider" x="140" y="360" width="220" height="60"/>
+ <object name="Bat1" type="Bat" x="543" y="15" width="29" height="140"/>
+ <object name="Bat1" type="Bat" x="300" y="380" width="240" height="40"/>
</objectgroup>
</map>
View
21 resources/cave01.tmx 100644 → 100755
@@ -5,21 +5,26 @@
<property name="rightPortal" value="resources/cave03.tmx"/>
<property name="topPortal" value="resources/cave00.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAA+3SS07CUBSA4TKTPYjADkBhDglTQEEWIG8WwEOEkTAQUIaovBbAS2AHAroDEdyM/4QJsZorLR3Qk3xJk9ucv20qScqNR4Aao/d369+ihLLgLqXet4FHPKnQ30giJdPvoY+Biv0CijL9zT3PaKKFNjroKvwcv/WHGOEFY0ww3WP/FTPMscAb3gV2n+MCAQQF+kcGSTLig+slPrHCGl8C/ShiiCMh0D+mbcIJzLDAahD/tjlcI4+brTMX3DJ9Gy07TnEGB5z/6NdwjwfUt84uEZLp/zWi/9OuO3W6n3jhg1+j/hXCiGjUTyODrEb9O1RQVWDXoc83opuBEwAMAAA=
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgoA6QJ1G9KpXsHS72CwKxJAVYhUL7SXU/qUAEiNWgWHQA7EcHo/YPb/vR0xu97ScERu2HAOTyCznO0DG2OIQBfPpwmaUMtXcUjIKhBmDpHV+eGAXEAeEBxgMNAC9AWLwADAAA
+ H4sIAAAAAAAAA2NgoA4QJFG9BJXsHS72MwIxFwVYnEL7SXU/qYAFiCWhmHUA7EcHo/YPX/stgdgKiK2B2GYA7CcGjNoPAcjllyQezErAPOTyhRgsBrV3FIwCUoEiECsBsfJAO2QUUAyYBxgPNAAAeEbVegAMAAA=
</data>
</layer>
<objectgroup name="objects" width="32" height="24">
<object name="redWall" x="520" y="280" width="80" height="160"/>
+ <object name="Spider1" type="Spider" x="200" y="140" width="180" height="120"/>
+ <object name="Spider 2" type="Spider" x="420" y="120" width="80" height="60"/>
+ <object name="Spider 3" type="Spider" x="20" y="300" width="220" height="140"/>
</objectgroup>
</map>
View
24 resources/cave02.tmx
@@ -3,22 +3,28 @@
<properties>
<property name="rightPortal" value="resources/cave01.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAA+2SSQ6AIBAE+f+L3J7g9gQX3qAe7SMHMQw0wcSppG4M3RkwRlGUr9FGWjKb0SE1O6UDKzu2g+Y/W8EaNoXyezjAUZgv7eg7s8AVbqS9vOV3glnGXlwmOMMd2oBZ315Yf+SEV8LdzD96ZOojJfRtcuW7MHbyd26D91L3AAwAAA==
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgGAWjYBQgA0EgliQTC1HBbhUK9CtT4AZK7abEDdSym1w3yFPRbhhQHbV/QO0HpQFC+ZWW9pMCRu0f2faLA7EwGpYbUBdhummg3TMY44hSPNAAAM2AB44ADAAA
+ H4sIAAAAAAAAA2NgGAWjYBQgA1kglgNieTJoBSrYrUqBfnUK3ECp3ZS4gVp2k+sGFSraDQN6JKjVpoH9piSoHY7+V2PAn1e5kNTSwv+kAFr4nxQw0v1vBMQmQGwMpXUG1jlg9ww2t+gOAnfA4mgwuYVcmpnursYEAC8jlb0ADAAA
</data>
</layer>
<objectgroup name="objects" width="32" height="24">
- <object name="skull0" x="65" y="285" width="93" height="86"/>
+ <object name="skull0" x="107" y="314" width="34" height="30"/>
<object name="grayWall" x="480" y="280" width="80" height="160"/>
+ <object name="Snake 1" type="Snake" x="300" y="400" width="180" height="40"/>
+ <object type="Snake" x="240" y="380" width="60" height="40"/>
+ <object type="Snake" x="200" y="360" width="40" height="40"/>
+ <object type="Snake" x="140" y="340" width="60" height="40"/>
</objectgroup>
</map>
View
24 resources/cave03.tmx
@@ -4,19 +4,25 @@
<property name="bottomPortal" value="resources/cave04.tmx"/>
<property name="leftPortal" value="resources/cave01.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAA+3Tuw6CQBBG4X00hQ4tvXRorR1aeoNCLS3UxDcQnpLTkFBQ7MCYsdg/+crJSTZZ58LC/nMbbPHxdEGOQql/wlnQf+KFt1Lft9v4okRl1G8L/eGLEAu7I4yV+gsshf0Z5kp96f/v8/5dtwccnfz/t2+H9DWEvl4/wQRTo36KFdZG/Qw77I36V9xw/0G/z6z7Dw++qwF8mdV0AAwAAA==
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgGAWjABMIArEkBViIQvvlKdSvOmr/qP2j9g96+3GVHyoE9IkAsRoOLEqC/bQCo/aP2j9q/+C3X5hELMeAWvaIUmg/qYDYcplY+wGZPKLrAAwAAA==
+ H4sIAAAAAAAAA2NgGAWjABMwAjEXBZiJQvsFKdQvMWr/qP2j9g96+3GVH+IE9LEAsSQOzEqC/bQCo/YPH/sVgVgJiJUHyH5ywKj9xAFmErEAA2rZw0qh/aQCYstlYu0HAFBKPv0ADAAA
</data>
</layer>
- <objectgroup name="objects" width="32" height="24"/>
+ <objectgroup name="objects" width="32" height="24">
+ <object name="Spider 1" type="Spider" x="5" y="300" width="167" height="140"/>
+ <object name="Spider 2" type="Spider" x="180" y="300" width="60" height="60"/>
+ <object x="240" y="100" width="40" height="340"/>
+ </objectgroup>
</map>
View
20 resources/cave04.tmx 100755 → 100644
@@ -3,21 +3,23 @@
<properties>
<property name="topPortal" value="resources/cave03.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAC+1W0Q7DIAj0/5/m/IW6/eY0W1NC4ER0tg8lubRW5DxE0hD67WHAP41zxd/zXZAKngv4s7CPVXaV/EfyzvOxgv9s/RWvcNRdHW9OfoummdD40ZnOQnbqj0Iczzqkn2MDcyNrWvxIWyJAGqU4Wn2iGB7UHkzvBh+39Fu0IJ9ek3I0Mx/e+kN1xfeH6o77Svwj952es+X8Wvo1LT17RPlo8VvjWGD5V/DE7d0X9df4Uf9H9yEb/XZfblq/4N9TkPuJ5qfN3fa1DyiFnPkADAAA
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgIA3IE6lOlURzh4P9IkCsBsSiA2Q/Mhi1n3ggCMSSRGIVIs1UJmCOEJJaYv2EDSCnOVIAcvhQYj+5YNT+oWs/uWmOWvYTA2BuxIbRy+ehFv6j9mMCUtPkcPP/qP3k2y8OxMJ0xhK09BwJAAAcP2t0AAwAAA==
+ H4sIAAAAAAAAC2NgIA0IEqlOgkRzh4P9LEAsCcSsA2Q/Mhi1n3jACMRcRGJxIs0UI2AOE5JaYv2EDSCnOVIAcvhQYj+5YNT+oWs/uWmOWvYTA2BuxIbRy+ehFv6j9mMCUtPkcPP/qP3k288BxMx0xpy09BwJAABgf6enAAwAAA==
</data>
</layer>
<objectgroup name="objects" width="32" height="24">
- <object name="skull5" x="55" y="345" width="87" height="88"/>
+ <object name="skull4" x="55" y="345" width="87" height="88"/>
</objectgroup>
</map>
View
24 resources/cave05.tmx
@@ -4,19 +4,25 @@
<property name="bottomPortal" value="resources/cave00.tmx"/>
<property name="topPortal" value="resources/cave06.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAA+3UyQmAMBCF4SnNDUuIaAUuLbjXoNagVukLXtSDRKKMGAe+W+BPAgnRfjwFT47p/RQyxn4JFWOf+/7f3vcZ+yFEjP0tAcGF9VINDbQa/RgSUnunRx30MGj0cyhofadX2tIIE8wa/bv8/Xf2Vf7/L5+fu++Ay9gXD+/BAvukf8fonN+0/gJ5y1k5AAwAAA==
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgQAB5BuKAKpHqSAWDwX4RIFaDYtEBsJ8YMGr/qP0Dab8yEEtSiIVIsB85T+LLl6QAbGFIrP+pAUbtH7Ufm/3E1D+EADH5ZbD6f9T+kWu/OBALU4jlcNiHnq8Gug4dLPYDABYfrDUADAAA
+ H4sIAAAAAAAAA2NgQABBBuKABJHqSAWDwX4WIJaEYtYBsJ8YMGr/qP0Dab8YEHNRiJlIsB85T+LLl6QAbGFIrP+pAUbtH7Ufm/3E1D+EADH5ZbD6f9T+kWs/BxAzU4gFcNiHnq8Gug4dLPYDAP00t/4ADAAA
</data>
</layer>
- <objectgroup name="objects" width="32" height="24"/>
+ <objectgroup name="objects" width="32" height="24">
+ <object name="Spider 1" type="Spider" x="80" y="340" width="330" height="80"/>
+ <object name="Bat 1" type="Bat" x="80" y="240" width="460" height="60"/>
+ <object name="Spider 2" type="Spider" x="180" y="40" width="80" height="140"/>
+ </objectgroup>
</map>
View
36 resources/cave06.tmx 100755 → 100644
@@ -4,19 +4,41 @@
<property name="bottomPortal" value="resources/cave05.tmx"/>
<property name="rightPortal" value="resources/cave07.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
+ <tileset firstgid="324" name="tiles_cave_bg" tilewidth="20" tileheight="20">
+ <image source="tiles_cave_bg.png" width="80" height="100"/>
+ </tileset>
+ <tileset firstgid="344" name="cave_beach_bg" tilewidth="20" tileheight="20">
<image source="cave_beach_bg.png" width="640" height="200"/>
</tileset>
+ <layer name="beach_background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAA+3NNWyWUQCG0b/FXSfc3WHE3X3ApcWpIB1wd4d2wN3dBtzdbcLdHSb8MDSEhgZCQsLwP8kZ7v3kDQR+1CokEGhNG9rSjvZ0oCOd6EwY4XShK93oTg960oveRBBJFNH0oS/96E9MSOCnBjgPZBCDGcJQhjGcEYxkFKMZw1jGMZ4JTGQSk5nCVKYxnRnMZBaxxCXYn+08h7nMYz4LWMgiFrOEpSxjOStYySpWs4a1rGM9G9jIJjazha1sY3uC/R3OO9nFbvawl33s5wAHOcRhjnCUYxznBCc5xWnOcJZznOcCF7nEZa4k2I/vqvtrXOcGN7nFbe5wl3vc5wEPecRjnvCUZzznBS95xWve8JZ3vE9k/4P7j3ziM1/4+v3d0EAghFCSkJRkJCcFKUlFatKQlnSkJwMZyURmspA19Nf72dxnJwc5yUVu8pCXfOSnAAUpRGGKUJRiFKcEJSlFacpQlnKUp0Ii+/FV9LwSlalCVapRnRrUpBa1qUNd6lGfBjSkEY1pQlOa0ZwWtPzNfmKF+S6cLnSlG93pQU960ZsIIokimj70pR/9ifnL/T9tiv9PZRrTmcFMZhFL3D/eDxYsWLBgwf7XvgFq1PEbAAwAAA==
+ </data>
+ </layer>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAA+3QwQnAIBQEUUuLxhJNatBU6V6CJ0ECMjnswpyf3xA8byzbx/032p9F+6vR/pc30n5S58/v3zn79mcdKoI+eX9Rl7ohv6qmHsin/3+X3wG231I8AAwAAA==
+ </data>
+ </layer>
+ <layer name="cave_background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAA2NgGAWDBQQyQnAI48C6w2OE2x8wSOIB5g50PFjdNVjdGQTF6O4LGmD3jYJRMApGwSgYBQMFAKa0C2oADAAA
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgGAUwIAjEknTGyECeZj4jDozaP2r/qP2j9g+k/SJArAbFojjUyQKxMJUwuv3EAFUi1ZEKRu0ftR8bQM8TI83/o/bTzn4AiIjTvgAMAAA=
+ H4sIAAAAAAAAA2NgGAWjAAIER+0ftX/U/lH7B9B+FiCWhGJWHOr4gZiZShjdfmKABJHqSAWj9o/ajw2g54mR5v9R+2lnPwARPGMIAAwAAA==
</data>
</layer>
- <objectgroup name="objects" width="32" height="24"/>
+ <objectgroup name="objects" width="32" height="24">
+ <object name="Spider 1" type="Spider" x="100" y="160" width="40" height="100"/>
+ <object name="Snake 1" type="Snake" x="260" y="220" width="240" height="40"/>
+ <object name="Snake 1" type="Snake" x="400" y="220" width="240" height="40"/>
+ </objectgroup>
</map>
View
35 resources/cave07.tmx
@@ -6,18 +6,41 @@
<property name="rightPortal" value="resources/cave08.tmx"/>
</properties>
<tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <image source="tiles_cave_bg.png" width="80" height="100"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
+ <tileset firstgid="21" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
+ <tileset firstgid="84" name="cave_beach_bg" tilewidth="20" tileheight="20">
<image source="cave_beach_bg.png" width="640" height="200"/>
</tileset>
+ <tileset firstgid="404" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
+ </tileset>
+ <layer name="beach_background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAA+3NxVEEURiF0R40DDQPNA98cMkAd0kBh0FTwJ0ccCcHOFPFVLFgxTSwoL965y3/Gw+CIB6S7/SX28mqqKaGWuqop+HjbiNNNNNCK22000EnXWnsd9NDL330M8AgQwwzwihjjDPBJFNp7KaaZoZZ5phngUWWWCbBCqussc4GmyHsb7HNDrvssc8BhxxxzAmnnHEewm6qCy654pobbrnjngceeeKZF15D3H9LfjGPDDLJIpsccmMhjn1Rnvv5FFBIEcU/vPm5ElullFFOBZW/uB8VFRUVFfUfewcLAlk1AAwAAA==
+ </data>
+ </layer>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAA+3SOQqAMBBAUb1/qyAuV3DpXcCld7mQv7ERFBKNQ9TAb+eNJo7zjhO4etnu67q2+1ddm/y7LBXfpGnS98hXuNenv8u0X1Il6I800UzLhb3u3nnbS8pXfRe/f3xq5jSC/v5tf+3/h8yJKKZEwE+Zk1FOhYDfMqejngYB/+yo+ivARJE7AAwAAA==
+ </data>
+ </layer>
+ <layer name="cave_background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAA2NgoBwIAbEAFcwhF/AMkL0gf/MxDJzfR/1NewDzKzKmtb+R7RyIMKZn+KKH7UCmq1EwCkbBKBgFo2CkAAARw9jfAAwAAA==
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgoBwIArEkmZgaQJ4CveS6GxmrUGD/KBgFo4D6QBaIhYnA1AIiQKwGxaJArEpFs8kBygzYyyqhgXQUA2a4EBNHyFiOyvaTCiipa4aL/ehpnd72UwJG7R+1fyjbL85AWdmIbj8AyKMrhwAMAAA=
+ H4sIAAAAAAAAA2NgoB6QIwOPglEwCkYBtYEyEIsTgakFJIBYF4olgViHimaTA7QYsJe3YgPpKAbMcCEmjpCxCpXtJxWojtqPkdbpbT8lYNT+UfuHsv0yDJSVjej2AwAoDw/IAAwAAA==
</data>
</layer>
- <objectgroup name="objects" width="32" height="24"/>
+ <objectgroup name="objects" width="32" height="24">
+ <object name="Snake 1" type="Snake" x="20" y="220" width="240" height="40"/>
+ <object name="Spider 1" type="Spider" x="260" y="400" width="120" height="60"/>
+ <object name="Spider 2" type="Spider" x="260" y="140" width="80" height="180"/>
+ <object name="Snake 2" type="Snake" x="440" y="140" width="120" height="40"/>
+ </objectgroup>
</map>
View
29 resources/cave08.tmx 100755 → 100644
@@ -3,21 +3,34 @@
<properties>
<property name="leftPortal" value="resources/cave07.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="44" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAC+3Wx0oDQRjA8cktanwD6xsYo/eIPoLiQwiWe2KLvoG9l4sttlhuxkRjvdkT283yFv4vA3FZIQvZdT/YD36XhRn+DMswSsmaFhfrxwAGERPQO4JRjGFcQO8KVrGGdQG9Rl6v1yu997/H67V3mpWs3nYlq7dDWe/tRBe60WNhfQRR9KLPgXV69PtnCMMW1jsljKa8Xv3+mcAkpjCNGcxiDvNYwCKWsGyy7xGSOEaqiL2taMvr1e+fDcSxiS1sYwe7SGAP+zjAocm+N7jFHe5tOGc9xu9pnOAUGZzhHBe4xBWuTdZ94BNf+C5ip/7f/+p9wCOekEUOz3jBK97wbsP5FXq+fp9SJShFGQIo9znfU2hvBW2VqEI1alDrot6w+n0/1NEWRD1CaECji3qN94Ok+QElPYbbgBAAAA==
+ </data>
+ </layer>
<layer name="walls" width="44" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC+3WOwqAMBCE4bmCLzSNNur9j2gCVkGQDQy7gflhuhRfmpAEIHWyEX11eQOMyctNXm7yciveyXF7g9ezw3g+mnfOu98tH+ejef8q3gF+/5ezwWu9o2fycovurd+L6N46ebnJy614V/j+0Szb8h5s7e+9gBAAAA==
+ H4sIAAAAAAAAC+3WuwqAMBBE0fEFmkor9f9/1ASsgiAbGHYDc2G6FCdNSAKQOtmIvrq8Acbk5SYvN3m5Fe/kuL3B69lhPB/NO+fd75aP89G8fxXvAL//y9ngtd7RM3m5RffW70V0b5283OTlVrwrfP9olm15D3yZ9H2AEAAA
</data>
</layer>
<objectgroup name="objects" width="44" height="24">
<object name="ironCane" x="26" y="372" width="80" height="80"/>
+ <object type="Spider" x="21" y="337" width="366" height="120"/>
+ <object type="Spider" x="154" y="297" width="373" height="161"/>
+ <object type="Spider" x="389" y="298" width="470" height="162"/>
+ <object type="Spider" x="227" y="285" width="475" height="175"/>
+ <object type="Bat" x="192" y="58" width="663" height="19"/>
+ <object type="Bat" x="339" y="117" width="503" height="38"/>
+ <object type="Snake" x="222" y="137" width="408" height="40"/>
+ <object type="Spider" x="51" y="284" width="407" height="176"/>
+ <object type="Spider" x="19" y="279" width="773" height="180"/>
+ <object type="Spider" x="643" y="27" width="215" height="423"/>
+ <object type="Spider" x="11" y="156" width="627" height="304"/>
</objectgroup>
</map>
View
22 resources/cave09.tmx 100755 → 100644
@@ -4,19 +4,23 @@
<property name="bottomPortal" value="resources/cave10.tmx"/>
<property name="topPortal" value="resources/cave07.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAA+3V1w3CMBRA0ZcFAiOFMgLsQGAFyiKUDagbUDegLsNFwB8WSWT7RUosnb/oXTlyYhG7q/mH61X289mPUFPst9BW7Gu//z4Gin3t/Rel//rG6mgo9W3sP0YXPcOM71keYpSgmbafdbatfpa5Y0wwxcxjf44FllhhjY3H/hY77HHAEacfz0WS/P5J0z/jgituuOPhcf95OX8mYSBS+agGdvqul6nbkfe/Savv4g5/Aih5nikADAAA
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgoB6QJ0KNKhXtG7V/1P6hYL8IEKsBsegA2Y8MRu0ftR8fEARiSTKxCgNqWifHfmL8QAkYtX/UfnrbT0r5Pxz9Tw37kcNQFoiFycQSZNqPDAZ7GU4KAADF9o8RAAwAAA==
+ H4sIAAAAAAAAA2NgoB4QJEKNBBXtG7V/1P6hYD8LEEsCMesA2Y8MRu0ftR8fYARiLjKxOANqWifHfmL8QAkYtX/UfnrbT0r5Pxz9Tw37kcOQH4iZycScZNqPDAZ7GU4KAACw/rGmAAwAAA==
</data>
</layer>
- <objectgroup name="objects" width="32" height="24"/>
+ <objectgroup name="objects" width="32" height="24">
+ <object type="Spider" x="256" y="296" width="297" height="119"/>
+ </objectgroup>
</map>
View
20 resources/cave10.tmx 100755 → 100644
@@ -4,21 +4,25 @@
<property name="rightPortal" value="resources/cave11.tmx"/>
<property name="topPortal" value="resources/cave09.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAA+3VuQrCUBBG4Xk0N1A7F9BC7dxTRDuN2wu4vLIHbESDE4LJ39yBrz4w3MXsexqOokfdr6Eu7A8wFPbV+18jEvbPuAj76v2Hfuh/OuJkr7uh6HuWWJn/dmTZZZ7++35+vR1Z+t7/809p4/0/Rfc76KKHvqA/xQxzLNBEC+2S+jvskeCAEcaYlNS/4oY7HoixwTZno4KqpZ/rMNp5AkCs1/4ADAAA
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgQAXyDISBKhFqyAWj9o/aLwLEakAsOkD2EwKj9o/aT2/7kfPEQPtfGYglqYTJsZ+WYNT+gbefUPlPa/sHEox0+8WBWJiOeKQDACW0ZEIADAAA
+ H4sIAAAAAAAAA2NgQAWCDISBBBFqyAWj9g+8/SxALAnErANkPyEwav+o/SPNfuQ8OdD+FwNiLiphcuynJRi1f+DttwRiKyC2BmKbAbB/IMFIt58DiJnpiEc6AAAOJtOrAAwAAA==
</data>
</layer>
<objectgroup name="objects" width="32" height="24">
<object name="grayWall" x="320" y="260" width="80" height="160"/>
+ <object type="Spider" x="186" y="279" width="300" height="137"/>
+ <object type="Bat" x="124" y="119" width="50" height="203"/>
</objectgroup>
</map>
View
24 resources/cave11.tmx 100755 → 100644
@@ -5,19 +5,25 @@
<property name="leftPortal" value="resources/cave10.tmx"/>
<property name="topPortal" value="resources/cave12.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAC92VOQ7CMBBFJwcCrpAQCiiAhqWBHkEDPftSAC3rDVjvyLdQFBTwEolxEF96RSTHLzPyOETvyRnAmV/3u8z+LPAV/gqzX1d/i9m/BweFv8/sv4Kbwp/0+ft3fx4UJF4XeMz+BmhK/GL2qsz+LuhJ/Db6PwcLiVfM3uCLLrHnBmzBjsLZP0r8n75lCEaatWMwAVMwi/hP4AwuFM7+3cAfh2iNr34bRGu07ZedX9WaIiiBckL+lEOUBhlH/0/m8HvCC3xQw3Pdkt+l5x27BCuwBm3QMdg3eFfXL87EqZ8jJr3ijMl9GOQBvRDS6wAMAAA=
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgQAXyDMQBVSLVkQpG7R+1XwSI1aBYdADsJwaM2j9qPz3tR88T1LJfEg2rEKlPGYteUrAQldxPLqBV/I3aP3zsJ6YeoqX9tASDxX5hKmM5htH2Ayn2AwD8wCmfAAwAAA==
+ H4sIAAAAAAAAC2NgQAWCDMQBCSLVkQpG7R94+1mAWBKKWQfAfmLAqP2j9o8k+9HzJLXs50LD4kTqE8OilxTMRCX3kwtoFX+j9lPPfkUgVgJi5QGyn5Zg1H4IYKYyFmAYbb+QYj8AyPRJZgAMAAA=
</data>
</layer>
- <objectgroup name="objects" width="32" height="24"/>
+ <objectgroup name="objects" width="32" height="24">
+ <object type="Spider" x="203" y="314" width="285" height="102"/>
+ <object type="Spider" x="259" y="271" width="180" height="146"/>
+ <object type="Bat" x="144" y="128" width="42" height="181"/>
+ </objectgroup>
</map>
View
20 resources/cave12.tmx 100755 → 100644
@@ -3,21 +3,23 @@
<properties>
<property name="bottomPortal" value="resources/cave11.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAC+3VOW7CUBSF4ccG4iyJAEsAsYVIbIEhTDtg7EhoIEMXoCOhY+gYOggdkF3wIxthISx8ZVtufKSvub56R7I8KBUkSJAglxRRQhkxpJFBFjljZscL8igI++tooCnouqWCKmrC/g984sthfwddvAv7nXRa8bM/7HN/3IP+Fl7xhrYxG+IHvxiZdp896P9GD30MjNkcCyyxMu2mPegfY4IpZsZshz0O+L/alyRqo3+NDf6wtbEvSdLGeV6+fymf+yXf+HvCeBL23zvzIaSUhseQfnZE6c/Mea6Zrp/e/YTL/dL7KY1Vp/k/7FaOCf9d4QAMAAA=
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgGAWjYBQMFiAIxJI0wEJE2i9PJX+gA9VR+0ftH7V/1P5R+0ftH4L2iwCxGhSLArEsEAuTgCUotB8dEOsfQgAAx7C3lAAMAAA=
+ H4sIAAAAAAAAC2NgGAWjYBQMFsAIxFw0wExE2i9IJX+gA4lR+0ftH7V/1P5R+0ftH4L2swCxJBSzAjE/EDOTgDkptB8dEOsfQgAAWosRRgAMAAA=
</data>
</layer>
<objectgroup name="objects" width="32" height="24">
- <object name="skull1" x="384" y="343" width="92" height="87"/>
+ <object name="skull1" x="394" y="389" width="39" height="37"/>
</objectgroup>
</map>
View
22 resources/cave13.tmx 100755 → 100644
@@ -4,22 +4,26 @@
<property name="rightPortal" value="resources/cave14.tmx"/>
<property name="topPortal" value="resources/cave11.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAC+XWP04CQRTH8TkaIAlQiM2CBVCIDWoBFEIjUAAFeADxDGrvvyPw7wiAXkGk9FtIXMfdndmFdUh4yadgyctv8uaxQYjtV1xDmLXL+RFEDeZbyBjMNz3/Es4M5l+hYTDf9Pz/Iz+GA5/5bXTQFX/vqomW7blqh7I49siOOPTcYIBbxbl1dkjVbzn03OEeDxr9qjuU5+X0G/R7Zj/5OvOTy21fHvGE54Bn9GK/Q7d9GWKEcQj59hleuHw/wxyLkPO99iVM69J5ZwR1iDSOvj8nkZLyVe+MTZygiFMkXPLPxe8deMHrlvIvUUMdOeRRkPI/sMQnVphgije8i5//TX7uad3TQx/XKKOCqpS/r/UFG+XDagAMAAA=
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgoC6QJ1KdKpXtHbV/cNsvAsRqUCw6APajg1H7B4/9gkAsSQYWopL9xOrBZ8Zgsh+W10QHyH5S9ZJrvzIDZppQIVEvJfZTC4zaP2o/LQGh8mC4+58QEAdi4QHCAw0AXwfi9AAMAAA=
+ H4sIAAAAAAAAC2NgoC4QJFKdBJXtHbV/cNvPAsSSUMw6APajg1H7B4/9skAsD8RyJNIKVLJfhUg96MCUSvZrk2m/Hg77YXmNlUj7h6r/1RgQaYELisWJ1CsGVQ8C5PqfWoBc/1MLjPqftkARiJWAWBmH/HD3PyEw0P43AmITIDamgGYmEw80AAAGAdBfAAwAAA==
</data>
</layer>
<objectgroup name="objects" width="32" height="24">
- <object name="skull2" x="46" y="354" width="80" height="80"/>
+ <object name="skull2" x="71" y="390" width="31" height="31"/>
<object name="redWall" x="320" y="280" width="80" height="160"/>
+ <object type="Snake" x="126" y="391" width="177" height="46"/>
+ <object type="Spider" x="409" y="332" width="220" height="106"/>
</objectgroup>
</map>
View
25 resources/cave14.tmx 100755 → 100644
@@ -5,19 +5,26 @@
<property name="leftPortal" value="resources/cave13.tmx"/>
<property name="topPortal" value="resources/cave15.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAC83WzW4BURiA4TO7ou4A1QsoLe3e30otSW9hmt6Cv1rQpQVd+9m01lq3oNwCdSt9RSaxmDmOieP0S55E4mTeMHwIoT4FBTonb7j/ZLj/IulmkNXcb0j653j9sq6NZ4P9KmoG+85nwGS/bLhva+7nhHwHVTX3Te/f/7z//PbrYrfXanuP3b7Xbs/J9oDb+SZe0drrq9zTU+mhj3eF/gBDjDA+Uf8Dn5go9Kf4wjdmGt6LQ/05frDA0uNMEY8oaeivsMYvNh5nbiwhEkjiAgEEEcIlwpb/vkxG7P5rZLl+DnlEEEUMV4jj2mffub7Xvt3+zlTQRgdvuKV1hxTSuMeDQl/HHHP/dUxXgTN/C3jx3gAMAAA=
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgIA7IE6lOlUh1pIJR+wen/SJArAbFogNgPzoYtX/U/uFqPyyviQ6Q/cQAUu2XJBKrEGmeMpHmCZHoTmoDWsXTqP0jx35iygNa2k8JGCz2C1MZyzFgtonw2U9tQGo5DQDqvFc+AAwAAA==
+ H4sIAAAAAAAAC2NgIA4IEqlOgkh1pIJR+wen/SxALAnFrANgPzoYtX/U/uFqPyyvsQ6Q/cQAUu3nIhKLE2meGJHmMZHoTmoDWsXTqP30s18RiJWAWHmA7KcEjNoPAcxUxgIMmG0ifPZTG5BaTgMA5SuMSgAMAAA=
</data>
</layer>
- <objectgroup name="objects" width="32" height="24"/>
+ <objectgroup name="objects" width="32" height="24">
+ <object type="Spider" x="57" y="366" width="413" height="72"/>
+ <object x="411" y="419" width="1"/>
+ <object type="Spider" x="186" y="305" width="210" height="132"/>
+ <object type="Bat" x="284" y="38" width="53" height="299"/>
+ </objectgroup>
</map>
View
20 resources/cave15.tmx 100755 → 100644
@@ -3,22 +3,24 @@
<properties>
<property name="bottomPortal" value="resources/cave14.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAC+3Utw3CQABG4WMBYCREmgCBYAIDK5g4A1AQW6AgbkDcgLgMr3BxsoTDGZvmfulrLJ+fG1sIPT09PT231VBHVmKigSZa1jUDVet++5k2Ougq9OWGE/md7Gd66GOg0HfrejHHAss/9WWq/SFGGGOCKWYR9ldYY4MtdthH2D/giBPOuODqo5tDPkD/hjseeOKFt0MvHhMiYUmizLVKgP43KYVn/rJfCLmfRsahb4TcL6Lk0DdD7ofxTfmZl/+/330A1ALKJgAMAAA=
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgGAWjYBSMgsENBIFYkspYiAT75anhCTSgOmr/qP2j9g8r+2WBWJhILEED+0nxEylg1H4GBhEgVoNi0QGwnxhAqv0A6Ms0aQAMAAA=
+ H4sIAAAAAAAAC2NgGAWjYBSMgsENGIGYi8qYiQT7BanhCTQgMWr/qP2j9g8r+/mBmJlIzEkD+0nxEylg1H4GBhYgloRi1gGwnxhAqv0A606OiAAMAAA=
</data>
</layer>
<objectgroup name="objects" width="32" height="24">
- <object name="skull3" x="520" y="260" width="80" height="80"/>
+ <object name="skull3" x="545" y="295" width="40" height="35"/>
<object name="grayWall" x="420" y="200" width="80" height="160"/>
</objectgroup>
</map>
View
18 resources/cave16.tmx
@@ -4,18 +4,20 @@
<property name="bottomPortal" value="resources/cave17.tmx"/>
<property name="topPortal" value="resources/cave14.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAC8VWQQ7CIBDkfeob1Deob1CP0n6h1W+6HEjIZJaFpsAmk7RQdjrbYalz+8cHsJCxlhHyr4QzwHfgT/V6x2vRMpju3vVPtcYaTIJZ8O3EP1p/BPNia3703Sj9+B499t/W72+twT6mRfB49HrNWqzR1h7WSn+ph9izqZYls46dFTgWc+X4WZ4a/db+KYVXri1+Kxfqs/SW6kfPaR7MzWtnntX/UQeeG1Olxr38fxAcBadCnViX0v6v8Z8FF8GV8GzBmuFnHrsJ7oIHycXexStz6T2L9DtHn/wET8FL8CbPsDXW3tH49wrs/yP+fzXg/+cfeDf9PAAMAAA=
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgoC6QJ1KdKpXtHbV/1H5C9osAsRoQiw6Q/chg1H5UIAjEkiRiISraT6w+fGYMFvuR0/lA2E+OXnLsV2bATBMqdLSfEjBqP/3tx1f+jwT/j9qP235xIBamApYj035qAVLLfwBxe1yBAAwAAA==
+ H4sIAAAAAAAAC2NgoC4QJFKdBJXtHbV/1H5C9rMAsSQQsw6Q/chg1H5UwAjEXCRiJiraT6w+fGYMFvuR0/lA2E+OXnLsF2PATBPidLSfEjBqP/3tx1f+jwT/j9qP234OIGamAhYg035qAVLLfwAmo+PLAAwAAA==
</data>
</layer>
<objectgroup name="objects" width="32" height="24">
View
20 resources/cave17.tmx 100755 → 100644
@@ -3,22 +3,24 @@
<properties>
<property name="topPortal" value="resources/cave16.tmx"/>
</properties>
- <tileset firstgid="1" name="tiles_cave_bg" tilewidth="20" tileheight="20">
- <image source="tiles_cave_bg.png" width="80" height="80"/>
+ <tileset firstgid="1" name="tiles_cave" tilewidth="20" tileheight="20">
+ <image source="tiles_cave.png" width="140" height="180"/>
</tileset>
- <tileset firstgid="17" name="tiles_cave" tilewidth="20" tileheight="20">
- <image source="tiles_cave.png" width="120" height="80"/>
- </tileset>
- <tileset firstgid="41" name="cave_beach_bg" tilewidth="20" tileheight="20">
- <image source="cave_beach_bg.png" width="640" height="200"/>
+ <tileset firstgid="64" name="cave_background" tilewidth="20" tileheight="20">
+ <image source="cave_background.png" width="400" height="260"/>
</tileset>
+ <layer name="background" width="32" height="24">
+ <data encoding="base64" compression="gzip">
+ H4sIAAAAAAAAC+1WQRLCIAyEB6lvUG/qu9SjtV+g+k3TUUbMZEOwUi5mZqeUQjYJC8W539uFMLyeCDWNc4Wk3c3MH/l4PWrzpzlLtajNL+FOuBL6GfmRDmvzx3Xn7Rb6b73/WuhP2vO5/NHYAL4hu7m31kvqz8dI2o19QeGX+FJfXcE8VBMt/2/1l/tv8DMtx6/5ssSNzlBUD21eOmcw8k+FFifi53GivhyPVIPc+T+Osewd5D9357DkvyPsCQfAYUUai+QH8S+8c0vCyuv5Iv/WmBH/mng3hK23ab1Uf9r9a1z7I+FEOLtPLfQT3/m3vz3tAQ6JDMoADAAA
+ </data>
+ </layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAC2NgoC6QJ1KdKpXtHbV/1H5C9osAsRoQiw6Q/chg1H5UIAjEkiRiISraT6w+fGYMFvuR0/lA2E+OXnLsV2bATBMqdLSfEjBqP/3tx1f+jwT/j9qP235xIBamI5agmc9IAwCyPPoUAAwAAA==
+ H4sIAAAAAAAAC2NgoC4QJFKdBJXtHbV/1H5C9rMAsSQQsw6Q/chg1H5UwAjEXCRiJiraT6w+fGYMFvuR0/lA2E+OXnLsF2PATBPidLSfEjBqP/3tx1f+w+xXBGIlIFamsVtGYvgPZvs5gJiZjpiTZj4jDQAAv1f5UwAMAAA=
</data>
</layer>
<objectgroup name="objects" width="32" height="24">
<object name="redWall" x="320" y="280" width="80" height="160"/>
- <object name="skull5" x="60" y="360" width="80" height="80"/>
+ <object name="skull5" x="113" y="318" width="29" height="29"/>
</objectgroup>
</map>
View
BIN resources/cave_background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/cave_beach_bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/damage.mp3
Binary file not shown.
View
BIN resources/damage.ogg
Binary file not shown.
View
BIN resources/damage.wav
Binary file not shown.
View
BIN resources/heart.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/hearts.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/hit.mp3
Binary file not shown.
View
BIN resources/hit.ogg
Binary file not shown.
View
BIN resources/hit.wav
Binary file not shown.
View
BIN resources/jump.mp3
Binary file not shown.
View
BIN resources/jump.ogg
Binary file not shown.
View
BIN resources/jump.wav
Binary file not shown.
View
6 resources/level0.tmx
@@ -12,20 +12,20 @@
</tileset>
<layer name="background" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAA+3PRWwVYRQG0HnF3dvi7i1W966xBU7QNe5ua9zd1rgGgm9xd3d3dw5JVyQkb9HlfMnJPzP55t6ZIAgTJkyYMGHCFEZiI0EQR3ykcOcmmJf4n5lJnieTQipppJNBJllkk0MueeRH+X3t9TrQkU50/ue9Lu670o3u9KAnvehd0O3j7Es/+jOAgVHuH6Q3mCEMZRjDGcFIRjGaMYxlHOOZwEQmMZkpTGUa05kR5f6ZerOYzRzmMo/5LGAhi1jMEpayjOWsYCWrWM0a1rKO9VHu36C3kU1sZgtb2cZ2drCTXewumLnHubfgep9zPwc4yCEOcySK/Ud1jnGcE5zkFKc5w1nOcZ4LXOQSl7nCVa5xnRvc5Ba3ucNd7nGfBzzkEY95wlOe8ZwXvOQVr3nDW97xng985BOf+cJXvvGdH/zkF7///ntMEESIoQhFKUZxSlCSUpSmDGUpR3kqUJFKVKYKValGLHHEU50a1KQWtalDXepRnwY0pBGNaUJTmtGcFrQkgURa0Zo2tKUdSSSTQipppJNBJllkk0MueeTzB4dcE98ADAAA
+ H4sIAAAAAAAAC+3QRWxVURAA0F/cXYq2uGuFUl9jC5ygOxLc3XYQ3N2CB9dA8LDD3d3d3Tkkf0FIaFiQbviTnMy9b+6dee8FAqEIRSjSOyKITKdZ8SSQSBLJpJCaTvNDEYr/KYqEBQJFCQ/7t32r61fjDz2jPI8mhljqEUd94kkgkSSSSSH1L9+vgXMNaURjmvx2r6l9M5rTgpa0ojVtgmfbyu1oTwc60imN+Z1/qXWx7ko3utODnvSiN33oSz/6M4CBDGIwQxjKMIYzgpGMSmP+aLUxwfpYeRzjmcBEJjGZKUxlGtOZwUxmMZs5zGUe81nAQhaxONh/ibyUZSxnBStZFayvltewlnWsZwMb2cRmtrCVbcE72+UdwfVOeRe72cNe9rE/WD+Qxn84qHaIwxzhKMc4zglOcorTnOEs5zjPBS5yictc4SrXuM4NbnKL29zhLve4zwMe8ojHPOEpz3jOC17yite84S3veM8HPvKJz3zhK9/4/vObMwQCYWQgI5nITBayko3s5CAnuchNHvKSj/wUoCCFKEwRihJOMYpTgpKUojQRRFKGspSjPBWoSCUqU4WqVKM6NahJLWpTh7pEEU0MsdQjjvrEk0AiSSSTQio/ACiFij4ADAAA
</data>
</layer>
<layer name="walls" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAA+3Otw2AQBQE0Q8htAL914Tn8B6mhAtAItiRXrbBmimllFJKKfWfssAsR4ESFWo0aOHQoceAERNmLFixYceBExduWOj3IWIXe26/LOFD+vKPB/ta7xsADAAA
+ H4sIAAAAAAAAC+3PORKCUBBF0f6GshXd/wKUYSsKKiAzCFx38AMpAt+tOlkHr82UUkoppdQ/dnFmV4SIECNxe68yu7HhjhQZHnjihRwFSrxRoUaDFh16DBgx4YMZy/e3g9+GI3eB5+2Wndhw/vGOFc78M/oADAAA
</data>
</layer>
<objectgroup name="objects" width="32" height="24">
<object name="Spawn" x="190" y="312" width="80" height="80"/>
</objectgroup>
<layer name="foreground" width="32" height="24">
<data encoding="base64" compression="gzip">
- H4sIAAAAAAAAA+3TxUqFARSF0ct9OcXu7u7uxsbGBBNMMMF8PZcP4PSM/g1r/I12KpUsWbLoZaRTqcx0TCtLJ5sccskjn4KAfqFGEcWUUEoZ5VQE9Cs1qqimhlrqqKchoN+o0UQzLbTSRjsdAf1OjS666aGXPvoZCOgPagwxzAijjDHOREB/UmOKaWaYZY55FoL+t6izxDIrrLLGelB/Q2eTLbbZYZe9oP6+zgGHHHHMSVD7b6daZ5xzwSVXgf1rrRtuueOeh8D+o9YTz7zwyltg/13rg0+++OYnsJ/s//0CJVGG9AAMAAA=
+ H4sIAAAAAAAAC+3W1UpFQRiA0cN5M7u7u7u7AxsbE0wwwQTz9Vygr+CgcH5YDOyL+W6G2ROJxOY/TVw0EokngcTo97ckazIppEZ/t59m/3QyyPxpZVmzySH3l/ux+V+T5zzkU0AhRRRTQmmAs1KmUU4FlVRRTQ21Afp1GvU00EgTzbTQGqDfptFOB5100U0PvQH6fRr9DDDIEMOMMBqgP6YxzgSTTDHNDLOB7qo5nXkWWGSJZVYC9Vd11lhng0222A7U39HZZY99DjgM+J840jrmhFPOOA/Yv9C65IprbrgN2L/TuueBR554Dth/0XrljXc++Iy9E/7EfAGqL9YwAAwAAA==
</data>
</layer>
</map>
View
BIN resources/lose.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/pick.mp3
Binary file not shown.
View
BIN resources/pick.ogg
Binary file not shown.
View
BIN resources/pick.wav
Binary file not shown.
View
BIN resources/skull0.PNG 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/skull1.PNG 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/skull2.PNG 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/skull3.PNG 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/skull4.PNG 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/skull5.PNG 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/sleepingSailor.png
Deleted file not rendered
View
0 resources/snake.plist 100644 → 100755
File mode changed.
View
0 resources/snake.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 resources/spider.plist 100644 → 100755
File mode changed.
View
0 resources/spider.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/tiles.png
Deleted file not rendered
View
BIN resources/tiles_cave.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/tiles_cave_bg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/title.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/win.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
4 src/AppDelegate.js
@@ -1,4 +1,4 @@
-require(['cocos2d', 'scenes/GameScene'], function(cc, GameScene) {
+require(['cocos2d', 'scenes/IdleScene'], function(cc, IdleScene) {
'use strict';
cc.AppDelegate = cc.Application.extend({
@@ -21,7 +21,7 @@ require(['cocos2d', 'scenes/GameScene'], function(cc, GameScene) {
director.setDisplayFPS(true);
director.setAnimationInterval(1.0 / 60);
- var scene = GameScene.scene();
+ var scene = IdleScene.create('Click to start', 'resources/title.png');
director.runWithScene(scene);
return true;
View
4 src/actors/Bat.js
@@ -59,6 +59,10 @@ define(['cocos2d', 'actors/Enemy'], function (cc, Enemy) {
this.runAction(cc.RepeatForever.create(run));
+ },
+
+ collisionBox: function() {
+ return cc.RectMake(this.getPosition().x - 14, this.getPosition().y, 28, 20);
}
});
View
23 src/actors/Darwin.js
@@ -5,6 +5,7 @@ define(['cocos2d'], function (cc) {
/** @const */ var ANIMATION_TAG = 1;
/** @const */ var HIT_DISTANCE = 58;
/** @const */ var HIT_DISTANCE_SQR = HIT_DISTANCE * HIT_DISTANCE;
+ /** @const */ var MAX_LIVES = 6;
var Darwin = cc.Sprite.extend({
ctor:function () {
@@ -51,7 +52,7 @@ define(['cocos2d'], function (cc) {
this.xAccel = 0;
this.onGround = false;
this.attacking = false;
- this.lives = 3;
+ this.lives = MAX_LIVES;
this.regenerating = false;
this.setAnchorPoint(cc.ccp(0.5, 0));
this.playAnimation(this.idleAnimation);
@@ -73,8 +74,7 @@ define(['cocos2d'], function (cc) {
collisionBox:function () {
var pos = this.getPosition();
- var size = this.getContentSize();
- return cc.RectMake(pos.x - 15, pos.y, 30, size.height);
+ return cc.RectMake(pos.x - 11, pos.y, 22, 69);
},
moveRight:function () {
@@ -128,6 +128,7 @@ define(['cocos2d'], function (cc) {
jump:function () {
if (this.onGround) {
+ cc.sharedEngine.playEffect('resources/jump');
this.velocity.y = 330;
this.onGround = false;
this.stopAnimation();
@@ -141,6 +142,7 @@ define(['cocos2d'], function (cc) {
if (this.attacking) {
return;
}
+ cc.sharedEngine.playEffect('resources/hit');
this.attacking = true;
this.runAction(cc.Sequence.create(
cc.Animate.create(this.attackAnimation),
@@ -150,9 +152,9 @@ define(['cocos2d'], function (cc) {
));
},
- hitIfPossible:function (object) {
+ hitIfPossible:function (object, layer) {
if (this.isHitPossible(object)) {
- object.hit();
+ object.hit(layer);
}
},
@@ -170,7 +172,7 @@ define(['cocos2d'], function (cc) {
yAligned: function(object) {
var myCB = this.collisionBox();
var otherCB = object.collisionBox();
- var myMin = cc.Rect.CCRectGetMinY(myCB),
+ var myMin = cc.Rect.CCRectGetMinY(myCB) + 35,
myMax = cc.Rect.CCRectGetMaxY(myCB),
otherMin = cc.Rect.CCRectGetMinY(otherCB),
otherMax = cc.Rect.CCRectGetMaxY(otherCB);
@@ -190,6 +192,7 @@ define(['cocos2d'], function (cc) {
},
hit: function() {
+ cc.sharedEngine.playEffect('resources/damage');
this.regenerating = true;
this.lives--;
this.runAction(cc.Sequence.create(
@@ -198,9 +201,17 @@ define(['cocos2d'], function (cc) {
this.regenerating = false;
})
));
+ },
+
+ heal: function() {
+ if (this.lives < MAX_LIVES) {
+ this.lives++;
+ }
}
});
+ Darwin.MAX_LIVES = MAX_LIVES;
+
Darwin.create = function () {
return new Darwin();
};
View
16 src/actors/Enemy.js
@@ -1,4 +1,4 @@
-define(['cocos2d'], function (cc) {
+define(['cocos2d', 'actors/Heart'], function (cc, Heart) {
'use strict';
var Enemy = cc.Sprite.extend({
loadMapObject:function (mapObject) {
@@ -28,7 +28,7 @@ define(['cocos2d'], function (cc) {
return this.boundingBox();
},
- hit:function () {
+ hit:function (layer) {
if (this.dead) {
return;
}
@@ -39,8 +39,20 @@ define(['cocos2d'], function (cc) {
cc.Blink.create(1, 3),
cc.CallFunc.create(this, function () {
this.removeFromParentAndCleanup(true);
+ this.produceHeart(layer);
})
));
+ },
+
+ produceHeart:function (layer) {
+ var rnd = Math.floor(Math.random() * 10);
+ if (rnd === 1) {
+ var heart = Heart.create();
+ heart.setPosition(this.getPosition());
+ layer.map.addChild(heart, layer.objectsZ);
+ layer.items.push(heart);
+ }
+
}
});
View
42 src/actors/Heart.js
@@ -0,0 +1,42 @@
+define(['cocos2d'], function (cc) {
+ 'use strict';
+
+ var Heart = cc.Sprite.extend({
+ initHeart: function() {
+ this.initWithFile('resources/heart.png');
+ this.setAnchorPoint(cc.ccp(0.5, 0));
+ this.collected = false;
+ return true;
+ },
+
+ collisionBox: function() {
+ return this.boundingBox();
+ },
+
+ collect: function(gameLayer) {
+ if (this.collected) {
+ return;
+ }
+ cc.sharedEngine.playEffect('resources/pick');
+ this.collected = true;
+ var winSize = cc.Director.sharedDirector().getWinSize();
+ this.runAction(cc.Sequence.create(
+ cc.MoveTo.create(0.5, cc.ccp(-this.getContentSize().width / 2,
+ winSize.height + this.getContentSize().height / 2)),
+ cc.CallFunc.create(this, function() {
+ gameLayer.player.heal();
+ this.removeFromParentAndCleanup(true);
+ })
+ ));
+ }
+ });
+
+ Heart.create = function() {
+ var node = new Heart();
+ if (node && node.initHeart()) {
+ return node;
+ }
+ throw new Error('Unable to initialize heart');
+ };
+ return Heart;
+});
View
8 src/actors/Skull.js
@@ -6,6 +6,7 @@ define(['cocos2d'], function (cc) {
this.name = mapObject.name;
this.initWithFile('resources/' + mapObject.name + '.png');
this.setPosition(cc.ccp(mapObject.x, mapObject.y));
+ this.collected = false;
return true;
},
@@ -14,6 +15,11 @@ define(['cocos2d'], function (cc) {
},
collect: function(gameLayer) {
+ if (this.collected) {
+ return;
+ }
+ cc.sharedEngine.playEffect('resources/pick');
+ this.collected = true;
gameLayer.skulls.push(this.name);
var winSize = cc.Director.sharedDirector().getWinSize();
this.runAction(cc.Sequence.create(
@@ -32,6 +38,6 @@ define(['cocos2d'], function (cc) {
return node;
}
throw new Error('Unable to initialize skull');
- }
+ };
return Skull;
});
View
4 src/actors/Spider.js
@@ -31,10 +31,10 @@ define(['cocos2d', 'actors/Enemy'], function (cc, Enemy) {
beginMoving:function (mapObject) {
var duration = mapObject.width / SPEED;
- var jumps = Math.floor(mapObject.width / JUMP_LENGTH);
+ var jumps = Math.ceil(mapObject.width / JUMP_LENGTH);
var jumpAction = cc.JumpBy.create(duration,
cc.ccp(-mapObject.width, 0),
- mapObject.y + mapObject.height,
+ mapObject.height,
jumps);
var run = cc.Sequence.create(
View
46 src/layers/GUILayer.js
@@ -0,0 +1,46 @@
+define(['cocos2d', 'actors/Darwin'], function (cc, Darwin) {
+ 'use strict';
+ var GUILayer = cc.Layer.extend({
+ init: function() {
+ var winSize = cc.Director.sharedDirector().getWinSize();
+ this.lives = cc.ProgressTimer.create('resources/hearts.png');
+ this.lives.setType(cc.CCPROGRESS_TIMER_TYPE_HORIZONTATAL_BAR_LR);
+ this.lives.setAnchorPoint(cc.ccp(0, 1.0));
+ this.lives.setPercentage(100);
+ this.lives.setPosition(cc.ccp(5, winSize.height - 5));
+ this.addChild(this.lives);
+
+ var skull = cc.Sprite.create('resources/skull5.png');
+ skull.setAnchorPoint(cc.ccp(1, 1));
+ skull.setPosition(cc.ccp(winSize.width - 60, winSize.height - 5));
+ this.addChild(skull);
+
+ this.skullCount = cc.LabelTTF.create('0/6', 'Press Start 2P', 15);
+ this.skullCount.setAnchorPoint(cc.ccp(0, 0.5));
+ this.skullCount.setPosition(cc.ccp(winSize.width - 55,
+ skull.getPosition().y - skull.getContentSize().height / 2));
+ this.addChild(this.skullCount);
+
+
+ return true;
+ },
+
+ setLives: function(lives) {
+ this.lives.setPercentage(lives / Darwin.MAX_LIVES * 100);
+ },
+
+ setSkulls: function(skulls) {
+ this.skullCount.setString(skulls + '/6');
+ }
+ });
+
+ GUILayer.create = function() {
+ var node = new GUILayer();
+ if (node && node.init()) {
+ return node;
+ }
+ throw new Error('Unable to initialize node');
+ };
+
+ return GUILayer;
+});
View
141 src/main.js
@@ -1,78 +1,111 @@
require.config({
- paths: {
- 'cocos2d': '../lib/Cocos2d-html5-canvasmenu',
- 'domReady': '../lib/domReady'
+ paths:{
+ 'cocos2d':'../lib/Cocos2d-html5-canvasmenu',
+ 'domReady':'../lib/domReady'
},
- shim: {
- 'cocos2d': {
- exports: 'cc'
+ shim:{
+ 'cocos2d':{
+ exports:'cc'
}
}
});
-require(['domReady', 'cocos2d', 'AppDelegate'], function(domReady, cc) {
+require(['domReady', 'cocos2d', 'scenes/PauseScene', 'AppDelegate'], function (domReady, cc, PauseScene) {
'use strict';
- domReady(function() {
+
+ var pauseGame = function () {
+ var scene = cc.Director.sharedDirector().getRunningScene();
+ if (scene && !scene.isPause) {
+ cc.Director.sharedDirector().pushScene(PauseScene.create());
+ }
+ };
+
+ var unpauseGame = function () {
+ var scene = cc.Director.sharedDirector().getRunningScene();
+ if (scene && scene.isPause) {
+ cc.Director.sharedDirector().popScene();
+ }
+ };
+
+ var setupFocusEvents = function (canvas) {
+ canvas.addEventListener('blur', pauseGame, false);
+ canvas.addEventListener('focus', unpauseGame, false);
+ };
+
+ domReady(function () {
cc.setup("gameCanvas");
- cc.AudioManager.sharedEngine().init("mp3,ogg");
+ cc.AudioManager.sharedEngine().init("mp3,ogg,wav");
var loader = cc.Loader.shareLoader();
- loader.onloading = function() {
+ loader.onloading = function () {
cc.LoaderScene.shareLoaderScene().draw();
};
- loader.onload = function() {
+ loader.onload = function () {
+ var canvas = document.getElementById('gameCanvas');
+ setupFocusEvents(canvas);
+ canvas.focus();
cc.AppController.shareAppController().didFinishLaunchingWithOptions();
};
loader.preload([
- {type: 'image', src: 'resources/beach_bg.png'},
- {type: 'image', src: 'resources/beach_fg.png'},
- {type: 'image', src: 'resources/jungle_bg.png'},
- {type: 'image', src: 'resources/jungle_fg.png'},
- {type: 'image', src: 'resources/sleepingSailor.png'},
- {type: 'image', src: 'resources/tiles.png'},
- {type: 'image', src: 'resources/tiles2.png'},
- {type: 'image', src: 'resources/tiles_cave.png'},
- {type: 'image', src: 'resources/tiles_cave_bg.png'},
- {type: 'image', src: 'resources/cave_beach_bg.png'},
- {type: 'image', src: 'resources/skull0.png'},
- {type: 'image', src: 'resources/skull2.png'},
- {type: 'image', src: 'resources/skull3.png'},
- {type: 'image', src: 'resources/skull4.png'},
- {type: 'image', src: 'resources/skull5.png'},
+ {type:'image', src:'resources/beach_bg.png'},
+ {type:'image', src:'resources/beach_fg.png'},
+ {type:'image', src:'resources/jungle_bg.png'},
+ {type:'image', src:'resources/jungle_fg.png'},
+ {type:'image', src:'resources/tiles_cave.png'},
+ {type:'image', src:'resources/tiles_cave_bg.png'},
+ {type:'image', src:'resources/tiles2.png'},
+ {type:'image', src:'resources/cave_background.png'},
+ {type:'image', src:'resources/cave_beach_bg.png'},
+ {type:'image', src:'resources/skull0.png'},
+ {type:'image', src:'resources/skull2.png'},
+ {type:'image', src:'resources/skull3.png'},
+ {type:'image', src:'resources/skull4.png'},
+ {type:'image', src:'resources/skull5.png'},
+ {type:'image', src:'resources/hearts.png'},
+ {type:'image', src:'resources/title.png'},
+ {type:'image', src:'resources/win.png'},
+ {type:'image', src:'resources/lose.png'},
+ {type:'image', src:'resources/heart.png'},
+
+ {type:'plist', src:'resources/Darwin.plist'},
+ {type:'image', src:'resources/Darwin.png'},
- {type: 'plist', src: 'resources/Darwin.plist'},
- {type: 'image', src: 'resources/Darwin.png'},
+ {type:'plist', src:'resources/snake.plist'},
+ {type:'image', src:'resources/snake.png'},
+ {type:'plist', src:'resources/bat.plist'},
+ {type:'image', src:'resources/bat.png'},
+ {type:'plist', src:'resources/spider.plist'},
+ {type:'image', src:'resources/spider.png'},
- {type: 'plist', src: 'resources/snake.plist'},
- {type: 'image', src: 'resources/snake.png'},
- {type: 'plist', src: 'resources/bat.plist'},
- {type: 'image', src: 'resources/bat.png'},
- {type: 'plist', src: 'resources/spider.plist'},
- {type: 'image', src: 'resources/spider.png'},
+ {type:'tmx', src:'resources/level0.tmx'},
+ {type:'tmx', src:'resources/level1.tmx'},
+ {type:'tmx', src:'resources/cave00.tmx'},
+ {type:'tmx', src:'resources/cave01.tmx'},
+ {type:'tmx', src:'resources/cave02.tmx'},
+ {type:'tmx', src:'resources/cave03.tmx'},
+ {type:'tmx', src:'resources/cave04.tmx'},
+ {type:'tmx', src:'resources/cave05.tmx'},
+ {type:'tmx', src:'resources/cave06.tmx'},
+ {type:'tmx', src:'resources/cave07.tmx'},
+ {type:'tmx', src:'resources/cave08.tmx'},
+ {type:'tmx', src:'resources/cave09.tmx'},
+ {type:'tmx', src:'resources/cave10.tmx'},
+ {type:'tmx', src:'resources/cave11.tmx'},
+ {type:'tmx', src:'resources/cave12.tmx'},
+ {type:'tmx', src:'resources/cave13.tmx'},
+ {type:'tmx', src:'resources/cave14.tmx'},
+ {type:'tmx', src:'resources/cave15.tmx'},
+ {type:'tmx', src:'resources/cave16.tmx'},
+ {type:'tmx', src:'resources/cave17.tmx'},
- {type: 'tmx', src: 'resources/level0.tmx'},
- {type: 'tmx', src: 'resources/level1.tmx'},
- {type: 'tmx', src: 'resources/cave00.tmx'},
- {type: 'tmx', src: 'resources/cave01.tmx'},
- {type: 'tmx', src: 'resources/cave02.tmx'},
- {type: 'tmx', src: 'resources/cave03.tmx'},
- {type: 'tmx', src: 'resources/cave04.tmx'},
- {type: 'tmx', src: 'resources/cave05.tmx'},
- {type: 'tmx', src: 'resources/cave06.tmx'},
- {type: 'tmx', src: 'resources/cave07.tmx'},
- {type: 'tmx', src: 'resources/cave08.tmx'},
- {type: 'tmx', src: 'resources/cave09.tmx'},
- {type: 'tmx', src: 'resources/cave10.tmx'},
- {type: 'tmx', src: 'resources/cave11.tmx'},
- {type: 'tmx', src: 'resources/cave12.tmx'},
- {type: 'tmx', src: 'resources/cave13.tmx'},
- {type: 'tmx', src: 'resources/cave14.tmx'},
- {type: 'tmx', src: 'resources/cave15.tmx'},
- {type: 'tmx', src: 'resources/cave16.tmx'},
- {type: 'tmx', src: 'resources/cave17.tmx'}
+ {type:'bgm', src:'resources/bgm'},
+ {type:'effect', src:'resources/hit'},
+ {type:'effect', src:'resources/damage'},
+ {type:'effect', src:'resources/jump'},
+ {type:'effect', src:'resources/pick'}
]);
});
});
View
81 src/scenes/GameScene.js
@@ -1,13 +1,21 @@
-define(['cocos2d', 'actors/Darwin', 'actors/enemies', 'actors/Skull'], function (cc, Darwin, enemies, Skull) {
+define(['cocos2d',
+ 'require',
+ 'actors/Darwin',
+ 'actors/enemies',
+ 'actors/Skull',
+ 'layers/GUILayer'], function (cc, require, Darwin, enemies, Skull, GUILayer) {
'use strict';
/** @const */ var COLORS = {
SKY:cc.ccc4(188, 231, 241, 255),
- CAVE:cc.ccc4(0, 0, 0, 255),
- }
+ CAVE:cc.ccc4(0, 0, 0, 255)
+ };
+
+ /** @const */ var SKULLS_TO_WIN = 6;
var GameScene = cc.Layer.extend({
- init:function () {
+ init:function (gui) {
+ this.gui = gui;
this.background = cc.LayerColor.create(COLORS.SKY);
this.addChild(this.background);
this.player = new Darwin();
@@ -33,6 +41,16 @@ define(['cocos2d', 'actors/Darwin', 'actors/enemies', 'actors/Skull'], function
this.keys[key] = false;
},
+ onEnter:function () {
+ this._super();
+ cc.sharedEngine.playBackgroundMusic('resources/bgm', true);
+ },
+
+ onExit:function () {
+ this._super();
+ cc.sharedEngine.stopBackgroundMusic();
+ },
+
update:function (dt) {
if (this.keys[cc.KEY.right]) {
this.player.moveRight();
@@ -55,6 +73,7 @@ define(['cocos2d', 'actors/Darwin', 'actors/enemies', 'actors/Skull'], function
this.checkEnemiesHit();
this.checkPlayerHit();
this.checkItemsCollisions();
+ this.updateGUI();
this.checkPortals();
},
@@ -214,7 +233,7 @@ define(['cocos2d', 'actors/Darwin', 'actors/enemies', 'actors/Skull'], function
if (this.player.attacking) {
var self = this;
this.enemies.forEach(function (enemy) {
- self.player.hitIfPossible(enemy);
+ self.player.hitIfPossible(enemy, self);
});
}
},
@@ -231,6 +250,15 @@ define(['cocos2d', 'actors/Darwin', 'actors/enemies', 'actors/Skull'], function
}
}
});
+
+ if (this.player.lives <= 0) {
+ this.gameOver();
+ }
+ },
+
+ gameOver:function () {
+ var IdleScene = require('scenes/IdleScene');
+ cc.Director.sharedDirector().replaceScene(IdleScene.create('Click to restart', 'resources/lose.png'));
},
checkItemsCollisions:function () {
@@ -240,6 +268,15 @@ define(['cocos2d', 'actors/Darwin', 'actors/enemies', 'actors/Skull'], function
item.collect(self);
}
});
+ if (this.skulls.length === SKULLS_TO_WIN) {
+ var IdleScene = require('scenes/IdleScene');
+ cc.Director.sharedDirector().replaceScene(IdleScene.create('Click to play again', 'resource/win.png'));
+ }
+ },
+
+ updateGUI:function () {
+ this.gui.setLives(this.player.lives);
+ this.gui.setSkulls(this.skulls.length);
},
checkPortals:function () {
@@ -259,11 +296,18 @@ define(['cocos2d', 'actors/Darwin', 'actors/enemies', 'actors/Skull'], function
});
} else if (this.player.getPosition().y < 0) {
nextMap = this.map.propertyNamed('bottomPortal');
- this.changeMapAndPlacePlayer(nextMap, function (map, player) {
- var mapHeight = map.getMapSize().height * map.getTileSize().height;
- player.setPosition(cc.ccp(player.getPosition().x,
- mapHeight - 10));
- });
+ if (nextMap) {
+ this.changeMapAndPlacePlayer(nextMap, function (map, player) {
+ var mapHeight = map.getMapSize().height * map.getTileSize().height;
+ player.setPosition(cc.ccp(player.getPosition().x,
+ mapHeight - 10));
+ });
+ } else {
+ //die
+ cc.sharedEngine.playEffect('resources/damage');
+ this.gameOver();
+ }
+
} else if (this.player.getPosition().y > this.mapHeight()) {
nextMap = this.map.propertyNamed('topPortal');
this.changeMapAndPlacePlayer(nextMap, function (map, player) {
@@ -292,10 +336,13 @@ define(['cocos2d', 'actors/Darwin', 'actors/enemies', 'actors/Skull'], function
this.enemies = [];
this.items = [];
+ this.objectsZ = 1;
+ if (this.map.layerNamed('cave_background')) {
+ this.objectsZ = 2;
+ }
var objects = this.map.objectGroupNamed('objects');
var self = this;
objects.getObjects().forEach(function (objectData) {
- console.log(objectData);
var object;
var EnemyClass = enemies[objectData.type];
if (typeof EnemyClass !== 'undefined') {
@@ -308,32 +355,34 @@ define(['cocos2d', 'actors/Darwin', 'actors/enemies', 'actors/Skull'], function
}
}
if (object) {
- self.map.addChild(object, objectData.z);
+ self.map.addChild(object, self.objectsZ);
}
});
this.walls = this.map.layerNamed('walls');
this.addChild(this.map);
placeFn(this.map, this.player);
- this.map.addChild(this.player, 1);
+ this.map.addChild(this.player, this.objectsZ);
}
}
});
- GameScene.create = function () {
+ GameScene.create = function (gui) {
var node = new GameScene();
- if (node && node.init()) {
+ if (node && node.init(gui)) {
return node;
}
throw new Error('Unable to initialize scene');
};
GameScene.scene = function () {
var scene = cc.Scene.create();
- var layer = this.create();
+ var gui = GUILayer.create();
+ var layer = this.create(gui);
scene.addChild(layer);
+ scene.addChild(gui);
return scene;
};
View
39 src/scenes/IdleScene.js
@@ -0,0 +1,39 @@
+define(['cocos2d', 'scenes/GameScene'], function (cc, GameScene) {
+ 'use strict';
+ var IdleScene = cc.Layer.extend({
+ initWithTextBackground: function(text, background) {
+ var winSize = cc.Director.sharedDirector().getWinSize();
+ var sprite = cc.Sprite.create(background);
+ sprite.setPosition(cc.ccp(winSize.width / 2, winSize.height / 2))
+ this.addChild(sprite);
+ var label = cc.LabelTTF.create(text, 'Press Start 2P', 20);
+ label.setAnchorPoint(cc.ccp(0.5, 0));
+ label.setPosition(cc.ccp(370, 10));
+ label.runAction(cc.RepeatForever.create(cc.Blink.create(1, 1)));
+ this.addChild(label);
+ this.setIsTouchEnabled(true);
+ return true;
+ },
+
+ ccTouchesBegan: function() {
+ cc.Director.sharedDirector().replaceScene(GameScene.scene());
+ }
+
+ });
+
+ IdleScene.node = function(text, background) {
+ var node = new IdleScene();
+ if (node && node.initWithTextBackground(text, background)) {
+ return node;
+ }
+ throw new Error('Unable to initialize node');
+ };
+
+ IdleScene.create = function(text, background) {
+ var scene = cc.Scene.create();
+ scene.addChild(this.node(text, background));
+ return scene;
+ };
+
+ return IdleScene;
+});
View
48 src/scenes/PauseScene.js
@@ -0,0 +1,48 @@
+define(['cocos2d'], function (cc) {
+ 'use strict';
+ var PauseScene = cc.Layer.extend({
+ init:function () {
+ var winSize = cc.Director.sharedDirector().getWinSize();
+ var label = cc.LabelTTF.create('Click to unpause', 'Press Start 2P', 20);
+
+ label.setPosition(winSize.width / 2, winSize.height / 2);
+ this.addChild(label);
+ return true;
+ },
+
+ onEnter: function() {
+ this._super();
+ cc.sharedEngine.stopAllEffects();
+ if (cc.sharedEngine.isBackgroundMusicPlaying()) {
+ cc.sharedEngine.pauseBackgroundMusic();
+ this.restoreMusic = true;
+ }
+
+ },
+
+ onExit: function() {
+ this._super();
+ cc.sharedEngine.resumeAllEffects();
+ if (this.restoreMusic) {
+ cc.sharedEngine.resumeBackgroundMusic();
+ }
+ }
+ });
+
+ PauseScene.node = function () {
+ var node = new PauseScene();
+ if (node && node.init()) {
+ return node;
+ }
+ throw new Error('Unable to initialize node');
+ };
+
+ PauseScene.create = function () {
+ var scene = cc.Scene.create();
+ scene.addChild(this.node());
+ scene.isPause = true;
+ return scene;
+ };
+
+ return PauseScene;
+});
View
4 style.css
@@ -7,4 +7,8 @@ body {
background: black;
}
+canvas {
+ outline: none;
+}
+

0 comments on commit 370c727

Please sign in to comment.