32 lines
No EOL
676 B
C#
32 lines
No EOL
676 B
C#
namespace KumiScript.Renderer
|
|
{
|
|
public class Scene
|
|
{
|
|
SDLRenderer _renderer;
|
|
List<SceneElement> _elements;
|
|
public Scene(SDLRenderer renderer)
|
|
{
|
|
_renderer = renderer;
|
|
_elements = new List<SceneElement>(16);
|
|
}
|
|
|
|
public void DrawScene()
|
|
{
|
|
foreach (SceneElement e in _elements)
|
|
{
|
|
e.Draw(0, 0);
|
|
}
|
|
}
|
|
|
|
public void AddElement(SceneElement e)
|
|
{
|
|
_elements.Add(e);
|
|
return;
|
|
}
|
|
|
|
public bool RemoveElement(SceneElement e)
|
|
{
|
|
return _elements.Remove(e);
|
|
}
|
|
}
|
|
} |