Browse Source

Initial Commit

Initial Project Commit
master
D45Hub 4 years ago
parent
commit
c019f3ff50
  1. 3
      .import/Lux.png-473da40f55efe3300564a476db42e649.md5
  2. BIN
      .import/Lux.png-473da40f55efe3300564a476db42e649.stex
  3. 3
      .import/author.png-7d968a1a54dfabf9222028a5acf0d78a.md5
  4. BIN
      .import/author.png-7d968a1a54dfabf9222028a5acf0d78a.stex
  5. 3
      .import/beam.png-202748986110f7d4e1065bbe3aabe1f3.md5
  6. BIN
      .import/beam.png-202748986110f7d4e1065bbe3aabe1f3.stex
  7. 3
      .import/beam.png-864111620570798bcb4deb372b355e8d.md5
  8. BIN
      .import/beam.png-864111620570798bcb4deb372b355e8d.stex
  9. 3
      .import/bounce.wav-51ad6a017493525effd55935d745c5ef.md5
  10. BIN
      .import/bounce.wav-51ad6a017493525effd55935d745c5ef.sample
  11. 3
      .import/bounce.wav-88a0ddad3966c59fdf7aef7eac50747f.md5
  12. BIN
      .import/bounce.wav-88a0ddad3966c59fdf7aef7eac50747f.sample
  13. 3
      .import/bounce.wav-d69fd8995dba4a840e0cc6cb2fa30392.md5
  14. BIN
      .import/bounce.wav-d69fd8995dba4a840e0cc6cb2fa30392.sample
  15. 3
      .import/downArrow.png-7b0190dd3327d04a4bc0b7de71ddbf05.md5
  16. BIN
      .import/downArrow.png-7b0190dd3327d04a4bc0b7de71ddbf05.stex
  17. 3
      .import/explosion.png-9cc5a79bdd01a0eeac6b161c8d594f1f.md5
  18. 3
      .import/favicon.png-05a5f25b7b35b567a640a7daf7751a8e.md5
  19. BIN
      .import/favicon.png-05a5f25b7b35b567a640a7daf7751a8e.stex
  20. 3
      .import/gameOverSound.wav-a559df6ebf7ab8b1e2c10906f460ea30.md5
  21. BIN
      .import/gameOverSound.wav-a559df6ebf7ab8b1e2c10906f460ea30.sample
  22. 3
      .import/gameStartSound.wav-ac003099b64a2ab2ea860b87d8d842f1.md5
  23. BIN
      .import/gameStartSound.wav-ac003099b64a2ab2ea860b87d8d842f1.sample
  24. 3
      .import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5
  25. 3
      .import/icon.png-9a25435582839ca3cd8bb514b597c2d9.md5
  26. BIN
      .import/icon.png-9a25435582839ca3cd8bb514b597c2d9.stex
  27. 3
      .import/loop.wav-44a11163527ae7c03fb3ee4f2659e4c6.md5
  28. BIN
      .import/loop.wav-44a11163527ae7c03fb3ee4f2659e4c6.sample
  29. 3
      .import/loop.wav-9ed591d165cf5637811c465bdd8f38da.md5
  30. 3
      .import/lux_sprite.png-92fb2fcd3d8a3d2ee919afdb826b18d6.md5
  31. BIN
      .import/lux_sprite.png-92fb2fcd3d8a3d2ee919afdb826b18d6.stex
  32. 3
      .import/paddle.png-2fbf4c74cebb00d4e8ed8d139fc6a054.md5
  33. BIN
      .import/paddle.png-2fbf4c74cebb00d4e8ed8d139fc6a054.stex
  34. 3
      .import/paddle.png-6b2d6588b560b2b5d18cf909795ae935.md5
  35. BIN
      .import/paddle.png-6b2d6588b560b2b5d18cf909795ae935.stex
  36. 3
      .import/restartButton.png-1ec7b76fbb5baeecff46f194c12e2061.md5
  37. BIN
      .import/restartButton.png-1ec7b76fbb5baeecff46f194c12e2061.stex
  38. 3
      .import/splashScreen.png-d978d59ec67a1fd3e40a61fe321d07f3.md5
  39. BIN
      .import/splashScreen.png-d978d59ec67a1fd3e40a61fe321d07f3.stex
  40. 3
      .import/startGameButton.png-33831ecd9e5add46cdec96e4a5c6e12c.md5
  41. BIN
      .import/startGameButton.png-33831ecd9e5add46cdec96e4a5c6e12c.stex
  42. 3
      .import/upArrow.png-03fc2eb1b4772874229da31874fb474c.md5
  43. BIN
      .import/upArrow.png-03fc2eb1b4772874229da31874fb474c.stex
  44. BIN
      assets/fonts/Muli.ttf
  45. BIN
      assets/sounds/bounce.wav
  46. 21
      assets/sounds/bounce.wav.import
  47. BIN
      assets/sounds/gameOverSound.wav
  48. 21
      assets/sounds/gameOverSound.wav.import
  49. BIN
      assets/sounds/gameStartSound.wav
  50. 21
      assets/sounds/gameStartSound.wav.import
  51. BIN
      assets/sprites/author.png
  52. 34
      assets/sprites/author.png.import
  53. BIN
      assets/sprites/beam.png
  54. 34
      assets/sprites/beam.png.import
  55. BIN
      assets/sprites/downArrow.png
  56. 34
      assets/sprites/downArrow.png.import
  57. BIN
      assets/sprites/icon.ico
  58. BIN
      assets/sprites/icon.png
  59. 34
      assets/sprites/icon.png.import
  60. BIN
      assets/sprites/lux_sprite.png
  61. 34
      assets/sprites/lux_sprite.png.import
  62. BIN
      assets/sprites/paddle.png
  63. 34
      assets/sprites/paddle.png.import
  64. BIN
      assets/sprites/restartButton.png
  65. 34
      assets/sprites/restartButton.png.import
  66. BIN
      assets/sprites/splashScreen.png
  67. 34
      assets/sprites/splashScreen.png.import
  68. BIN
      assets/sprites/startGameButton.png
  69. 34
      assets/sprites/startGameButton.png.import
  70. BIN
      assets/sprites/upArrow.png
  71. 34
      assets/sprites/upArrow.png.import
  72. 7
      default_env.tres
  73. 85
      project.godot
  74. 51
      scenes/GameOver.tscn
  75. 135
      scenes/MainGame.tscn
  76. 163
      scenes/MainMenu.tscn
  77. 40
      scenes/Mirror.tscn
  78. 39
      scenes/OverlayTransition.tscn
  79. 6
      scripts/FinalScoreLabel.gd
  80. 66
      scripts/LightBeam.gd
  81. 8
      scripts/Mirror.gd
  82. 24
      scripts/MirrorArea.gd
  83. 41
      scripts/MirrorPath.gd
  84. 16
      scripts/PlayerVariables.gd
  85. 10
      scripts/ReflectionSoundPlayer.gd
  86. 14
      scripts/RestartGameButton.gd
  87. 6
      scripts/Score.gd
  88. 17
      scripts/ScoreLabel.gd
  89. 18
      scripts/Sprite.gd
  90. 16
      scripts/StartGameButton.gd
  91. 23
      scripts/Trail.gd

3
.import/Lux.png-473da40f55efe3300564a476db42e649.md5

@ -0,0 +1,3 @@
source_md5="ff0c93da568a226060222ae3e7769268"
dest_md5="96c83b28235b6167c4983295e5d6ec54"

BIN
.import/Lux.png-473da40f55efe3300564a476db42e649.stex

3
.import/author.png-7d968a1a54dfabf9222028a5acf0d78a.md5

@ -0,0 +1,3 @@
source_md5="1a6db8b21185a12c04c2d163d7a1890e"
dest_md5="a9254c817765a9af2fdf46df66a0fe89"

BIN
.import/author.png-7d968a1a54dfabf9222028a5acf0d78a.stex

3
.import/beam.png-202748986110f7d4e1065bbe3aabe1f3.md5

@ -0,0 +1,3 @@
source_md5="ea9f46588fb63e42ad8fb041ef75c5bf"
dest_md5="244c68be14d5a4e3b08f98aa71c21b1c"

BIN
.import/beam.png-202748986110f7d4e1065bbe3aabe1f3.stex

3
.import/beam.png-864111620570798bcb4deb372b355e8d.md5

@ -0,0 +1,3 @@
source_md5="4f972f22a5d5adf822f927f7027bb0c0"
dest_md5="091f5c869c28e56b2bbad98bee670793"

BIN
.import/beam.png-864111620570798bcb4deb372b355e8d.stex

3
.import/bounce.wav-51ad6a017493525effd55935d745c5ef.md5

@ -0,0 +1,3 @@
source_md5="32ba4d3ee77f1f02e854723c84515b82"
dest_md5="8fa30836752ce6179f7411623d65474b"

BIN
.import/bounce.wav-51ad6a017493525effd55935d745c5ef.sample

3
.import/bounce.wav-88a0ddad3966c59fdf7aef7eac50747f.md5

@ -0,0 +1,3 @@
source_md5="32ba4d3ee77f1f02e854723c84515b82"
dest_md5="8fa30836752ce6179f7411623d65474b"

BIN
.import/bounce.wav-88a0ddad3966c59fdf7aef7eac50747f.sample

3
.import/bounce.wav-d69fd8995dba4a840e0cc6cb2fa30392.md5

@ -0,0 +1,3 @@
source_md5="32ba4d3ee77f1f02e854723c84515b82"
dest_md5="8fa30836752ce6179f7411623d65474b"

BIN
.import/bounce.wav-d69fd8995dba4a840e0cc6cb2fa30392.sample

3
.import/downArrow.png-7b0190dd3327d04a4bc0b7de71ddbf05.md5

@ -0,0 +1,3 @@
source_md5="c264849a9035b1da385dcd151b6db374"
dest_md5="14adb50fe2d241f501a31345f4c9db08"

BIN
.import/downArrow.png-7b0190dd3327d04a4bc0b7de71ddbf05.stex

3
.import/explosion.png-9cc5a79bdd01a0eeac6b161c8d594f1f.md5

@ -0,0 +1,3 @@
source_md5="e929381dea3f27a23a30896666d1c5c5"
dest_md5="a541f627c6735893fcae9695060bc20e"

3
.import/favicon.png-05a5f25b7b35b567a640a7daf7751a8e.md5

@ -0,0 +1,3 @@
source_md5="3cf0c5d84528f9b3b553193067f914f5"
dest_md5="1c8a0e1b97d2ddce861e2cf017384f68"

BIN
.import/favicon.png-05a5f25b7b35b567a640a7daf7751a8e.stex

3
.import/gameOverSound.wav-a559df6ebf7ab8b1e2c10906f460ea30.md5

@ -0,0 +1,3 @@
source_md5="801b066ff284271785c239b4c2aed273"
dest_md5="5319c4eb3c7fd03e0694352394a4e424"

BIN
.import/gameOverSound.wav-a559df6ebf7ab8b1e2c10906f460ea30.sample

3
.import/gameStartSound.wav-ac003099b64a2ab2ea860b87d8d842f1.md5

@ -0,0 +1,3 @@
source_md5="c6198a54f63ca0e69059050d2bc526b1"
dest_md5="c42face7cc081b0903ac2269834a2aaa"

BIN
.import/gameStartSound.wav-ac003099b64a2ab2ea860b87d8d842f1.sample

3
.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5

@ -0,0 +1,3 @@
source_md5="47313fa4c47a9963fddd764e1ec6e4a8"
dest_md5="2ded9e7f9060e2b530aab678b135fc5b"

3
.import/icon.png-9a25435582839ca3cd8bb514b597c2d9.md5

@ -0,0 +1,3 @@
source_md5="2e2226ae72c075468379f25c31ed265f"
dest_md5="1c8a0e1b97d2ddce861e2cf017384f68"

BIN
.import/icon.png-9a25435582839ca3cd8bb514b597c2d9.stex

3
.import/loop.wav-44a11163527ae7c03fb3ee4f2659e4c6.md5

@ -0,0 +1,3 @@
source_md5="bb2a0cd2e70d5ac83e688d7e7b214398"
dest_md5="387585f61483fc45bbc5a2e1b1988b1f"

BIN
.import/loop.wav-44a11163527ae7c03fb3ee4f2659e4c6.sample

3
.import/loop.wav-9ed591d165cf5637811c465bdd8f38da.md5

@ -0,0 +1,3 @@
source_md5="bb2a0cd2e70d5ac83e688d7e7b214398"
dest_md5="80262c906ca5d4b3de3109fbdb3fdd06"

3
.import/lux_sprite.png-92fb2fcd3d8a3d2ee919afdb826b18d6.md5

@ -0,0 +1,3 @@
source_md5="cfd3a0426198250fefb598e79c20c87e"
dest_md5="5334373783638f345b76e02e1952dea3"

BIN
.import/lux_sprite.png-92fb2fcd3d8a3d2ee919afdb826b18d6.stex

3
.import/paddle.png-2fbf4c74cebb00d4e8ed8d139fc6a054.md5

@ -0,0 +1,3 @@
source_md5="4d83ecba9fae51ef34f4bee052a126dd"
dest_md5="095433b9c4572dd92d67d655938a1c8e"

BIN
.import/paddle.png-2fbf4c74cebb00d4e8ed8d139fc6a054.stex

3
.import/paddle.png-6b2d6588b560b2b5d18cf909795ae935.md5

@ -0,0 +1,3 @@
source_md5="d0db655408fa954ee1066db4b56105a4"
dest_md5="a0cbc7dfc2b3618c7b9d64e9a4fb7f34"

BIN
.import/paddle.png-6b2d6588b560b2b5d18cf909795ae935.stex

3
.import/restartButton.png-1ec7b76fbb5baeecff46f194c12e2061.md5

@ -0,0 +1,3 @@
source_md5="1f8adb30036543390100d947773227f0"
dest_md5="5dcf265f51e55afe46c918a66e7b9ba5"

BIN
.import/restartButton.png-1ec7b76fbb5baeecff46f194c12e2061.stex

3
.import/splashScreen.png-d978d59ec67a1fd3e40a61fe321d07f3.md5

@ -0,0 +1,3 @@
source_md5="5461d0aeabc725e1bef7bf2e63406454"
dest_md5="96c83b28235b6167c4983295e5d6ec54"

BIN
.import/splashScreen.png-d978d59ec67a1fd3e40a61fe321d07f3.stex

3
.import/startGameButton.png-33831ecd9e5add46cdec96e4a5c6e12c.md5

@ -0,0 +1,3 @@
source_md5="90795272043b9d8b22f18821f59325a0"
dest_md5="1e392b100892826cbc40562ec5495a91"

BIN
.import/startGameButton.png-33831ecd9e5add46cdec96e4a5c6e12c.stex

3
.import/upArrow.png-03fc2eb1b4772874229da31874fb474c.md5

@ -0,0 +1,3 @@
source_md5="77352d19af54c5c77e6b64e08b75a9c1"
dest_md5="54ff3465ea58657464ae464c84184e5f"

BIN
.import/upArrow.png-03fc2eb1b4772874229da31874fb474c.stex

BIN
assets/fonts/Muli.ttf

BIN
assets/sounds/bounce.wav

21
assets/sounds/bounce.wav.import

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/bounce.wav-d69fd8995dba4a840e0cc6cb2fa30392.sample"
[deps]
source_file="res://assets/sounds/bounce.wav"
dest_files=[ "res://.import/bounce.wav-d69fd8995dba4a840e0cc6cb2fa30392.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0

BIN
assets/sounds/gameOverSound.wav

21
assets/sounds/gameOverSound.wav.import

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/gameOverSound.wav-a559df6ebf7ab8b1e2c10906f460ea30.sample"
[deps]
source_file="res://assets/sounds/gameOverSound.wav"
dest_files=[ "res://.import/gameOverSound.wav-a559df6ebf7ab8b1e2c10906f460ea30.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0

BIN
assets/sounds/gameStartSound.wav

21
assets/sounds/gameStartSound.wav.import

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/gameStartSound.wav-ac003099b64a2ab2ea860b87d8d842f1.sample"
[deps]
source_file="res://assets/sounds/gameStartSound.wav"
dest_files=[ "res://.import/gameStartSound.wav-ac003099b64a2ab2ea860b87d8d842f1.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop=false
compress/mode=0

BIN
assets/sprites/author.png

After

Width: 200  |  Height: 100  |  Size: 6.7 KiB

34
assets/sprites/author.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/author.png-7d968a1a54dfabf9222028a5acf0d78a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/author.png"
dest_files=[ "res://.import/author.png-7d968a1a54dfabf9222028a5acf0d78a.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/sprites/beam.png

After

Width: 50  |  Height: 59  |  Size: 368 B

34
assets/sprites/beam.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/beam.png-864111620570798bcb4deb372b355e8d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/beam.png"
dest_files=[ "res://.import/beam.png-864111620570798bcb4deb372b355e8d.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/sprites/downArrow.png

After

Width: 200  |  Height: 200  |  Size: 3.9 KiB

34
assets/sprites/downArrow.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/downArrow.png-7b0190dd3327d04a4bc0b7de71ddbf05.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/downArrow.png"
dest_files=[ "res://.import/downArrow.png-7b0190dd3327d04a4bc0b7de71ddbf05.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/sprites/icon.ico

BIN
assets/sprites/icon.png

After

Width: 80  |  Height: 80  |  Size: 590 B

34
assets/sprites/icon.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-9a25435582839ca3cd8bb514b597c2d9.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/icon.png"
dest_files=[ "res://.import/icon.png-9a25435582839ca3cd8bb514b597c2d9.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/sprites/lux_sprite.png

After

Width: 800  |  Height: 520  |  Size: 50 KiB

34
assets/sprites/lux_sprite.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/lux_sprite.png-92fb2fcd3d8a3d2ee919afdb826b18d6.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/lux_sprite.png"
dest_files=[ "res://.import/lux_sprite.png-92fb2fcd3d8a3d2ee919afdb826b18d6.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/sprites/paddle.png

After

Width: 45  |  Height: 10  |  Size: 308 B

34
assets/sprites/paddle.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/paddle.png-6b2d6588b560b2b5d18cf909795ae935.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/paddle.png"
dest_files=[ "res://.import/paddle.png-6b2d6588b560b2b5d18cf909795ae935.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/sprites/restartButton.png

After

Width: 200  |  Height: 200  |  Size: 3.6 KiB

34
assets/sprites/restartButton.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/restartButton.png-1ec7b76fbb5baeecff46f194c12e2061.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/restartButton.png"
dest_files=[ "res://.import/restartButton.png-1ec7b76fbb5baeecff46f194c12e2061.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/sprites/splashScreen.png

After

Width: 1024  |  Height: 600  |  Size: 56 KiB

34
assets/sprites/splashScreen.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/splashScreen.png-d978d59ec67a1fd3e40a61fe321d07f3.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/splashScreen.png"
dest_files=[ "res://.import/splashScreen.png-d978d59ec67a1fd3e40a61fe321d07f3.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/sprites/startGameButton.png

After

Width: 200  |  Height: 200  |  Size: 2.5 KiB

34
assets/sprites/startGameButton.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/startGameButton.png-33831ecd9e5add46cdec96e4a5c6e12c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/startGameButton.png"
dest_files=[ "res://.import/startGameButton.png-33831ecd9e5add46cdec96e4a5c6e12c.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/sprites/upArrow.png

After

Width: 200  |  Height: 200  |  Size: 3.9 KiB

34
assets/sprites/upArrow.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/upArrow.png-03fc2eb1b4772874229da31874fb474c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/upArrow.png"
dest_files=[ "res://.import/upArrow.png-03fc2eb1b4772874229da31874fb474c.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

7
default_env.tres

@ -0,0 +1,7 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
[resource]
background_mode = 2
background_sky = SubResource( 1 )

85
project.godot

@ -0,0 +1,85 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=4
_global_script_classes=[ {
"base": "KinematicBody2D",
"class": "Beam",
"language": "GDScript",
"path": "res://scripts/LightBeam.gd"
} ]
_global_script_class_icons={
"Beam": ""
}
[application]
config/name="Lux"
config/description="A game made for Ludum Dare 47. Made by D-Lord"
run/main_scene="res://scenes/MainMenu.tscn"
boot_splash/image="res://assets/sprites/splashScreen.png"
config/icon="res://assets/sprites/icon.png"
[autoload]
PlayerVariables="*res://scripts/PlayerVariables.gd"
[input]
ui_accept={
"deadzone": 0.5,
"events": [ ]
}
ui_select={
"deadzone": 0.5,
"events": [ ]
}
ui_cancel={
"deadzone": 0.5,
"events": [ ]
}
ui_focus_next={
"deadzone": 0.5,
"events": [ ]
}
ui_focus_prev={
"deadzone": 0.5,
"events": [ ]
}
ui_left={
"deadzone": 0.5,
"events": [ ]
}
ui_right={
"deadzone": 0.5,
"events": [ ]
}
ui_page_up={
"deadzone": 0.5,
"events": [ ]
}
ui_page_down={
"deadzone": 0.5,
"events": [ ]
}
ui_home={
"deadzone": 0.5,
"events": [ ]
}
ui_end={
"deadzone": 0.5,
"events": [ ]
}
[rendering]
quality/driver/driver_name="GLES2"
vram_compression/import_etc=true
vram_compression/import_etc2=false
environment/default_environment="res://default_env.tres"

51
scenes/GameOver.tscn

@ -0,0 +1,51 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://scripts/FinalScoreLabel.gd" type="Script" id=1]
[ext_resource path="res://assets/sprites/restartButton.png" type="Texture" id=2]
[ext_resource path="res://assets/fonts/Muli.ttf" type="DynamicFontData" id=3]
[ext_resource path="res://scripts/Score.gd" type="Script" id=4]
[ext_resource path="res://scripts/RestartGameButton.gd" type="Script" id=5]
[ext_resource path="res://scenes/OverlayTransition.tscn" type="PackedScene" id=6]
[sub_resource type="DynamicFont" id=1]
size = 64
font_data = ExtResource( 3 )
[node name="GameOver" type="Node2D"]
[node name="ColorRect" type="ColorRect" parent="."]
margin_right = 1024.0
margin_bottom = 600.0
color = Color( 0.0745098, 0.0745098, 0.0745098, 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RestartGameButton" type="TextureButton" parent="."]
margin_left = 410.805
margin_top = 300.53
margin_right = 610.805
margin_bottom = 500.53
texture_normal = ExtResource( 2 )
script = ExtResource( 5 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="OverlayTransition" parent="RestartGameButton" instance=ExtResource( 6 )]
position = Vector2( -409.796, -299.004 )
[node name="Score" type="Node2D" parent="."]
position = Vector2( 390, 130 )
script = ExtResource( 4 )
[node name="FinalScoreLabel" type="Label" parent="Score"]
margin_right = 245.0
margin_bottom = 95.0
custom_fonts/font = SubResource( 1 )
align = 1
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="pressed" from="RestartGameButton" to="RestartGameButton" method="_on_RestartGameButton_pressed"]

135
scenes/MainGame.tscn

@ -0,0 +1,135 @@
[gd_scene load_steps=16 format=2]
[ext_resource path="res://scripts/LightBeam.gd" type="Script" id=1]
[ext_resource path="res://scenes/Mirror.tscn" type="PackedScene" id=2]
[ext_resource path="res://scripts/ScoreLabel.gd" type="Script" id=3]
[ext_resource path="res://scripts/PlayerVariables.gd" type="Script" id=4]
[ext_resource path="res://assets/fonts/Muli.ttf" type="DynamicFontData" id=5]
[ext_resource path="res://scripts/Trail.gd" type="Script" id=6]
[ext_resource path="res://assets/sounds/bounce.wav" type="AudioStream" id=7]
[ext_resource path="res://assets/sprites/beam.png" type="Texture" id=8]
[ext_resource path="res://scripts/Sprite.gd" type="Script" id=9]
[ext_resource path="res://scripts/ReflectionSoundPlayer.gd" type="Script" id=10]
[ext_resource path="res://assets/sounds/gameOverSound.wav" type="AudioStream" id=11]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 19.1994, 20.1196 )
[sub_resource type="Gradient" id=2]
offsets = PoolRealArray( 0.00363636, 0.374545, 0.716364, 1 )
colors = PoolColorArray( 1, 1, 1, 0, 1, 1, 0.817518, 0.547445, 1, 1, 0.695708, 0.912877, 1, 1, 0.666667, 1 )
[sub_resource type="DynamicFont" id=3]
size = 96
outline_color = Color( 1, 1, 1, 0.678431 )
font_data = ExtResource( 5 )
[sub_resource type="Animation" id=4]
resource_name = "fade_in"
tracks/0/type = "value"
tracks/0/path = NodePath(".:custom_colors/font_color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ]
}
[node name="MainGame" type="Node2D"]
[node name="Background" type="ColorRect" parent="."]
margin_right = 1024.0
margin_bottom = 600.0
color = Color( 0.0745098, 0.0745098, 0.0745098, 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Mirror1" parent="." instance=ExtResource( 2 )]
position = Vector2( 0, 40 )
reflection_direction = "East"
[node name="Mirror2" parent="." instance=ExtResource( 2 )]
position = Vector2( 880, 200 )
rotation = -1.5708
reflection_direction = "South"
[node name="Mirror3" parent="." instance=ExtResource( 2 )]
position = Vector2( 1027.26, 562.722 )
rotation = -3.14159
reflection_direction = "West"
[node name="Mirror4" parent="." instance=ExtResource( 2 )]
position = Vector2( 155.763, 408.174 )
rotation = -4.71239
reflection_direction = "North"
[node name="LightBeam" type="Node2D" parent="."]
position = Vector2( 512, 300 )
[node name="KinematicBody2D" type="KinematicBody2D" parent="LightBeam"]
script = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="LightBeam/KinematicBody2D"]
position = Vector2( -0.0183411, 0.900391 )
scale = Vector2( 0.253493, 0.240707 )
shape = SubResource( 1 )
[node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="LightBeam/KinematicBody2D"]
position = Vector2( -5, -24 )
rect = Rect2( 0, 20, 10, 10 )
[node name="Trail" type="Line2D" parent="LightBeam/KinematicBody2D"]
default_color = Color( 1, 1, 1, 1 )
gradient = SubResource( 2 )
script = ExtResource( 6 )
targetPath = NodePath("..")
trailLength = 20
[node name="Sprite" type="Sprite" parent="LightBeam/KinematicBody2D"]
scale = Vector2( 0.2, 0.2 )
texture = ExtResource( 8 )
script = ExtResource( 9 )
[node name="GameOverSoundPlayer" type="AudioStreamPlayer2D" parent="LightBeam/KinematicBody2D"]
stream = ExtResource( 11 )
[node name="ReflectionSoundPlayer" type="AudioStreamPlayer2D" parent="LightBeam"]
stream = ExtResource( 7 )
attenuation = 1.23114
script = ExtResource( 10 )
[node name="PlayerVariables" type="Node" parent="."]
script = ExtResource( 4 )
[node name="ScoreLabel" type="Label" parent="."]
anchor_top = 0.5
anchor_bottom = 0.5
margin_left = 470.648
margin_top = 185.817
margin_right = 528.648
margin_bottom = 328.817
custom_fonts/font = SubResource( 3 )
custom_colors/font_color = Color( 1, 1, 1, 0 )
align = 1
script = ExtResource( 3 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="FadeInTimer" type="Timer" parent="ScoreLabel"]
one_shot = true
autostart = true
[node name="FadeInAnimationPlayer" type="AnimationPlayer" parent="ScoreLabel"]
anims/fade_in = SubResource( 4 )
[connection signal="screen_exited" from="LightBeam/KinematicBody2D/VisibilityNotifier2D" to="LightBeam/KinematicBody2D" method="_on_VisibilityNotifier2D_screen_exited"]
[connection signal="player_score_signal" from="PlayerVariables" to="LightBeam/KinematicBody2D" method="_on_PlayerVariables_player_score_signal"]
[connection signal="player_score_signal" from="PlayerVariables" to="LightBeam/ReflectionSoundPlayer" method="_on_PlayerVariables_player_score_signal"]
[connection signal="player_score_signal" from="PlayerVariables" to="LightBeam/KinematicBody2D/Sprite" method="_on_PlayerVariables_player_score_signal"]
[connection signal="player_score_signal" from="PlayerVariables" to="ScoreLabel" method="_on_PlayerVariables_player_score_signal"]
[connection signal="timeout" from="ScoreLabel/FadeInTimer" to="ScoreLabel" method="_on_Timer_timeout"]

163
scenes/MainMenu.tscn

@ -0,0 +1,163 @@
[gd_scene load_steps=13 format=2]
[ext_resource path="res://assets/sprites/startGameButton.png" type="Texture" id=1]
[ext_resource path="res://scripts/StartGameButton.gd" type="Script" id=2]
[ext_resource path="res://assets/sprites/lux_sprite.png" type="Texture" id=3]
[ext_resource path="res://assets/sprites/author.png" type="Texture" id=4]
[ext_resource path="res://assets/fonts/Muli.ttf" type="DynamicFontData" id=5]
[ext_resource path="res://assets/sprites/upArrow.png" type="Texture" id=6]
[ext_resource path="res://assets/sprites/downArrow.png" type="Texture" id=7]
[ext_resource path="res://scenes/OverlayTransition.tscn" type="PackedScene" id=9]
[sub_resource type="Animation" id=1]
resource_name = "pulse"
length = 3.0
tracks/0/type = "value"
tracks/0/path = NodePath(".:rect_scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.75, 1.5, 2.25, 3 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 0.75, 0.75 ), Vector2( 0.8, 0.8 ), Vector2( 0.75, 0.75 ), Vector2( 0.7, 0.7 ), Vector2( 0.75, 0.75 ) ]
}
[sub_resource type="DynamicFont" id=2]
size = 64
font_data = ExtResource( 5 )
[sub_resource type="DynamicFont" id=3]
size = 64
font_data = ExtResource( 5 )
[sub_resource type="DynamicFont" id=4]
size = 64
font_data = ExtResource( 5 )
[node name="MainMenu" type="Node2D"]
[node name="Background" type="ColorRect" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = 1024.0
margin_bottom = 600.0
color = Color( 0.0745098, 0.0745098, 0.0745098, 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="StartGameButton" type="TextureButton" parent="."]
margin_left = 632.975
margin_top = 259.681
margin_right = 832.975
margin_bottom = 459.681
rect_scale = Vector2( 0.73, 0.73 )
texture_normal = ExtResource( 1 )
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="StartGameAnimationPlayer" type="AnimationPlayer" parent="StartGameButton"]
autoplay = "pulse"
anims/pulse = SubResource( 1 )
[node name="OverlayTransition" parent="StartGameButton" instance=ExtResource( 9 )]
position = Vector2( -490.161, -136.348 )
[node name="GameLogo" type="TextureRect" parent="."]
margin_left = 107.757
margin_top = 50.3506
margin_right = 907.757
margin_bottom = 570.351
rect_scale = Vector2( 0.5, 0.5 )
texture = ExtResource( 3 )
expand = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AuthorLogo" type="TextureRect" parent="."]
margin_left = 900.0
margin_top = 535.0
margin_right = 1100.0
margin_bottom = 635.0
rect_scale = Vector2( 0.5, 0.5 )
texture = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ControlsView" type="Node2D" parent="."]
position = Vector2( 147.698, 140.794 )
scale = Vector2( 0.75, 0.75 )
[node name="ControlsHeader" type="Label" parent="ControlsView"]
margin_left = 181.428
margin_top = 264.956
margin_right = 439.428
margin_bottom = 359.956
rect_scale = Vector2( 0.742682, 0.728304 )
custom_fonts/font = SubResource( 2 )
text = "Controls"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Up" type="Node2D" parent="ControlsView"]
position = Vector2( 131.754, 360.34 )
[node name="UpKeySymbol" type="TextureRect" parent="ControlsView/Up"]
margin_right = 200.0
margin_bottom = 200.0
rect_scale = Vector2( 0.3, 0.3 )
texture = ExtResource( 6 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="UpKeyExplaination" type="Label" parent="ControlsView/Up"]
margin_left = 89.0899
margin_top = -20.4907
margin_right = 518.09
margin_bottom = 172.509
rect_scale = Vector2( 0.44896, 0.474313 )
custom_fonts/font = SubResource( 3 )
text = "Move Paddles
upwards"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Down" type="Node2D" parent="ControlsView"]
position = Vector2( 132.595, 472.389 )
[node name="DownKey" type="TextureRect" parent="ControlsView/Down"]
margin_right = 40.0
margin_bottom = 40.0
rect_scale = Vector2( 0.3, 0.3 )
texture = ExtResource( 7 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="DownKeyExplaination" type="Label" parent="ControlsView/Down"]
margin_left = 87.3785
margin_top = -10.9812
margin_right = 516.379
margin_bottom = 182.019
rect_scale = Vector2( 0.458074, 0.454399 )
custom_fonts/font = SubResource( 4 )
text = "Move Paddles
downwards"
align = 1
valign = 1
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="pressed" from="StartGameButton" to="StartGameButton" method="_on_StartGameButton_pressed"]

40
scenes/Mirror.tscn

@ -0,0 +1,40 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://scripts/MirrorPath.gd" type="Script" id=1]
[ext_resource path="res://scripts/MirrorArea.gd" type="Script" id=2]
[ext_resource path="res://assets/sprites/paddle.png" type="Texture" id=3]
[ext_resource path="res://scripts/Mirror.gd" type="Script" id=4]
[sub_resource type="Curve2D" id=1]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, 130.186, 10.3302, 0, 0, 0, 0, 67.8729, 76.1727 )
}
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 18.7762, 4.34561 )
[node name="Mirror" type="Node2D"]
script = ExtResource( 4 )
[node name="MirrorPath" type="Path2D" parent="."]
position = Vector2( 5, 10 )
curve = SubResource( 1 )
script = ExtResource( 1 )
[node name="MirrorPathFollow" type="PathFollow2D" parent="MirrorPath"]
position = Vector2( 130.186, 10.3302 )
rotation = 2.32867
loop = false
[node name="MirrorArea" type="Area2D" parent="MirrorPath/MirrorPathFollow"]
position = Vector2( -0.76548, -0.808815 )
script = ExtResource( 2 )
[node name="MirrorCollisionShape" type="CollisionShape2D" parent="MirrorPath/MirrorPathFollow/MirrorArea"]
scale = Vector2( 1.04911, 0.688918 )
shape = SubResource( 2 )
[node name="MirrorSprite" type="Sprite" parent="MirrorPath/MirrorPathFollow/MirrorArea/MirrorCollisionShape"]
texture = ExtResource( 3 )
[connection signal="body_entered" from="MirrorPath/MirrorPathFollow/MirrorArea" to="MirrorPath/MirrorPathFollow/MirrorArea" method="_on_Area2D_body_entered"]
[connection signal="score_signal" from="MirrorPath/MirrorPathFollow/MirrorArea" to="MirrorPath" method="_on_Area2D_score_signal"]

39
scenes/OverlayTransition.tscn

@ -0,0 +1,39 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://assets/sounds/gameStartSound.wav" type="AudioStream" id=1]
[sub_resource type="Animation" id=1]
resource_name = "transition"
tracks/0/type = "value"
tracks/0/path = NodePath(".:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 0.0745098, 0.0745098, 0.0745098, 0 ), Color( 0.0745098, 0.0745098, 0.0745098, 1 ) ]
}
[node name="OverlayTransition" type="Node2D"]
scale = Vector2( 1.36986, 1.36986 )
z_index = 1
[node name="OverlayRect" type="ColorRect" parent="."]
margin_left = -275.334
margin_top = -159.322
margin_right = 748.666
margin_bottom = 440.678
mouse_filter = 1
color = Color( 0.0745098, 0.0745098, 0.0745098, 0 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="OverlayRectAnimationPlayer" type="AnimationPlayer" parent="OverlayRect"]
anims/transition = SubResource( 1 )
[node name="TransitionPlayer" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 1 )

6
scripts/FinalScoreLabel.gd

@ -0,0 +1,6 @@
extends Label
func _ready():
set_text("Score: " + str(PlayerVariables.player_score))
pass

66
scripts/LightBeam.gd

@ -0,0 +1,66 @@
extends KinematicBody2D
class_name Beam
const velocity = 200.0
var velocity_vector = Vector2(0, -velocity)
var has_scored = false
var start_velocity
func _ready():
# warning-ignore:return_value_discarded
PlayerVariables.connect("player_score_signal", self, "_on_PlayerVariables_player_score_signal")
start_velocity = generateRandomStartVelocity()
pass
func _process(_delta):
# warning-ignore:return_value_discarded
if has_scored:
var beam_velocity = Vector2(velocity_vector.x * (1 + PlayerVariables.player_score / 10.0), velocity_vector.y * (1 + PlayerVariables.player_score / 10.0))
move_and_slide(beam_velocity)
else:
# warning-ignore:return_value_discarded
move_and_slide(start_velocity)
pass
func _on_VisibilityNotifier2D_screen_exited():
$GameOverSoundPlayer.play(0.0)
yield(get_tree().create_timer(1.0), "timeout")
# warning-ignore:return_value_discarded
get_tree().change_scene("res://scenes/GameOver.tscn")
pass
func _on_PlayerVariables_player_score_signal(_player_score):
has_scored = true
pass
func generateRandomStartVelocity():
var random_start_velocity = Vector2(0, 0)
var rng = RandomNumberGenerator.new()
rng.randomize()
var positive_or_negative_x = rng.randi_range(-1, 1)
while(positive_or_negative_x == 0):
rng.randomize()
positive_or_negative_x = rng.randi_range(-1, 1)
var positive_or_negative_y = rng.randi_range(-1, 1)
while(positive_or_negative_y == 0):
rng.randomize()
positive_or_negative_y = rng.randi_range(-1, 1)
random_start_velocity = Vector2(180*positive_or_negative_x, 100*positive_or_negative_y)
$Sprite.rotation_degrees = positive_or_negative_x*45
if positive_or_negative_y > 0:
$Sprite.rotation_degrees = 180 - (positive_or_negative_x*45)
return random_start_velocity

8
scripts/Mirror.gd

@ -0,0 +1,8 @@
extends Node2D
export var reflection_direction = "Direction"
func _ready():
$MirrorPath/MirrorPathFollow/MirrorArea.direction = reflection_direction
pass

24
scripts/MirrorArea.gd

@ -0,0 +1,24 @@
extends Area2D
signal score_signal()
var body_exited = false
var direction = "North"
func _on_Area2D_body_entered(body):
if body is Beam:
if(direction == "East"):
body.velocity_vector = Vector2(body.velocity, 0)
elif(direction == "South"):
body.velocity_vector = Vector2(0, body.velocity)
elif(direction == "West"):
body.velocity_vector = Vector2(-body.velocity, 0)
elif(direction == "North"):
body.velocity_vector = Vector2(0, -body.velocity)
PlayerVariables.addOneToScore()
emit_signal("score_signal")
pass

41
scripts/MirrorPath.gd

@ -0,0 +1,41 @@
extends Path2D
onready var follow = get_node("MirrorPathFollow")
const maximum_press_time = 1.5
var mouse_inside = true
var rng = RandomNumberGenerator.new()
var time_elapsed_pressing = 0
var movement = 0
func _ready():
rng.randomize()
movement = rng.randf_range(-2.0, 2.0)
pass
func _process(delta):
if(Input.is_action_pressed("ui_up") and time_elapsed_pressing < maximum_press_time):
follow.set_offset(follow.get_offset() - rng.randi_range(1, 5))
time_elapsed_pressing += delta
elif(Input.is_action_pressed("ui_down") and time_elapsed_pressing < maximum_press_time):
follow.set_offset(follow.get_offset() + rng.randi_range(1, 5))
time_elapsed_pressing += delta
else:
Input.action_release("ui_down")
Input.action_release("ui_up")
follow.set_offset(follow.get_offset() + movement)
time_elapsed_pressing = 0
pass
func _on_Area2D_score_signal():
rng.randomize()
movement = rng.randf_range(-2.0, 2.0)
pass

16
scripts/PlayerVariables.gd

@ -0,0 +1,16 @@
extends Node
var player_score = 0
signal player_score_signal(player_score)
func _ready():
pass
func addOneToScore():
player_score += 1
emit_signal("player_score_signal", player_score)
pass
func reset_variables():
player_score = 0
pass

10
scripts/ReflectionSoundPlayer.gd

@ -0,0 +1,10 @@
extends AudioStreamPlayer2D
func _ready():
# warning-ignore:return_value_discarded
PlayerVariables.connect("player_score_signal", self, "_on_PlayerVariables_player_score_signal")
pass
func _on_PlayerVariables_player_score_signal(_player_score):
play(0.0)
pass

14
scripts/RestartGameButton.gd

@ -0,0 +1,14 @@
extends TextureButton
func _on_RestartGameButton_pressed():
PlayerVariables.reset_variables()
$OverlayTransition/TransitionPlayer.play(0.0)
$OverlayTransition/OverlayRect/OverlayRectAnimationPlayer.play("transition")
yield(get_tree().create_timer(1.0), "timeout")
# warning-ignore:return_value_discarded
get_tree().change_scene("res://scenes/MainGame.tscn")
pass

6
scripts/Score.gd

@ -0,0 +1,6 @@
extends Node2D
func _ready():
position.x -= (str(PlayerVariables.player_score).length() - 1) * 20
pass

17
scripts/ScoreLabel.gd

@ -0,0 +1,17 @@
extends Label
func _ready():
set_text(str(0))
# warning-ignore:return_value_discarded
PlayerVariables.connect("player_score_signal", self, "_on_PlayerVariables_player_score_signal")
pass
func _on_PlayerVariables_player_score_signal(player_score):
set_text(str(player_score))
pass
func _on_Timer_timeout():
$FadeInAnimationPlayer.play("fade_in")
pass

18
scripts/Sprite.gd

@ -0,0 +1,18 @@
extends Sprite
var first_reflect = false
func _ready():
# warning-ignore:return_value_discarded
PlayerVariables.connect("player_score_signal", self, "_on_PlayerVariables_player_score_signal")
pass
func _on_PlayerVariables_player_score_signal(_player_score):
if not first_reflect:
rotation_degrees += 45
first_reflect = true
rotation_degrees += 90
pass

16
scripts/StartGameButton.gd

@ -0,0 +1,16 @@
extends TextureButton
func _ready():
$StartGameAnimationPlayer.get_animation("pulse").set_loop(true)
pass
func _on_StartGameButton_pressed():
$OverlayTransition/TransitionPlayer.play(0.0)
$OverlayTransition/OverlayRect/OverlayRectAnimationPlayer.play("transition")
yield(get_tree().create_timer(1.0), "timeout")
# warning-ignore:return_value_discarded
get_tree().change_scene("res://scenes/MainGame.tscn")
pass

23
scripts/Trail.gd

@ -0,0 +1,23 @@
extends Line2D
var target
var point
export(NodePath) var targetPath
export var trailLength = 0
func _ready():
target = get_node(targetPath)
pass
func _process(_delta):
global_position = Vector2(0, 0)
global_rotation = 0
point = target.global_position
add_point(point)
while(get_point_count() > trailLength):
remove_point(0)
pass
Loading…
Cancel
Save