ajout de signal dying

This commit is contained in:
Victor Turgeon
2022-10-12 11:08:26 -04:00
parent d053eca147
commit 6469c6969f
4 changed files with 30 additions and 19 deletions

View File

@@ -1,5 +1,6 @@
extends KinematicBody
signal dying
var hit_acceleration = 10
var hit_speed = 100
@@ -47,6 +48,7 @@ func get_shot(hitboxOwner):
die()
func die():
emit_signal("dying")
particles.emitting = true
hurtbox.disabled = true
hitbox.disabled = true

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=18 format=2]
[gd_scene load_steps=16 format=2]
[ext_resource path="res://Scripts/HitBox.gd" type="Script" id=1]
[ext_resource path="res://Scenes/Enemy.gd" type="Script" id=2]

View File

@@ -1,17 +0,0 @@
[gd_resource type="SpatialMaterial" load_steps=2 format=2]
[sub_resource type="SpatialMaterial" id=17]
flags_transparent = true
flags_unshaded = true
params_cull_mode = 1
params_grow = true
params_grow_amount = 0.05
albedo_color = Color( 0, 0, 0, 1 )
[resource]
next_pass = SubResource( 17 )
params_diffuse_mode = 4
params_specular_mode = 3
albedo_color = Color( 0.164706, 0.921569, 0.0784314, 1 )
metallic = 0.6
roughness = 0.1