Skip to content

Commit

Permalink
Release tag 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
alketii committed Mar 6, 2016
1 parent 1c09d53 commit 9704b68
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 25 deletions.
Binary file modified graphics/hud/bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 12 additions & 4 deletions scenes/game_won.tscn
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
[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
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
Expand Down
10 changes: 5 additions & 5 deletions scenes/main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
35 changes: 20 additions & 15 deletions scenes/main_menu.tscn
Original file line number Diff line number Diff line change
@@ -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"]

Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions scripts/enemy.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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()

1 change: 1 addition & 0 deletions scripts/enemy_2.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
9 changes: 9 additions & 0 deletions scripts/game_won.gd
Original file line number Diff line number Diff line change
@@ -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")
2 changes: 1 addition & 1 deletion scripts/global.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extends Node

var debug = true
var debug = false
var level = 1
var score = 0
var lives = 3
Expand Down
1 change: 1 addition & 0 deletions scripts/player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions scripts/world.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9704b68

Please sign in to comment.