server-master/srcs/WingsAPI.Scripting/IScriptFactory.cs
2026-02-10 18:21:30 +01:00

21 lines
No EOL
634 B
C#

using System.Reflection;
namespace WingsAPI.Scripting
{
/// <summary>
/// Script factory used to instantiate script of defined type
/// </summary>
/// <typeparam name="T">Type of the script created by this factory</typeparam>
public interface IScriptFactory
{
void RegisterAllScriptingObjectsInAssembly(Assembly assembly);
void RegisterType<T>();
/// <summary>
/// Create a new script from file
/// </summary>
/// <param name="path">Path to the file</param>
/// <returns>Script created</returns>
T LoadScript<T>(string path);
}
}