20.09.2020
+ Instance Drawing + Text and Font ~ Made "DrawBackground" forced Background for 2D - DrawEmpty
This commit is contained in:
parent
acccf5f0e7
commit
c4a0847567
29 changed files with 365 additions and 85 deletions
|
|
@ -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);
|
||||
|
|
|
|||
7
SMCode/SM.Base/Scene/IBackgroundItem.cs
Normal file
7
SMCode/SM.Base/Scene/IBackgroundItem.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
namespace SM.Base.Scene
|
||||
{
|
||||
public interface IBackgroundItem : IShowItem
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
9
SMCode/SM.Base/Scene/IShowCollection.cs
Normal file
9
SMCode/SM.Base/Scene/IShowCollection.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace SM.Base.Scene
|
||||
{
|
||||
public interface IShowCollection
|
||||
{
|
||||
List<IShowItem> Objects { get; }
|
||||
}
|
||||
}
|
||||
10
SMCode/SM.Base/Scene/IShowItem.cs
Normal file
10
SMCode/SM.Base/Scene/IShowItem.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using SM.Base.Contexts;
|
||||
|
||||
namespace SM.Base.Scene
|
||||
{
|
||||
public interface IShowItem
|
||||
{
|
||||
void Update(UpdateContext context);
|
||||
void Draw(DrawContext context);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue