Hands on my face
This commit is contained in:
parent
8fadd143c3
commit
0501476a6e
9 changed files with 67 additions and 15 deletions
|
|
@ -1,7 +1,7 @@
|
|||
extends Area3D
|
||||
|
||||
@export var dps: float
|
||||
@export var damage_timer: Timer
|
||||
@export var damage_timer: Timer
|
||||
|
||||
var damage_targets: Array[Player]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
[gd_scene load_steps=11 format=3 uid="uid://l4t1mflutm3t"]
|
||||
[gd_scene load_steps=12 format=3 uid="uid://l4t1mflutm3t"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bmnqvop2dy5pm" path="res://textures/prototype_yellow_256x256.png" id="1_hr7p8"]
|
||||
[ext_resource type="Script" uid="uid://bo0ij4miuksua" path="res://weapons/molikman/molik/molikman_molotov_fire.gd" id="1_qokq0"]
|
||||
[ext_resource type="Texture2D" uid="uid://b8aqstr5es5x4" path="res://textures/prototype_orange_256x256.png" id="2_qokq0"]
|
||||
[ext_resource type="Script" uid="uid://fdikw4xjemdk" path="res://weapons/molikman/molik/molotov_animation.gd" id="4_6lhod"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_hr7p8"]
|
||||
height = 3.0
|
||||
radius = 2.5
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_ykxjp"]
|
||||
resource_local_to_scene = true
|
||||
size = Vector3(7.5, 3, 7.5)
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_hr7p8"]
|
||||
colors = PackedColorArray(1, 0.53333336, 0, 1, 0.45, 0.45, 0.45, 1)
|
||||
|
|
@ -15,9 +16,9 @@ colors = PackedColorArray(1, 0.53333336, 0, 1, 0.45, 0.45, 0.45, 1)
|
|||
gradient = SubResource("Gradient_hr7p8")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_hr7p8"]
|
||||
emission_shape_scale = Vector3(1.5, 1.5, 1.5)
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 1.0
|
||||
resource_local_to_scene = true
|
||||
emission_shape = 3
|
||||
emission_box_extents = Vector3(3.75, 1.5, 3.75)
|
||||
direction = Vector3(0, 1, 0)
|
||||
initial_velocity_max = 3.4499998
|
||||
orbit_velocity_min = -0.46899992
|
||||
|
|
@ -37,6 +38,9 @@ text = "fire"
|
|||
properties/0/path = NodePath(".:position")
|
||||
properties/0/spawn = true
|
||||
properties/0/replication_mode = 1
|
||||
properties/1/path = NodePath("Decal:size")
|
||||
properties/1/spawn = true
|
||||
properties/1/replication_mode = 1
|
||||
|
||||
[node name="MolikmanMolotovFire" type="Area3D" node_paths=PackedStringArray("damage_timer")]
|
||||
collision_layer = 8
|
||||
|
|
@ -46,14 +50,14 @@ dps = 33.333
|
|||
damage_timer = NodePath("DamageTimer")
|
||||
|
||||
[node name="Decal" type="Decal" parent="."]
|
||||
size = Vector3(5, 3, 5)
|
||||
size = Vector3(7.5, 3, 7.5)
|
||||
texture_albedo = ExtResource("1_hr7p8")
|
||||
texture_emission = ExtResource("2_qokq0")
|
||||
emission_energy = 0.25
|
||||
cull_mask = 1048572
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("CylinderShape3D_hr7p8")
|
||||
shape = SubResource("BoxShape3D_ykxjp")
|
||||
|
||||
[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
|
||||
amount = 16
|
||||
|
|
@ -73,5 +77,13 @@ autostart = true
|
|||
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
|
||||
replication_config = SubResource("SceneReplicationConfig_ykxjp")
|
||||
|
||||
[connection signal="timeout" from="DieTimer" to="." method="queue_free"]
|
||||
[node name="MolotovAnimation" type="Node" parent="." node_paths=PackedStringArray("die_timer", "decal", "gpu_particles", "collision_shape")]
|
||||
script = ExtResource("4_6lhod")
|
||||
die_timer = NodePath("../DieTimer")
|
||||
decal = NodePath("../Decal")
|
||||
gpu_particles = NodePath("../GPUParticles3D")
|
||||
collision_shape = NodePath("../CollisionShape3D")
|
||||
expansion_mult = 1.333
|
||||
|
||||
[connection signal="timeout" from="DieTimer" to="MolotovAnimation" method="die"]
|
||||
[connection signal="timeout" from="DamageTimer" to="." method="damage"]
|
||||
|
|
|
|||
35
weapons/molikman/molik/molotov_animation.gd
Normal file
35
weapons/molikman/molik/molotov_animation.gd
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
extends Node
|
||||
|
||||
@export var die_timer: Timer
|
||||
@export var decal: Decal
|
||||
@export var gpu_particles: GPUParticles3D
|
||||
@export var collision_shape: CollisionShape3D
|
||||
@export var expansion_mult: float = 2.0
|
||||
|
||||
func _ready() -> void:
|
||||
var tween: Tween = create_tween().set_parallel()
|
||||
|
||||
var time:float = die_timer.wait_time-5.0
|
||||
|
||||
tween.tween_property(decal,"size:x",decal.size.x * expansion_mult,time)
|
||||
tween.tween_property(decal,"size:z",decal.size.z * expansion_mult,time)
|
||||
if multiplayer.is_server():
|
||||
tween.tween_property(collision_shape.shape,"size:x",decal.size.x*expansion_mult,time)
|
||||
tween.tween_property(collision_shape.shape,"size:z",decal.size.z*expansion_mult,time)
|
||||
tween.tween_property(gpu_particles.process_material,"emission_box_extents:x",gpu_particles.process_material.emission_box_extents.x*expansion_mult,time)
|
||||
tween.tween_property(gpu_particles.process_material,"emission_box_extents:y",gpu_particles.process_material.emission_box_extents.y*expansion_mult,time)
|
||||
|
||||
func die() -> void:
|
||||
var tween: Tween = create_tween().set_parallel()
|
||||
|
||||
var time:float = 1.0
|
||||
|
||||
tween.tween_property(decal,"size:x",1.0,time)
|
||||
tween.tween_property(decal,"size:z",1.0,time)
|
||||
tween.tween_property(decal,"modulate",Color.TRANSPARENT,time/2)
|
||||
tween.tween_property(gpu_particles.process_material,"emission_box_extents:x",1.0,time)
|
||||
tween.tween_property(gpu_particles.process_material,"emission_box_extents:y",1.0,time)
|
||||
if multiplayer.is_server():
|
||||
tween.tween_property(collision_shape.shape,"size:x",1.0,time)
|
||||
tween.tween_property(collision_shape.shape,"size:z",1.0,time)
|
||||
tween.chain().tween_callback(get_parent().queue_free)
|
||||
1
weapons/molikman/molik/molotov_animation.gd.uid
Normal file
1
weapons/molikman/molik/molotov_animation.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://fdikw4xjemdk
|
||||
Loading…
Add table
Add a link
Reference in a new issue