BOOM Poteau

This commit is contained in:
MarcEricMartel 2022-10-11 21:24:46 -04:00
parent d31b299251
commit 92045620ec
2 changed files with 8 additions and 2 deletions

View File

@ -12,6 +12,7 @@ var gravity_vec = Vector3()
onready var hurtbox = $Hurtbox/HeadCollision onready var hurtbox = $Hurtbox/HeadCollision
onready var hitbox = $HitBox/CollisionShape onready var hitbox = $HitBox/CollisionShape
onready var animation_player = $AnimationPlayer onready var animation_player = $AnimationPlayer
onready var Explosion = $Explosion
func _ready(): func _ready():
animation_player.play("floating") animation_player.play("floating")
@ -44,6 +45,7 @@ func get_slapped(slap_level, slap_kill, slap_vector):
func get_shot(hitboxOwner): func get_shot(hitboxOwner):
hitboxOwner.die() hitboxOwner.die()
Explosion.play()
die() die()
func die(): func die():

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=14 format=2] [gd_scene load_steps=15 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]
@ -6,6 +6,7 @@
[ext_resource path="res://Textures/MetalCorrodedHeavy001/MetalCorrodedHeavy001_METALNESS_1K_METALNESS.jpg" type="Texture" id=4] [ext_resource path="res://Textures/MetalCorrodedHeavy001/MetalCorrodedHeavy001_METALNESS_1K_METALNESS.jpg" type="Texture" id=4]
[ext_resource path="res://Textures/MetalCorrodedHeavy001/MetalCorrodedHeavy001_Flat.jpg" type="Texture" id=5] [ext_resource path="res://Textures/MetalCorrodedHeavy001/MetalCorrodedHeavy001_Flat.jpg" type="Texture" id=5]
[ext_resource path="res://Textures/MetalCorrodedHeavy001/MetalCorrodedHeavy001_NRM_1K_METALNESS.jpg" type="Texture" id=6] [ext_resource path="res://Textures/MetalCorrodedHeavy001/MetalCorrodedHeavy001_NRM_1K_METALNESS.jpg" type="Texture" id=6]
[ext_resource path="res://Audio/boom.wav" type="AudioStream" id=7]
[sub_resource type="SphereMesh" id=6] [sub_resource type="SphereMesh" id=6]
@ -25,7 +26,6 @@ normal_texture = ExtResource( 6 )
[sub_resource type="SphereShape" id=7] [sub_resource type="SphereShape" id=7]
[sub_resource type="SphereShape" id=8] [sub_resource type="SphereShape" id=8]
radius = 1.53964
[sub_resource type="SphereShape" id=9] [sub_resource type="SphereShape" id=9]
@ -104,3 +104,7 @@ disabled = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/RESET = SubResource( 10 ) anims/RESET = SubResource( 10 )
anims/floating = SubResource( 11 ) anims/floating = SubResource( 11 )
[node name="Explosion" type="AudioStreamPlayer3D" parent="."]
stream = ExtResource( 7 )
bus = "SFX"