particles/MainMenu/MenuBackground.cs

41 lines
1.1 KiB
C#
Raw Normal View History

2022-01-18 12:01:37 -05:00
using Godot;
using System;
public class MenuBackground : Node2D
{
private Node2D _particleNodes;
public override void _Ready()
{
//_particleNodes = GetNode<Node2D>("ParticlesNodes");
//var particleScene = GD.Load<PackedScene>("res://ParticleSimulation/ParticleNode.tscn");
//var particleNode = particleScene.Instance<ParticleNode>();
//_particleNodes.AddChild(particleNode);
}
public void SetParticleCount(int nParticles)
{
int currentCount = _particleNodes.GetChildCount();
if (currentCount < nParticles)
{
int addCount = nParticles - currentCount;
for (int i = 0; i < addCount; i++)
{
}
}
}
//TODO add private method to add particles
public override void _Process(float delta)
{
//var particleNodesArray = _particleNodes.GetChildren();
//foreach (ParticleNode particle in particleNodesArray)
//{
// particle.Position += new Vector2(0.1f, 0f);
//}
}
}