mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
using Artemis.Core.Services;
|
|
|
|
namespace Artemis.Core.ScriptingProviders;
|
|
|
|
/// <summary>
|
|
/// Represents a script running globally
|
|
/// </summary>
|
|
public abstract class GlobalScript : Script
|
|
{
|
|
/// <inheritdoc />
|
|
protected GlobalScript(ScriptConfiguration configuration) : base(configuration)
|
|
{
|
|
}
|
|
|
|
internal ScriptingService? ScriptingService { get; set; }
|
|
|
|
/// <summary>
|
|
/// Called whenever the Artemis Core is about to update
|
|
/// </summary>
|
|
/// <param name="deltaTime">Seconds passed since last update</param>
|
|
public virtual void OnCoreUpdating(double deltaTime)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Called whenever the Artemis Core has been updated
|
|
/// </summary>
|
|
/// <param name="deltaTime">Seconds passed since last update</param>
|
|
public virtual void OnCoreUpdated(double deltaTime)
|
|
{
|
|
}
|
|
|
|
#region Overrides of Script
|
|
|
|
/// <inheritdoc />
|
|
public override ScriptType ScriptType => ScriptType.Global;
|
|
|
|
/// <inheritdoc />
|
|
internal override void InternalCleanup()
|
|
{
|
|
ScriptingService?.RemoveScript(ScriptConfiguration);
|
|
}
|
|
|
|
#endregion
|
|
} |