restructured project
This commit is contained in:
40
MainMenu/MenuBackground.cs
Normal file
40
MainMenu/MenuBackground.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
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);
|
||||
//}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user