ajout de signal dying
This commit is contained in:
parent
d053eca147
commit
6469c6969f
@ -1,5 +1,31 @@
|
|||||||
[gd_scene format=2]
|
[gd_scene load_steps=3 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Materials/Dark_ProtoMat.tres" type="Material" id=1]
|
||||||
|
[ext_resource path="res://Player.tscn" type="PackedScene" id=3]
|
||||||
|
|
||||||
[node name="Spatial" type="Spatial"]
|
[node name="Spatial" type="Spatial"]
|
||||||
|
|
||||||
[node name="CSGCombiner" type="CSGCombiner" parent="."]
|
[node name="CSGCombiner" type="CSGCombiner" parent="."]
|
||||||
|
use_collision = true
|
||||||
|
|
||||||
|
[node name="Floor" type="CSGBox" parent="CSGCombiner"]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -6 )
|
||||||
|
snap = 1.0
|
||||||
|
width = 20.0
|
||||||
|
height = 6.0
|
||||||
|
depth = 30.0
|
||||||
|
material = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="FloorClear" type="CSGBox" parent="CSGCombiner"]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, -6 )
|
||||||
|
operation = 2
|
||||||
|
width = 18.0
|
||||||
|
height = 19.0
|
||||||
|
depth = 28.0
|
||||||
|
material = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="Sun" type="DirectionalLight" parent="."]
|
||||||
|
transform = Transform( 0.707107, -0.353553, 0.612372, 0, 0.866025, 0.5, -0.707107, -0.353553, 0.612372, 7.99925, 6, 7.97141 )
|
||||||
|
|
||||||
|
[node name="Player" parent="." instance=ExtResource( 3 )]
|
||||||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 4.17456, 5 )
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
extends KinematicBody
|
extends KinematicBody
|
||||||
|
|
||||||
|
signal dying
|
||||||
|
|
||||||
var hit_acceleration = 10
|
var hit_acceleration = 10
|
||||||
var hit_speed = 100
|
var hit_speed = 100
|
||||||
@ -47,6 +48,7 @@ func get_shot(hitboxOwner):
|
|||||||
die()
|
die()
|
||||||
|
|
||||||
func die():
|
func die():
|
||||||
|
emit_signal("dying")
|
||||||
particles.emitting = true
|
particles.emitting = true
|
||||||
hurtbox.disabled = true
|
hurtbox.disabled = true
|
||||||
hitbox.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://Scripts/HitBox.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://Scenes/Enemy.gd" type="Script" id=2]
|
[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
|
|
Loading…
x
Reference in New Issue
Block a user