ajout des mutation et refonte de l'inspecteur
* ajout des mutations #86 * changement de l'objectif #85 * refonte de l'inspecteur #71 * changement léger de la plantation * les plantes ne donnent que des graines de leurs espèces * refonte partielle du code, refacto
This commit is contained in:
32
common/vfx/particles/particles.tscn
Normal file
32
common/vfx/particles/particles.tscn
Normal file
@@ -0,0 +1,32 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://bg7jmrwdgdqg4"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://baaujfw8piywi" path="res://common/icons/dna.svg" id="1_88fy1"]
|
||||
[ext_resource type="Script" uid="uid://bddlpqlfrydn8" path="res://common/vfx/particles/scripts/particles.gd" id="1_faap1"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_xmi7c"]
|
||||
_limits = [-200.0, 200.0, 0.0, 1.0]
|
||||
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(0.2513369, 200), 0.0, 0.0, 0, 0, Vector2(0.7540107, -200), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 4
|
||||
|
||||
[sub_resource type="Curve" id="Curve_22a4c"]
|
||||
_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.2620321, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_li6gc"]
|
||||
offsets = PackedFloat32Array(0, 0.80172414, 1)
|
||||
colors = PackedColorArray(1, 1, 1, 0.65882355, 1, 1, 1, 0.72156864, 1, 1, 1, 0)
|
||||
|
||||
[node name="Particles" type="CPUParticles2D"]
|
||||
amount = 1
|
||||
texture = ExtResource("1_88fy1")
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 30.0
|
||||
gravity = Vector2(0, -20)
|
||||
tangential_accel_min = -0.1
|
||||
tangential_accel_max = 0.1
|
||||
tangential_accel_curve = SubResource("Curve_xmi7c")
|
||||
scale_amount_min = 0.4
|
||||
scale_amount_max = 0.6
|
||||
scale_amount_curve = SubResource("Curve_22a4c")
|
||||
color_ramp = SubResource("Gradient_li6gc")
|
||||
script = ExtResource("1_faap1")
|
||||
18
common/vfx/particles/scripts/particles.gd
Normal file
18
common/vfx/particles/scripts/particles.gd
Normal file
@@ -0,0 +1,18 @@
|
||||
extends CPUParticles2D
|
||||
class_name Particles
|
||||
|
||||
func setup_particles(param : Parameters):
|
||||
texture = param.texture
|
||||
modulate = param.color
|
||||
emitting = true
|
||||
|
||||
class Parameters:
|
||||
var texture : Texture
|
||||
var color : Color
|
||||
|
||||
func _init(
|
||||
_texture : Texture,
|
||||
_color : Color = Color.WHITE
|
||||
):
|
||||
texture = _texture
|
||||
color = _color
|
||||
1
common/vfx/particles/scripts/particles.gd.uid
Normal file
1
common/vfx/particles/scripts/particles.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://bddlpqlfrydn8
|
||||
Reference in New Issue
Block a user