add spawning
This commit is contained in:
66
src/NPCs/femalegoblin.tscn
Normal file
66
src/NPCs/femalegoblin.tscn
Normal file
@@ -0,0 +1,66 @@
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://NPCs/goblin.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Audio/Hits/goblininjured.ogg" type="AudioStream" id=2]
|
||||
[ext_resource path="res://NPCs/femalegoblin.gd" type="Script" id=3]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 3.90875, 3.7602 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=2]
|
||||
extents = Vector2( 4.13172, 3.98318 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=3]
|
||||
extents = Vector2( 4.0574, 3.7602 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=4]
|
||||
extents = Vector2( 4.875, 4.94941 )
|
||||
|
||||
[node name="femalegoblin" type="KinematicBody2D"]
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="goblin" type="Sprite" parent="."]
|
||||
position = Vector2( 0.380203, -0.127379 )
|
||||
texture = ExtResource( 1 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="." groups=[
|
||||
"goblin",
|
||||
]]
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="." groups=[
|
||||
"goblin",
|
||||
]]
|
||||
collision_layer = 32
|
||||
collision_mask = 16
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox" groups=[
|
||||
"goblin",
|
||||
]]
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="Hurtbox" type="Area2D" parent="." groups=[
|
||||
"goblin",
|
||||
]]
|
||||
collision_layer = 64
|
||||
collision_mask = 2
|
||||
|
||||
[node name="death" type="AudioStreamPlayer" parent="Hurtbox"]
|
||||
stream = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hurtbox" groups=[
|
||||
"goblin",
|
||||
]]
|
||||
shape = SubResource( 3 )
|
||||
|
||||
[node name="Romance" type="Area2D" parent="." groups=[
|
||||
"femalegoblin",
|
||||
]]
|
||||
collision_layer = 128
|
||||
collision_mask = 128
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Romance"]
|
||||
shape = SubResource( 4 )
|
||||
[connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"]
|
||||
[connection signal="finished" from="Hurtbox/death" to="." method="_on_death_finished"]
|
||||
[connection signal="area_entered" from="Romance" to="." method="_on_Romance_area_entered"]
|
Reference in New Issue
Block a user