projectile pierre WIP
This commit is contained in:
parent
ce0aedd951
commit
e6dab8bc7f
7 changed files with 128 additions and 17 deletions
51
Towers/Projectiles/ImpactPierre.tscn
Normal file
51
Towers/Projectiles/ImpactPierre.tscn
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
[gd_scene load_steps=10 format=3 uid="uid://c5rx5scnkh3fb"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dqyhhvxpwtpsy" path="res://Assets/Emotes/emote_star.png" id="1_3pqxv"]
|
||||
[ext_resource type="Script" uid="uid://6xiqssgmiurt" path="res://Towers/Projectiles/impact_pierre.gd" id="2_ymm3v"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_ymm3v"]
|
||||
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.499044, 1), 0.0, 0.0, 0, 0, Vector2(0.745698, 0.50142), -0.0206361, -0.0206361, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
point_count = 4
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_a4ed8"]
|
||||
curve = SubResource("Curve_ymm3v")
|
||||
|
||||
[sub_resource type="Curve" id="Curve_vsx76"]
|
||||
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.506692, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
point_count = 3
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_doqb3"]
|
||||
curve = SubResource("Curve_vsx76")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_jk26u"]
|
||||
spread = 180.0
|
||||
initial_velocity_min = 0.1
|
||||
initial_velocity_max = 1.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
scale_curve = SubResource("CurveTexture_doqb3")
|
||||
alpha_curve = SubResource("CurveTexture_a4ed8")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_eujw3"]
|
||||
transparency = 1
|
||||
shading_mode = 0
|
||||
vertex_color_use_as_albedo = true
|
||||
albedo_texture = ExtResource("1_3pqxv")
|
||||
billboard_mode = 1
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_qw7ty"]
|
||||
material = SubResource("StandardMaterial3D_eujw3")
|
||||
size = Vector2(0.3, 0.3)
|
||||
|
||||
[node name="ImpactPierre" type="GPUParticles3D"]
|
||||
emitting = false
|
||||
amount = 20
|
||||
one_shot = true
|
||||
explosiveness = 1.0
|
||||
process_material = SubResource("ParticleProcessMaterial_jk26u")
|
||||
draw_pass_1 = SubResource("QuadMesh_qw7ty")
|
||||
script = ExtResource("2_ymm3v")
|
||||
|
||||
[node name="SFXImpact" type="AudioStreamPlayer3D" parent="."]
|
||||
bus = &"SFX"
|
||||
|
||||
[connection signal="finished" from="." to="." method="_on_finished"]
|
||||
58
Towers/Projectiles/ProjectilePierre.tscn
Normal file
58
Towers/Projectiles/ProjectilePierre.tscn
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://dsv2untvmg8q"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dqyhhvxpwtpsy" path="res://Assets/Emotes/emote_star.png" id="1_lcll5"]
|
||||
[ext_resource type="Script" uid="uid://bpy86kcsjgx0e" path="res://Towers/Projectiles/projectile_pierre.gd" id="2_i2vf7"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_qaid5"]
|
||||
transparency = 1
|
||||
shading_mode = 0
|
||||
vertex_color_use_as_albedo = true
|
||||
albedo_texture = ExtResource("1_lcll5")
|
||||
billboard_mode = 3
|
||||
particles_anim_h_frames = 1
|
||||
particles_anim_v_frames = 1
|
||||
particles_anim_loop = false
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_nkvug"]
|
||||
material = SubResource("StandardMaterial3D_qaid5")
|
||||
size = Vector2(0.2, 0.2)
|
||||
|
||||
[sub_resource type="Curve" id="Curve_lcll5"]
|
||||
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.509769, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
point_count = 3
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_i2vf7"]
|
||||
offsets = PackedFloat32Array(0, 0.379888, 1)
|
||||
colors = PackedColorArray(0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0)
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_nlum7"]
|
||||
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1)
|
||||
|
||||
[node name="ProjectilePierre" type="Sprite3D"]
|
||||
billboard = 2
|
||||
texture = ExtResource("1_lcll5")
|
||||
script = ExtResource("2_i2vf7")
|
||||
|
||||
[node name="CPUParticles3D" type="CPUParticles3D" parent="."]
|
||||
amount = 16
|
||||
lifetime = 0.5
|
||||
explosiveness = 0.2
|
||||
mesh = SubResource("QuadMesh_nkvug")
|
||||
emission_shape = 6
|
||||
emission_ring_axis = Vector3(0, 0, 1)
|
||||
emission_ring_height = 0.0
|
||||
emission_ring_radius = 0.3
|
||||
emission_ring_inner_radius = 0.0
|
||||
emission_ring_cone_angle = 90.0
|
||||
direction = Vector3(0, 0, 0)
|
||||
spread = 0.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
angular_velocity_min = 180.0
|
||||
angular_velocity_max = 360.0
|
||||
scale_amount_min = 0.0
|
||||
scale_amount_curve = SubResource("Curve_lcll5")
|
||||
color_ramp = SubResource("Gradient_i2vf7")
|
||||
color_initial_ramp = SubResource("Gradient_nlum7")
|
||||
|
||||
[node name="SFXCreate" type="AudioStreamPlayer3D" parent="."]
|
||||
bus = &"SFX"
|
||||
7
Towers/Projectiles/impact_pierre.gd
Normal file
7
Towers/Projectiles/impact_pierre.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends GPUParticles3D
|
||||
|
||||
func _ready() -> void:
|
||||
$SFXImpact.play()
|
||||
|
||||
func _on_finished() -> void:
|
||||
queue_free()
|
||||
1
Towers/Projectiles/impact_pierre.gd.uid
Normal file
1
Towers/Projectiles/impact_pierre.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://6xiqssgmiurt
|
||||
10
Towers/Projectiles/projectile_pierre.gd
Normal file
10
Towers/Projectiles/projectile_pierre.gd
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
extends Sprite3D
|
||||
|
||||
var impact : GPUParticles3D = preload("res://Towers/Projectiles/ImpactPierre.tscn").instantiate()
|
||||
|
||||
func _ready() -> void:
|
||||
$SFXCreate.play()
|
||||
|
||||
func on_impact() -> void:
|
||||
get_tree().root.add_child(impact)
|
||||
queue_free()
|
||||
1
Towers/Projectiles/projectile_pierre.gd.uid
Normal file
1
Towers/Projectiles/projectile_pierre.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bpy86kcsjgx0e
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://dsv2untvmg8q"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dqyhhvxpwtpsy" path="res://Assets/Emotes/emote_star.png" id="1_prplr"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_qaid5"]
|
||||
transparency = 1
|
||||
albedo_texture = ExtResource("1_prplr")
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_nkvug"]
|
||||
material = SubResource("StandardMaterial3D_qaid5")
|
||||
|
||||
[node name="ProjectileTest2" type="Sprite3D"]
|
||||
texture = ExtResource("1_prplr")
|
||||
|
||||
[node name="CPUParticles3D" type="CPUParticles3D" parent="."]
|
||||
mesh = SubResource("QuadMesh_nkvug")
|
||||
gravity = Vector3(0, 0, 0)
|
||||
Loading…
Add table
Reference in a new issue