mirror of
https://github.com/creyD/ludum_dare_46.git
synced 2026-06-12 21:42:23 +02:00
fixed script bugs
This commit is contained in:
6
src/Objects/Bonfire/Bonfire.gd
Normal file
6
src/Objects/Bonfire/Bonfire.gd
Normal file
@@ -0,0 +1,6 @@
|
||||
extends StaticBody2D
|
||||
|
||||
|
||||
|
||||
func _on_Hurtbox_area_entered(area):
|
||||
queue_free()
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://Overlap/HurtHit_Box/Hurtbox.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Objects/Banana/Bannana.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Objects/Bonfire/Bonfire.gd" type="Script" id=2]
|
||||
[ext_resource path="res://testSprites/Bonfire.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Overlap/HurtHit_Box/Hitbox.tscn" type="PackedScene" id=4]
|
||||
|
||||
|
||||
5
src/Objects/Heart/Heart.gd
Normal file
5
src/Objects/Heart/Heart.gd
Normal file
@@ -0,0 +1,5 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
func _on_Hurtbox_area_entered(area):
|
||||
queue_free()
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://Overlap/HurtHit_Box/Hurtbox.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Objects/Banana/Bannana.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Objects/Heart/Heart.gd" type="Script" id=2]
|
||||
[ext_resource path="res://testSprites/Herz.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://Overlap/HurtHit_Box/Hurtbox.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Objects/Banana/Bannana.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Objects/Rubies/Rubies.gd" type="Script" id=2]
|
||||
[ext_resource path="res://testSprites/blue_Rubi.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://Overlap/HurtHit_Box/Hurtbox.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Objects/Banana/Bannana.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Objects/Rubies/Rubies.gd" type="Script" id=2]
|
||||
[ext_resource path="res://testSprites/green_Rubi.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://Overlap/HurtHit_Box/Hurtbox.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Objects/Banana/Bannana.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Objects/Rubies/Rubies.gd" type="Script" id=2]
|
||||
[ext_resource path="res://testSprites/red_Rubi.png" type="Texture" id=3]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
|
||||
8
src/Objects/Rubies/Rubies.gd
Normal file
8
src/Objects/Rubies/Rubies.gd
Normal file
@@ -0,0 +1,8 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func _on_Hurtbox_area_entered(area):
|
||||
queue_free()
|
||||
@@ -1,16 +1,12 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Overlap/HurtHit_Box/Hitbox.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Objects/Banana/Bannana.gd" type="Script" id=2]
|
||||
[ext_resource path="res://testSprites/flame.png" type="Texture" id=3]
|
||||
|
||||
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
height = 6.36237
|
||||
|
||||
[node name="Flame" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
position = Vector2( 0.44072, -6.06005 )
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
extends Node2D
|
||||
|
||||
|
||||
|
||||
func _on_Hurtbox_area_entered(area):
|
||||
queue_free()
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
[gd_scene load_steps=6 format=2]
|
||||
[gd_scene load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://Overlap/HurtHit_Box/Hitbox.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://Objects/Traps/bear.gd" type="Script" id=2]
|
||||
[ext_resource path="res://Objects/Traps/Bear.gd" type="Script" id=2]
|
||||
[ext_resource path="res://testSprites/falle.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Overlap/HurtHit_Box/Hurtbox.tscn" type="PackedScene" id=4]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=1]
|
||||
height = 9.0
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=2]
|
||||
height = 9.0
|
||||
|
||||
[node name="Bear_trap" type="Node2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
@@ -22,9 +25,15 @@ collision_layer = 16
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Hurtbox" parent="Hitbox" instance=ExtResource( 4 )]
|
||||
[node name="Hurtbox" parent="." instance=ExtResource( 4 )]
|
||||
collision_layer = 32
|
||||
collision_mask = 0
|
||||
[connection signal="area_entered" from="Hitbox/Hurtbox" to="." method="_on_Hurtbox_area_entered"]
|
||||
|
||||
[node name="CollisionShape2D" parent="Hurtbox" index="0"]
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 2 )
|
||||
[connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"]
|
||||
|
||||
[editable path="Hitbox"]
|
||||
|
||||
[editable path="Hurtbox"]
|
||||
|
||||
@@ -116,8 +116,6 @@ func _on_Stats_no_health():
|
||||
get_tree().change_scene("res://Menus/TitleScreen/TitleScreen.tscn")
|
||||
|
||||
|
||||
|
||||
|
||||
func _on_Hitbox_area_entered(area):
|
||||
currency += area.currency_value
|
||||
player_stats.health = player_stats.health+area.health_value
|
||||
|
||||
@@ -601,12 +601,12 @@ start_node = "idle"
|
||||
[sub_resource type="AnimationNodeStateMachinePlayback" id=45]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=46]
|
||||
radius = 3.36373
|
||||
height = 6.59445
|
||||
radius = 4.5
|
||||
height = 0.2
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=47]
|
||||
radius = 3.40253
|
||||
height = 0.175497
|
||||
radius = 4.5
|
||||
height = 0.2
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=48]
|
||||
radius = 4.03497
|
||||
@@ -667,7 +667,7 @@ collision_layer = 0
|
||||
collision_mask = 32
|
||||
|
||||
[node name="CollisionShape2D" parent="Hitbox" index="0"]
|
||||
position = Vector2( 0.420105, -4.84456 )
|
||||
position = Vector2( 0, -0.5 )
|
||||
shape = SubResource( 46 )
|
||||
|
||||
[node name="Hurtbox" parent="." instance=ExtResource( 3 )]
|
||||
@@ -675,7 +675,7 @@ position = Vector2( 0, 0.0375252 )
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape2D" parent="Hurtbox" index="0"]
|
||||
position = Vector2( 0.0781527, -0.822231 )
|
||||
position = Vector2( 0, -0.5 )
|
||||
shape = SubResource( 47 )
|
||||
|
||||
[node name="Pivot" type="Position2D" parent="."]
|
||||
@@ -710,6 +710,7 @@ max_health = 5
|
||||
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
|
||||
[connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"]
|
||||
[connection signal="area_exited" from="Hurtbox" to="." method="_on_Hurtbox_area_exited"]
|
||||
[connection signal="no_health" from="Stats" to="." method="_on_Stats_no_health"]
|
||||
|
||||
[editable path="Hitbox"]
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
[ext_resource path="res://Objects/Bonfire/Bonfire.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://Objects/Traps/Sting.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://Objects/Rubies/Blue.tscn" type="PackedScene" id=9]
|
||||
[ext_resource path="res://Objects/Traps/bear.tscn" type="PackedScene" id=10]
|
||||
[ext_resource path="res://Objects/Traps/Bear.tscn" type="PackedScene" id=10]
|
||||
[ext_resource path="res://Objects/Heart/Heart.tscn" type="PackedScene" id=11]
|
||||
[ext_resource path="res://Objects/Rubies/Red.tscn" type="PackedScene" id=12]
|
||||
[ext_resource path="res://Objects/Rubies/Green.tscn" type="PackedScene" id=13]
|
||||
|
||||
Reference in New Issue
Block a user