mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-04-19 13:59:22 -04:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
20 lines
599 B
C#
20 lines
599 B
C#
namespace Editor;
|
|
|
|
public abstract class ComponentTemplate
|
|
{
|
|
public virtual string NameFilter => "Cs File (*.cs)";
|
|
public virtual string Suffix => ".cs";
|
|
public virtual string DefaultDirectory => Project.Current.GetCodePath();
|
|
|
|
public abstract void Create( string componentName, string path );
|
|
|
|
/// <summary>
|
|
/// Get all component template types that aren't abstract.
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public static TypeDescription[] GetAllTypes()
|
|
{
|
|
return EditorTypeLibrary.GetTypes<ComponentTemplate>().OrderByDescending( x => x.Name ).Where( x => !x.IsAbstract ).ToArray();
|
|
}
|
|
}
|