Class Template<TSelf>
- Namespace
- AlphaFramework.World.Templates
- Assembly
- AlphaFramework.World.dll
A set of data used as a prototype for constructing new objects at runtime.
public abstract class Template<TSelf> : INamed, IHighlightColor, ICloneable, IComparable<TSelf> where TSelf : Template<TSelf>
Type Parameters
TSelf
The type of the class itself.
- Inheritance
-
Template<TSelf>
- Implements
-
IComparable<TSelf>
- Derived
- Inherited Members
- Extension Methods
Properties
All
A list of all loaded Template<TSelf>s.
public static NamedCollection<TSelf> All { get; }
Property Value
- NamedCollection<TSelf>
- See Also
Description
A short English description of this class for developers.
public string? Description { get; set; }
Property Value
FileName
The XML file Template<TSelf> instances are stored in.
public static string FileName { get; }
Property Value
HighlightColor
The color to highlight this class with in list representations. Empty for no highlighting.
[Browsable(false)]
public Color HighlightColor { get; protected set; }
Property Value
Name
The name of this class. Used in map files as a reference. Must be unique and is case-sensitive!
public string Name { get; set; }
Property Value
Methods
Clone()
Creates a deep copy of this TSelf
.
public virtual TSelf Clone()
Returns
- TSelf
The cloned
TSelf
.
LoadAll()
Loads the list of Template<TSelf>s from FileName.
public static void LoadAll()
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.