Class CollisionShape
Collision shape element base class.
Collision shapes are invisible elements, that trigger an event when a player enters the shape.
Inheritance
CollisionShape
Assembly: SlipeServer.Server.dll
Syntax
public abstract class CollisionShape : Element
Constructors
|
Edit this page
View Source
CollisionShape()
Declaration
Properties
|
Edit this page
View Source
AutoCallEvent
Declaration
public bool AutoCallEvent { get; set; }
Property Value
|
Edit this page
View Source
DimensionsMustMatch
Declaration
public bool DimensionsMustMatch { get; set; }
Property Value
|
Edit this page
View Source
ElementType
The element type as per MTA's specifications. Multiple C# types can share the same MTA element type.
Declaration
public override ElementType ElementType { get; }
Property Value
Overrides
|
Edit this page
View Source
ElementsWithin
Declaration
public IEnumerable<Element> ElementsWithin { get; }
Property Value
|
Edit this page
View Source
InteriorsMustMatch
Declaration
public bool InteriorsMustMatch { get; set; }
Property Value
|
Edit this page
View Source
IsEnabled
Declaration
public bool IsEnabled { get; set; }
Property Value
Methods
|
Edit this page
View Source
AssociateWith(MtaServer)
Declaration
public CollisionShape AssociateWith(MtaServer server)
Parameters
Returns
|
Edit this page
View Source
CheckElementWithin(Element)
Declaration
public void CheckElementWithin(Element element)
Parameters
Type |
Name |
Description |
Element |
element |
|
|
Edit this page
View Source
Destroy()
Destroys the element, triggering the Destroyed event.
Declaration
public override bool Destroy()
Returns
Type |
Description |
bool |
A bool indicating whether the element is destroyed, false if it was already destroyed prior to this call.
|
Overrides
|
Edit this page
View Source
IsWithin(Element, bool, bool)
Declaration
public bool IsWithin(Element element, bool matchInterior = true, bool matchDimension = true)
Parameters
Type |
Name |
Description |
Element |
element |
|
bool |
matchInterior |
|
bool |
matchDimension |
|
Returns
|
Edit this page
View Source
IsWithin(Vector3, byte?, ushort?)
Declaration
public abstract bool IsWithin(Vector3 position, byte? interior = null, ushort? dimension = null)
Parameters
Returns
Events
|
Edit this page
View Source
ElementEntered
Declaration
public event ElementEventHandler<CollisionShape, CollisionShapeHitEventArgs>? ElementEntered
Event Type
|
Edit this page
View Source
ElementLeft
Declaration
public event ElementEventHandler<CollisionShape, CollisionShapeLeftEventArgs>? ElementLeft
Event Type
Extension Methods