Skip to content
This repository has been archived by the owner on Aug 6, 2020. It is now read-only.

Latest commit

 

History

History
98 lines (53 loc) · 2.02 KB

models.kpbeacon.md

File metadata and controls

98 lines (53 loc) · 2.02 KB

apimodelsKPBeacon

Class: KPBeacon

Represents a Beacon stored in the KainPlan Map.

Hierarchy

  • KPBeacon

Index

Constructors

Properties

Methods

Constructors

constructor

+ new KPBeacon(x: number, y: number): KPBeacon

Defined in src/models/KPBeacon.ts:19

Creates a new KainPlan Beacon.

Parameters:

Name Type Description
x number X-Coordinate of the Beacon
y number Y-Coordinate of the Beacon

Returns: KPBeacon

Properties

x

x: number

Defined in src/models/KPBeacon.ts:15

X-Coordinate


y

y: number

Defined in src/models/KPBeacon.ts:19

Y-Coordinate

Methods

toJSON

toJSON(): any

Defined in src/models/KPBeacon.ts:49

Converts the Beacon into a JSON object - will be called when using JSON.stringify(...)

Returns: any

The Beacon in its JSON form.


Static parse

parse(json: any): KPBeacon

Defined in src/models/KPBeacon.ts:36

Creates and returns a new KPBeacon from the given JSON object/string.

Parameters:

Name Type Description
json any Either an object that has already been parsed, or a JSON string.

Returns: KPBeacon

The newly created KPBeacon.