MapObjectWidget

Noir.Classes.MapObjectWidget: NoirClass

Represents a map object UI widget to be shown to players via UIService.


Noir.Classes.MapObjectWidget:Init(ID, visible, title, text, objectType, position, radius, colorR, colorG, colorB, colorA, player)

Initializes class objects from this class.

Parameters

  • ID: integer

  • visible: boolean

  • title: string

  • text: string

  • objectType: SWMarkerTypeEnum

  • position: SWMatrix

  • radius: number

  • colorR: number

  • colorG: number

  • colorB: number

  • colorA: number

  • player: NoirPlayer|nil


Attaches this map object to a body.

Upon doing so, the map object will follow the body's position until detached with the :Detach() method.

You can offset the map object with the AttachmentOffset property.

Note that :Update() is called automatically.

Parameters

  • body: NoirBody


Attaches this map object to an object.

Upon doing so, the map object will follow the object's position until detached with the :Detach() method.

You can offset the map object with the AttachmentOffset property.

Note that :Update() is called automatically.

Parameters

  • object: NoirObject


Detaches this map object from any body or object.


Serializes this map object widget.

Returns

  • NoirSerializedMapObjectWidget


Deserializes a map object widget.

Parameters

  • serializedWidget: NoirSerializedMapObjectWidget

Returns

  • NoirMapObjectWidget|nil


Handles updating this widget.

Parameters

  • player: NoirPlayer


Handles destroying this widget.

Parameters

  • player: NoirPlayer

Last updated