2021-03-07

+ IScriptable can now be disabled instancewise
+ IShowItem can disable rendering.

~ SM.Base.Mesh has now ILineMesh

- IGenericWindow.AspectRatioReverse
This commit is contained in:
Michel Fedde 2021-03-07 12:30:54 +01:00
parent c6bf5c75bc
commit 4efc47d75a
10 changed files with 16 additions and 10 deletions

View file

@ -45,7 +45,7 @@ namespace SM.Base.Scene
for (var i = 0; i < _scriptableObjects.Count; i++)
{
if (!_scriptableObjects[i].Active) continue;
if (!_scriptableObjects[i].Active || !_scriptableObjects[i].UpdateActive) continue;
_scriptableObjects[i].Update(context);
}
}
@ -57,7 +57,7 @@ namespace SM.Base.Scene
for (var i = 0; i < Objects.Count; i++)
{
if (!this[i].Active) continue;
if (!this[i].Active || !this[i].RenderActive) continue;
this[i].Draw(context);
}
}

View file

@ -9,6 +9,7 @@ namespace SM.Base.Scene
public interface IScriptable
{
bool Active { get; set; }
bool UpdateActive { get; set; }
/// <summary>
/// Updates the object.

View file

@ -31,7 +31,8 @@ namespace SM.Base.Scene
ICollection<string> Flags { get; set; }
bool Active { get; set; }
bool RenderActive { get; set; }
/// <summary>
/// Tells the object to draw its object.
/// </summary>