From 9704b68baf221d0705ee1e4763dd563400e10869 Mon Sep 17 00:00:00 2001 From: Alket Rexhepi Date: Sun, 6 Mar 2016 11:47:16 +0100 Subject: [PATCH] Release tag 0.9 --- graphics/hud/bg.png | Bin 3094 -> 1061 bytes scenes/game_won.tscn | 16 ++++++++++++---- scenes/main.tscn | 10 +++++----- scenes/main_menu.tscn | 35 ++++++++++++++++++++--------------- scripts/enemy.gd | 2 ++ scripts/enemy_2.gd | 1 + scripts/game_won.gd | 9 +++++++++ scripts/global.gd | 2 +- scripts/player.gd | 1 + scripts/world.gd | 1 + 10 files changed, 52 insertions(+), 25 deletions(-) create mode 100644 scripts/game_won.gd diff --git a/graphics/hud/bg.png b/graphics/hud/bg.png index d8d0930e17f077577aa47777970a72f1e69161f2..448a6d6a981111267eebf2a500b1acef7edf0fa3 100644 GIT binary patch literal 1061 zcmeAS@N?(olHy`uVBq!ia0y~yU=#(i<2cwrB5Vym85o$~c)B=-RLpsM*LJl`s0{mq z&6~mmg=a5_WpeWBmezGSqSPy(qRFyxt3c3C!7suU+6SH9xNHdc(&T$U+$FG>`*ebE zcf*p7ommbwiEDM{)Xtnc_x_nTZ|wYM-rbpg?#z?pmc{?S&pDZ6HhZerxxK}E|9rVE zKiRi`{@${klfT{mcW2+;e`n8rI=0U@3c{oAfDUVUqQspLvz16sHQR6`mxu$hgJ+8XEo z^qTf`FU`~|zo+O-dUt(QZS9L=7tTLh_WNJY+=tbxJ?(NDpy;fU)?3@SO9|*gEUR+f=m+SWWb#jYx*Isbfw+TJfWi{jE!;9yx zCT*C5!?Gz>Q&oT6Gfq2E+xY60$1R}WW$%Z|o{sqbSF);i;kN5%aaffVbnj2fi(-bd z4qOHU16k)%$l|<%bDrD%*i}>b``t0=(yOxjy<@unCM*F*$*C{PA3b<;xcAz#Js(c2 z{Pa7%{{QU~{K zbakls{ok8TUVr}O=Kif+_w)W0)u&E<;mq&1SU>J}UcSe=w`t$r?kbI4I`_@|m;B&_ zQU7~$`mAe5FZ8~$p0sPf)3e^+oczB2YV_VKT28EN8y@^Udg}iLae3Rz4{xT- zgm}#8?@i;3eG3 zt*Z06FUx~d_T`{w&x^0_yuIk?+|~2L*BZO4tbe;VX6gCN;QQxO?!PsSO{kTP{gyxV zRk5LNYMov9+}*lScXs;Cc9Jo>esu32|M}ci-~al2yBl|z_1f)i*Pj&{c*^0t^an3``71I2;%nBp5ju1e6&V8Ip#OqB*y| zF(kyghwH81`uAt~dp`NPKR3_G*5Cbm?(M6+?T5Gi?*I2bTRm5=n=kK9T;}e{cJGbN z-}AKl&+onWZpr!TtM8@#gu)5=`8C6#c~RxHhhvSt#?;mSeDvYj_x-;QU7x--+x+UT z!r=4OH}}lj^ZD4u_4_kwUf0Rpj=L?)6~jo4K=#Y6X4sJ1e}CVWw~9VVmp|{SdjGKC z?Z3sn?Rq{uA-keuGfFs{k?7fpU?Lv=kE8f5j(ICVciZ^p6X|hc20NS`~T3*%ZJtH*MFQk z-}c9g{j+6+7_8lZ>80|&xV_xhfAO)u4qmS-D|q~ESsU{Kz9Mc3KHa^c3~*8fkv+}gL@clNy3>uRU3 zo>eWkyKIl^`hU;XFTS@wBmNxs4N;~EE$#n*ez~zf@8jF)X20VT-#yNqe7?+d>-pSQ z`}H=z{dv&yv6un0@F?_^u?Rf2&iaIj*!-8#-^^G1|M*#6_wMuT{eN$tdR!QHz=BDj z;o>p7%imv>pYt&hN)XLsWQLY9+Z!5%Q*Tz~=N$k2ziQJL+tYc>@iyN-h5xgCX14h= z(=ow@1D%_4_L^^dJo^vR@l8kPh}Ta{IdkaDIc|yLx(U!?3h0#T#E(B0A5HJon`3KR z^XaF!{+)losPO)N(&pMmdKI;Vst E0G^OB_y7O^ diff --git a/scenes/game_won.tscn b/scenes/game_won.tscn index 6398cdc..cd23b07 100644 --- a/scenes/game_won.tscn +++ b/scenes/game_won.tscn @@ -1,11 +1,19 @@ -[gd_scene load_steps=2 format=1] +[gd_scene load_steps=4 format=1] -[ext_resource path="res://fonts/cave_story_32.fnt" type="Font" id=1] +[ext_resource path="res://scripts/game_won.gd" type="Script" id=1] +[ext_resource path="res://graphics/backgrounds/fallback.jpg" type="Texture" id=2] +[ext_resource path="res://fonts/cave_story_32.fnt" type="Font" id=3] [node name="game_won" type="Node2D"] +script/script = ExtResource( 1 ) __meta__ = { "__editor_plugin_screen__":"Script" } +[node name="Sprite" type="Sprite" parent="."] + +transform/pos = Vector2( 320, 240 ) +texture = ExtResource( 2 ) + [node name="Label" type="Label" parent="."] margin/right = 640.0 @@ -13,8 +21,8 @@ margin/bottom = 480.0 focus/ignore_mouse = true focus/stop_mouse = true size_flags/horizontal = 2 -custom_fonts/font = ExtResource( 1 ) -text = "Yaaay !!!\nYou completed all levels.\n\nFollow\nhttps://github.com/alketii/Herbi\nfor more levels and updates.\n\nThank you very much for playing." +custom_fonts/font = ExtResource( 3 ) +text = "Yaaay !!!\nYou completed all levels.\n\nFor more information and updates visit\nhttp://kobuge-games.github.io/Herbi\n\nversion 0.9\n\nKOBGUE-GAMES | GodotEngine.org\n\nThank you very much for playing.\n\nPress Escape ..." align = 1 valign = 1 percent_visible = 1.0 diff --git a/scenes/main.tscn b/scenes/main.tscn index 3f20460..47e7eb5 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -42,17 +42,17 @@ samples/pop = { "db":0.0, "pitch":1.0, "sample":ExtResource( 25 ) } samples/damage = { "db":0.0, "pitch":1.0, "sample":ExtResource( 11 ) } samples/healthgain = { "db":0.0, "pitch":1.0, "sample":ExtResource( 17 ) } samples/melon3 = { "db":0.0, "pitch":1.0, "sample":ExtResource( 23 ) } -samples/ennemy = { "db":0.0, "pitch":1.0, "sample":ExtResource( 16 ) } -samples/diamond1 = { "db":0.0, "pitch":1.0, "sample":ExtResource( 12 ) } -samples/diamond2 = { "db":0.0, "pitch":1.0, "sample":ExtResource( 13 ) } -samples/melon1 = { "db":0.0, "pitch":1.0, "sample":ExtResource( 21 ) } -samples/diamond3 = { "db":0.0, "pitch":1.0, "sample":ExtResource( 14 ) } samples/melon = { "db":0.0, "pitch":1.0, "sample":ExtResource( 20 ) } samples/1hp = { "db":0.0, "pitch":1.0, "sample":ExtResource( 10 ) } samples/pick = { "db":0.0, "pitch":1.0, "sample":ExtResource( 24 ) } samples/diamond4 = { "db":0.0, "pitch":1.0, "sample":ExtResource( 15 ) } samples/killmonster = { "db":0.0, "pitch":1.0, "sample":ExtResource( 19 ) } samples/melon2 = { "db":0.0, "pitch":1.0, "sample":ExtResource( 22 ) } +samples/ennemy = { "db":0.0, "pitch":1.0, "sample":ExtResource( 16 ) } +samples/diamond1 = { "db":0.0, "pitch":1.0, "sample":ExtResource( 12 ) } +samples/diamond2 = { "db":0.0, "pitch":1.0, "sample":ExtResource( 13 ) } +samples/melon1 = { "db":0.0, "pitch":1.0, "sample":ExtResource( 21 ) } +samples/diamond3 = { "db":0.0, "pitch":1.0, "sample":ExtResource( 14 ) } [node name="world" type="Node2D"] diff --git a/scenes/main_menu.tscn b/scenes/main_menu.tscn index dbb841a..7301120 100644 --- a/scenes/main_menu.tscn +++ b/scenes/main_menu.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=4 format=1] +[gd_scene load_steps=5 format=1] [ext_resource path="res://scripts/main_menu.gd" type="Script" id=1] -[ext_resource path="res://graphics/hud/bg.png" type="Texture" id=2] -[ext_resource path="res://fonts/cave_story_32.fnt" type="Font" id=3] +[ext_resource path="res://graphics/backgrounds/fallback.jpg" type="Texture" id=2] +[ext_resource path="res://graphics/hud/bg.png" type="Texture" id=3] +[ext_resource path="res://fonts/cave_story_32.fnt" type="Font" id=4] [node name="menu" type="Node2D"] @@ -14,17 +15,22 @@ __meta__ = { "__editor_plugin_screen__":"Script" } transform/pos = Vector2( 320, 240 ) texture = ExtResource( 2 ) -[node name="Label" type="Label" parent="."] +[node name="logo" type="Sprite" parent="."] -margin/left = 5.0 -margin/top = 157.0 -margin/right = 634.0 -margin/bottom = 366.0 +transform/pos = Vector2( 320, 60 ) +texture = ExtResource( 3 ) + +[node name="intro" type="Label" parent="."] + +margin/left = 6.0 +margin/top = 133.0 +margin/right = 635.0 +margin/bottom = 456.0 focus/ignore_mouse = true focus/stop_mouse = true size_flags/horizontal = 2 -custom_fonts/font = ExtResource( 3 ) -text = "SPACE = Start Game / Jump\nX = Throw Apple\nESCAPE = Main Menu\nF2 = Restart Level\nF3 = Toggle Music\nF9 = Quit\n\nCoded by @alketii\nAudio by @ObaniGemini\n\nKOBGUE-GAMES | GodotEngine.org" +custom_fonts/font = ExtResource( 4 ) +text = "SPACE = Start Game / Jump\nX = Throw Apple\nESCAPE = Main Menu\nF2 = Restart Level\nF3 = Toggle Music\nF9 = Quit\n\nCoded by @alketii, @bojidar_bg\nAudio by @ObaniGemini\nLevels by everyone\n\nFor more information visit\nhttp://kobuge-games.github.io/Herbi\n\nversion 0.9\n\nKOBGUE-GAMES | GodotEngine.org" align = 1 valign = 1 percent_visible = 1.0 @@ -34,14 +40,13 @@ max_lines_visible = -1 [node name="debug_info" type="Label" parent="."] visibility/visible = false -margin/left = 5.0 -margin/top = 342.0 -margin/right = 634.0 -margin/bottom = 509.0 +margin/left = -223.0 +margin/top = -20.0 +margin/right = 406.0 +margin/bottom = 147.0 focus/ignore_mouse = true focus/stop_mouse = true size_flags/horizontal = 2 -custom_fonts/font = ExtResource( 3 ) text = "*** DEBUG MODE ***\nT = Load level_0.tscn\nD = Next Level\nA = Previous Level\nW = +1 Life\nS = -1 Life" align = 1 valign = 1 diff --git a/scripts/enemy.gd b/scripts/enemy.gd index c322882..6a2ac4e 100644 --- a/scripts/enemy.gd +++ b/scripts/enemy.gd @@ -35,7 +35,9 @@ func _fixed_process(delta): func _on_Area2D_body_enter( body ): if body.get_name() == "player": + get_node("/root/world/SamplePlayer2D").play("killmonster") player_vy = player.velocity.y if player.get_pos().y+37 > get_pos().y and player_vy <= 0: get_node("/root/world").remove_life() queue_free() + diff --git a/scripts/enemy_2.gd b/scripts/enemy_2.gd index da7e952..c3d9b65 100644 --- a/scripts/enemy_2.gd +++ b/scripts/enemy_2.gd @@ -77,6 +77,7 @@ func has_path_to_target(target, distance = 30): func _on_Area2D_body_enter( body ): if body.get_name() == "player": + get_node("/root/world/SamplePlayer2D").play("ennemy") player_vy = player.velocity.y if player.get_pos().y+37 > get_pos().y and player_vy <= 0: get_node("/root/world").remove_life() diff --git a/scripts/game_won.gd b/scripts/game_won.gd new file mode 100644 index 0000000..fedd500 --- /dev/null +++ b/scripts/game_won.gd @@ -0,0 +1,9 @@ +extends Node2D + +func _ready(): + set_process_input(true) + +func _fixed_process(delta): + if not event.is_echo() && event.is_pressed(): + if event.is_action("ui_cancel"): + get_tree().change_scene("res://scenes/main_menu.tscn") \ No newline at end of file diff --git a/scripts/global.gd b/scripts/global.gd index b47994e..9d8209e 100644 --- a/scripts/global.gd +++ b/scripts/global.gd @@ -1,6 +1,6 @@ extends Node -var debug = true +var debug = false var level = 1 var score = 0 var lives = 3 diff --git a/scripts/player.gd b/scripts/player.gd index 5abf30d..440f589 100644 --- a/scripts/player.gd +++ b/scripts/player.gd @@ -143,6 +143,7 @@ func _fixed_process(delta): # Makes controls more snappy. velocity.y = -JUMP_SPEED jumping = true + get_node("/root/world/SamplePlayer2D").play("jump") on_air_time += delta prev_jump_pressed = jump diff --git a/scripts/world.gd b/scripts/world.gd index df1dcb0..a784deb 100644 --- a/scripts/world.gd +++ b/scripts/world.gd @@ -37,6 +37,7 @@ func add_life(): func remove_life(): if not shield: + get_node("/root/world/SamplePlayer2D").play("damage") global.lives -= 1 shield = true get_node("player").set_opacity(0.5)