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:
parent
c6bf5c75bc
commit
4efc47d75a
10 changed files with 16 additions and 10 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ namespace SM.Base.Scene
|
|||
public interface IScriptable
|
||||
{
|
||||
bool Active { get; set; }
|
||||
bool UpdateActive { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updates the object.
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue