added ParticleType
This commit is contained in:
10
Particle.cs
10
Particle.cs
@@ -2,16 +2,16 @@ using Godot;
|
||||
|
||||
public class Particle : Node2D
|
||||
{
|
||||
private float _spriteHue;
|
||||
private Sprite _spriteNode;
|
||||
private ParticleType _type;
|
||||
|
||||
public float Hue
|
||||
public ParticleType Type
|
||||
{
|
||||
get => _spriteHue;
|
||||
get => _type;
|
||||
set
|
||||
{
|
||||
_spriteHue = Mathf.Clamp(value, 0, 1);
|
||||
_spriteNode.Modulate = Color.FromHsv(_spriteHue, 1, 1);
|
||||
_type = value;
|
||||
_spriteNode.Modulate = Color.FromHsv(_type.Hue, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user