Class ElementManager
Class that manages MTAElement functionality and
Inheritance
ElementManager
Assembly: SlipeShared.dll
Syntax
public class ElementManager
Constructors
|
Improve this Doc
View Source
ElementManager()
Creates the ElementManager given an IElementHelper class that maps MTA elements to classes
Declaration
Properties
|
Improve this Doc
View Source
Instance
Get the singleton instance of this class
Declaration
public static ElementManager Instance { get; }
Property Value
|
Improve this Doc
View Source
Root
Returns the root MTA element
Declaration
public Element Root { get; }
Property Value
Methods
|
Improve this Doc
View Source
AddEventHandler(Element, String, Boolean, String)
Declaration
protected void AddEventHandler(Element element, string eventName, bool propagated = true, string priorty = "normal")
Parameters
|
Improve this Doc
View Source
CastArray<T>(MtaElement[])
Cast an array of MTAElements to a desired type
Declaration
public T[] CastArray<T>(MtaElement[] elements)
where T : Element
Parameters
Type |
Name |
Description |
Slipe.MtaDefinitions.MtaElement[] |
elements |
|
Returns
Type Parameters
|
Improve this Doc
View Source
GetByType<T>()
Get a list of all classes of a specific element
Declaration
public List<T> GetByType<T>()
where T : Element
Returns
Type Parameters
|
Improve this Doc
View Source
GetByType<T>(Element, Boolean)
Get a list of all classes of a specific element
Declaration
public List<T> GetByType<T>(Element startAt, bool streamedIn = false)
where T : Element
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
GetElement(MtaElement)
Get an Element given a certain MTA element
Declaration
public Element GetElement(MtaElement element)
Parameters
Type |
Name |
Description |
Slipe.MtaDefinitions.MtaElement |
element |
|
Returns
|
Improve this Doc
View Source
GetElement<T>(MtaElement)
Gets a generic type class instance given a certain MTA element
Declaration
public T GetElement<T>(MtaElement element)
where T : Element
Parameters
Type |
Name |
Description |
Slipe.MtaDefinitions.MtaElement |
element |
|
Returns
Type Parameters
|
Improve this Doc
View Source
GetTypeName(Type)
Get the string representation of an element type
Declaration
public string GetTypeName(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
The Slipe class of the element
|
Returns
Type |
Description |
String |
A string describing the MTA element type
|
|
Improve this Doc
View Source
HandleEvent(String, MtaElement, Object, Object, Object, Object, Object, Object, Object, Object)
Handles an event when it's triggered on a specific MTA element
Declaration
public static void HandleEvent(string eventString, MtaElement source, object p1, object p2, object p3, object p4, object p5, object p6, object p7, object p8)
Parameters
|
Improve this Doc
View Source
RegisterElement(Element)
Registers an element class
Declaration
public void RegisterElement(Element element)
Parameters
Type |
Name |
Description |
Element |
element |
|