LogoPixi’VN
indexClasses

Class: LocationBaseModel

Defined in: src/classes/navigation/LocationBaseModel.ts:16

The base model of a location. I suggest you extend this class to create your own location model.

Example

export const mcHome = new LocationBaseModel('mc_home', mainMap, {
    name: 'MC Home',
    icon: "https://icon.jpg",
});

Extends

Implements

  • LocationInternalInterface

Constructors

Constructor

> new LocationBaseModel(id, map, props?): LocationBaseModel

Defined in: src/classes/navigation/LocationBaseModel.ts:25

Parameters

id

string

The id of the location, it must be unique.

map

MapInterface

The map where the location is.

props?

LocationBaseModelProps = {}

The properties of the location.

Returns

LocationBaseModel

Overrides

LocationStoredClass.constructor

Properties

id

> readonly id: string

Defined in: node_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:41

Is id of the stored class. is unique for this class.

Implementation of

LocationInternalInterface.id

Inherited from

LocationStoredClass.id

Accessors

activities

Get Signature

> get activities(): ActivityInterface[]

Defined in: src/classes/navigation/NavigationAbstractClass.ts:176

The activities associated with this class, filtered based on their scheduling.

Returns

ActivityInterface[]

Implementation of

LocationInternalInterface.activities

Inherited from

LocationStoredClass.activities


activitiesIds

Get Signature

> get activitiesIds(): string[]

Defined in: src/classes/navigation/NavigationAbstractClass.ts:69

All the ids of the activities associated with this class. Compared to activities, they are not filtered based on their scheduling.

Returns

string[]

Implementation of

LocationInternalInterface.activitiesIds

Inherited from

LocationStoredClass.activitiesIds


disabled

Get Signature

> get disabled(): boolean

Defined in: src/classes/navigation/LocationBaseModel.ts:49

Whether is disabled. If it is a string, it is a Pixi'VN flag name.

Returns

boolean

Set Signature

> set disabled(value): void

Defined in: src/classes/navigation/LocationBaseModel.ts:56

Parameters
value

string | boolean

Returns

void


hidden

Get Signature

> get hidden(): boolean

Defined in: src/classes/navigation/LocationBaseModel.ts:64

Whether is hidden. If it is a string, it is a Pixi'VN flag name.

Returns

boolean

Set Signature

> set hidden(value): void

Defined in: src/classes/navigation/LocationBaseModel.ts:71

Parameters
value

string | boolean

Returns

void


icon

Get Signature

> get icon(): string | undefined

Defined in: src/classes/navigation/LocationBaseModel.ts:79

The icon of the location.

Returns

string | undefined


map

Get Signature

> get map(): MapInterface

Defined in: src/classes/navigation/LocationStoredClass.ts:22

The map where the location is.

Returns

MapInterface

Implementation of

LocationInternalInterface.map

Inherited from

LocationStoredClass.map


name

Get Signature

> get name(): string

Defined in: src/classes/navigation/LocationBaseModel.ts:38

The name of the location. If you set undefined, it will return the initial value of name.

Returns

string

Set Signature

> set name(value): void

Defined in: src/classes/navigation/LocationBaseModel.ts:41

Parameters
value

string | undefined

Returns

void


rooms

Get Signature

> get rooms(): RoomInterface[]

Defined in: src/classes/navigation/LocationStoredClass.ts:26

Get all rooms in the location.

Returns

RoomInterface[]

The rooms in the location.

Implementation of

LocationInternalInterface.rooms

Inherited from

LocationStoredClass.rooms

Methods

addActivity()

> addActivity(activity, options?): void

Defined in: src/classes/navigation/NavigationAbstractClass.ts:72

Connects the activity to the class.

Parameters

activity

string | ActivityInterface

The activity to connect to the class.

options?

ActiveScheduling = {}

Returns

void

Implementation of

LocationInternalInterface.addActivity

Inherited from

LocationStoredClass.addActivity


clearExpiredActivities()

> clearExpiredActivities(): void

Defined in: src/classes/navigation/NavigationAbstractClass.ts:149

Removes the useless activities.

Returns

void

Implementation of

LocationInternalInterface.clearExpiredActivities

Inherited from

LocationStoredClass.clearExpiredActivities


getStorageProperty()

> protected getStorageProperty<T>(propertyName, idToUse?): T | undefined

Defined in: node_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:56

Get a property from the storage.

Type Parameters

T

T = StorageElementType

Parameters

propertyName

string

The name of the property to get.

idToUse?

string

The id of the instance to get the property.

Returns

T | undefined

The value of the property. If the property is not found, returns undefined.

Default

this.id

Implementation of

LocationInternalInterface.getStorageProperty

Inherited from

LocationStoredClass.getStorageProperty


migrateOldStorage()

> protected migrateOldStorage(oldCategoryId?): void

Defined in: node_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:37

Parameters

oldCategoryId?

string

Returns

void

Implementation of

LocationInternalInterface.migrateOldStorage

Inherited from

LocationStoredClass.migrateOldStorage


removeActivity()

> removeActivity(activity): void

Defined in: src/classes/navigation/NavigationAbstractClass.ts:134

Disconnects the activity from the class.

Parameters

activity

string | ActivityInterface

The activity to disconnect from the class.

Returns

void

Implementation of

LocationInternalInterface.removeActivity

Inherited from

LocationStoredClass.removeActivity


setStorageProperty()

> protected setStorageProperty<T>(propertyName, value): void

Defined in: node_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:49

Update a property in the storage.

Type Parameters

T

T

The type of the value to set. (Deprecated, it is not necessary to specify the type of the value, it will be inferred from the value)

Parameters

propertyName

string

The name of the property to set.

value

StorageElementType

The value to set. If is undefined, the property will be removed from the storage.

Returns

void

Implementation of

LocationInternalInterface.setStorageProperty

Inherited from

LocationStoredClass.setStorageProperty

On this page