20.09.2020

+ Instance Drawing
+ Text and Font

~ Made "DrawBackground" forced Background for 2D

- DrawEmpty
This commit is contained in:
Michel Fedde 2020-09-20 18:29:09 +02:00
parent acccf5f0e7
commit c4a0847567
29 changed files with 365 additions and 85 deletions

View file

@ -8,7 +8,7 @@ namespace SM.Base.Scene
where TCamera : GenericCamera, new()
{
public IShowItem Background;
protected IBackgroundItem _background;
public List<IShowItem> HUD { get; } = new List<IShowItem>();
public List<IShowItem> Objects { get; } = new List<IShowItem>();
public TCamera Camera { get; set; }
@ -21,7 +21,7 @@ namespace SM.Base.Scene
DrawContext backgroundDrawContext = context;
backgroundDrawContext.View = BackgroundCamera.CalculateViewMatrix();
Background?.Draw(backgroundDrawContext);
_background?.Draw(backgroundDrawContext);
for(int i = 0; i < Objects.Count; i++)
Objects[i].Draw(context);

View file

@ -0,0 +1,7 @@
namespace SM.Base.Scene
{
public interface IBackgroundItem : IShowItem
{
}
}

View file

@ -0,0 +1,9 @@
using System.Collections.Generic;
namespace SM.Base.Scene
{
public interface IShowCollection
{
List<IShowItem> Objects { get; }
}
}

View file

@ -0,0 +1,10 @@
using SM.Base.Contexts;
namespace SM.Base.Scene
{
public interface IShowItem
{
void Update(UpdateContext context);
void Draw(DrawContext context);
}
}