ajout de signal dying
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user