fixed script bugs

This commit is contained in:
Jonas Mucke
2020-04-18 19:09:22 +02:00
parent e6d0cf5203
commit f111f75133
14 changed files with 46 additions and 25 deletions

View File

@@ -0,0 +1,6 @@
extends StaticBody2D
func _on_Hurtbox_area_entered(area):
queue_free()

View File

@@ -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]

View File

@@ -0,0 +1,5 @@
extends Node2D
func _on_Hurtbox_area_entered(area):
queue_free()

View File

@@ -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]

View File

@@ -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]

View File

@@ -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]

View File

@@ -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]

View File

@@ -0,0 +1,8 @@
extends Node2D
func _on_Hurtbox_area_entered(area):
queue_free()

View File

@@ -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 )

View File

@@ -1,6 +1,4 @@
extends Node2D
func _on_Hurtbox_area_entered(area):
queue_free()

View File

@@ -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"]