Reference Source
public class | source

BlipManagerSingleton

You can directly use an instance of this class. BlipManager

Static Member Summary

Static Private Members
private static

The center of the screen's coordinates (in pixels).

private static

The size of the game.

private static

The size of the game halfed.

private static

The maximum number of blips that can exist on the screen at once.

private static

The default tile size.

private static

An array tracking all stored blips.

Static Method Summary

Static Private Methods
private static

getAngle(pStartPoint: Object, pEndPoint: Object, pCenter: boolean): number

Gets the angle between two points.

private static

getDirection(pAngle: number): *

Gets the direction of the angle passed.

private static

getDistance(pStartPoint: Object, pEndPoint: Object, pCenter: boolean): number

API to get distance between points.

Constructor Summary

Private Constructor
private

Member Summary

Public Members
public

version: *

The version of the module.

Private Members
private

An array tracking all active blips (hidden or not).

private

The interface used to handle the blips.

private

The logger module this module uses to log errors / logs

private

Whether the manager is actively managing the state of blips.

Method Summary

Public Methods
public

Hides all blips

public

pause()

Pauses the blip manager from managing blips

public

resume()

Resumes the blip manager to manage blips

public

track(pBlip: Object)

Tracks a blip within the activeBlips array.

public

untrack(pBlip: Object)

Untracks a blip from the activeBlips array.

Private Methods
private

Method for updating the "state" of each blip.

Static Private Members

private static CENTER_SCREEN_POSITION: number source

The center of the screen's coordinates (in pixels).

private static GAME_SIZE: number source

The size of the game.

private static GAME_SIZE_HALF: number source

The size of the game halfed.

private static MAX_BLIPS: number source

The maximum number of blips that can exist on the screen at once.

private static TILE_SIZE: number source

The default tile size. This is used a backup value when an icon's width/height is not accessible.

private static storedBlips: Array source

An array tracking all stored blips.

Static Private Methods

private static getAngle(pStartPoint: Object, pEndPoint: Object, pCenter: boolean): number source

Gets the angle between two points.

Params:

NameTypeAttributeDescription
pStartPoint Object

The starting point.

pEndPoint Object

The ending point.

pCenter boolean

Whether to get the angle from the center of the points.

Return:

number

The angle between the starting point and the ending point.

private static getDirection(pAngle: number): * source

Gets the direction of the angle passed.

Params:

NameTypeAttributeDescription
pAngle number

The angle in radians to convert into a cardinal direction.

Return:

*

The direction of the angle.

private static getDistance(pStartPoint: Object, pEndPoint: Object, pCenter: boolean): number source

API to get distance between points.

Params:

NameTypeAttributeDescription
pStartPoint Object

The starting point.

pEndPoint Object

The ending point.

pCenter boolean

Whether to get the distance from the center of the points.

Return:

number

The distance between the two points.

Private Constructors

private constructor() source

Public Members

public version: * source

The version of the module.

Private Members

private activeBlips: Array source

An array tracking all active blips (hidden or not).

private interfaceHandle: string source

The interface used to handle the blips.

private logger: Object source

The logger module this module uses to log errors / logs

private paused: boolean source

Whether the manager is actively managing the state of blips.

Public Methods

public hideBlips() source

Hides all blips

public pause() source

Pauses the blip manager from managing blips

public resume() source

Resumes the blip manager to manage blips

public track(pBlip: Object) source

Tracks a blip within the activeBlips array.

Params:

NameTypeAttributeDescription
pBlip Object

The blip to track.

public untrack(pBlip: Object) source

Untracks a blip from the activeBlips array.

Params:

NameTypeAttributeDescription
pBlip Object

The blip to untrack.

Private Methods

private manageBlips() source

Method for updating the "state" of each blip.