Random Particles

This commit is contained in:
2021-12-26 15:56:57 -05:00
parent b84e5d4614
commit 49d664e472
9 changed files with 99 additions and 13 deletions

22
Particle.cs Normal file
View File

@@ -0,0 +1,22 @@
using Godot;
public class Particle : Node2D
{
private float _spriteHue;
private Sprite _spriteNode;
public float Hue
{
get => _spriteHue;
set
{
_spriteHue = Mathf.Clamp(value, 0, 1);
_spriteNode.Modulate = Color.FromHsv(_spriteHue, 1, 1);
}
}
public override void _Ready()
{
_spriteNode = GetNode<Sprite>("Sprite");
}
}