mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 03:19:56 +00:00
Layers - Fixed a bunch of timeline issues with events
This commit is contained in:
1 parent
86d6e540d7
commit
3220ded4eb
7 files changed
+57
-85
No files matched your search
@@ -198,11 +198,12 @@ namespace Artemis.Core
|
||||
layerPropertyGroup.ApplyToEntity();
|
||||
}
|
||||
|
||||
internal void Update(double deltaTime)
|
||||
internal void Update(TimeSpan renderTime, double deltaTime)
|
||||
{
|
||||
// Since at this point we don't know what properties the group has without using reflection,
|
||||
// let properties subscribe to the update event and update themselves
|
||||
OnPropertyGroupUpdating(new LayerPropertyGroupUpdatingEventArgs(deltaTime));
|
||||
foreach (ILayerProperty layerProperty in LayerProperties)
|
||||
layerProperty.Update(renderTime, deltaTime);
|
||||
foreach (LayerPropertyGroup layerPropertyGroup in LayerPropertyGroups)
|
||||
layerPropertyGroup.Update(renderTime, deltaTime);
|
||||
}
|
||||
|
||||
private void InitializeProperty(PropertyInfo propertyInfo, PropertyDescriptionAttribute propertyDescription)
|
||||
@@ -266,8 +267,6 @@ namespace Artemis.Core
|
||||
|
||||
#region Events
|
||||
|
||||
internal event EventHandler<LayerPropertyGroupUpdatingEventArgs> PropertyGroupUpdating;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the property group has initialized all its children
|
||||
/// </summary>
|
||||
@@ -284,11 +283,6 @@ namespace Artemis.Core
|
||||
/// </summary>
|
||||
public event EventHandler VisibilityChanged;
|
||||
|
||||
internal virtual void OnPropertyGroupUpdating(LayerPropertyGroupUpdatingEventArgs e)
|
||||
{
|
||||
PropertyGroupUpdating?.Invoke(this, e);
|
||||
}
|
||||
|
||||
internal virtual void OnVisibilityChanged()
|
||||
{
|
||||
VisibilityChanged?.Invoke(this, EventArgs.Empty);
|
||||
@@ -300,16 +294,5 @@ namespace Artemis.Core
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Resets the internal state of the property group
|
||||
/// </summary>
|
||||
public void Reset()
|
||||
{
|
||||
foreach (ILayerProperty layerProperty in LayerProperties)
|
||||
layerProperty.Reset();
|
||||
foreach (LayerPropertyGroup layerPropertyGroup in LayerPropertyGroups)
|
||||
layerPropertyGroup.Reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user