newlon/scripts/components/level/PoolContainer.cs

25 lines
804 B
C#

using Godot;
using System.Collections.Generic;
//
// PoolContainer contains nodes that contain different elemnts that generate during runtime
// Is not pool in traditional sense, but named like that to prevent repetition
//
public partial class PoolContainer : Node
{
[Export]
public CanvasLayer Zombies { get; private set; }
[Export]
public CanvasLayer Plants { get; private set; }
[Export]
public CanvasLayer Projectiles { get; private set; }
[Export]
public CanvasLayer Structures { get; private set; }
public Dictionary<Vector2, IEntity>[] EntityField = { new Dictionary<Vector2, IEntity>(), new Dictionary<Vector2, IEntity>(), new Dictionary<Vector2, IEntity>() };
public override void _Ready()
{
LevelController.Instance.Pools = this;
}
}