ShapeItem
Extends:
Static Method Summary
| Static Public Methods | ||
| public static |
|
|
| public static |
getSchema(): * |
|
Constructor Summary
| Public Constructor | ||
| public |
constructor(definition: ShapeDefinition) |
|
Member Summary
| Public Members | ||
| public |
definition: * |
|
Method Summary
| Public Methods | ||
| public |
deserialize(data: *) |
|
| public |
drawFullSizeOnCanvas(context: CanvasRenderingContext2D, size: number) Draws the item to a canvas |
|
| public |
drawItemCenteredImpl(x: number, y: number, parameters: DrawParameters, diameter: number=) |
|
| public |
equalsImpl(other: BaseItem): * |
|
| public |
|
|
| public |
|
|
| public |
getItemType(): "shape" |
|
| public |
serialize(): * |
|
Inherited Summary
| From class BasicSerializableObject | ||
| public static |
|
|
| public static |
getId() |
|
| public static |
Should return the serialization schema |
|
| public static |
|
|
| public |
deserialize(data: any, root: import("./savegame_serializer").GameRoot): string | void |
|
| public |
|
|
| From class BaseItem | ||
| public static |
|
|
| public static |
|
|
| public |
drawFullSizeOnCanvas(context: CanvasRenderingContext2D, size: number) Draws the item to a canvas |
|
| public |
drawItemCenteredClipped(x: number, y: number, parameters: DrawParameters, diameter: number=) Draws the item at the given position |
|
| public |
drawItemCenteredImpl(x: number, y: number, parameters: DrawParameters, diameter: number=) INTERNAL |
|
| public |
Returns if the item equals the other itme |
|
| public abstract |
equalsImpl(other: BaseItem): boolean Override for custom comparison |
|
| public |
Returns a string id of the item |
|
| public |
|
|
| public |
getItemType(): ItemType |
|
Static Public Methods
public static getSchema(): * source
Should return the serialization schema
Override:
BaseItem#getSchemaReturn:
| * |
Public Constructors
public constructor(definition: ShapeDefinition) source
Fixes typeof DerivedComponent is not assignable to typeof Component, compiled out in non-dev builds
Override:
BaseItem#constructorParams:
| Name | Type | Attribute | Description |
| definition | ShapeDefinition |
Public Members
public definition: * source
Public Methods
public deserialize(data: *) source
Override:
BasicSerializableObject#deserializeParams:
| Name | Type | Attribute | Description |
| data | * |
public drawFullSizeOnCanvas(context: CanvasRenderingContext2D, size: number) source
Draws the item to a canvas
Override:
BaseItem#drawFullSizeOnCanvasParams:
| Name | Type | Attribute | Description |
| context | CanvasRenderingContext2D | ||
| size | number |
public drawItemCenteredImpl(x: number, y: number, parameters: DrawParameters, diameter: number=) source
INTERNAL
Override:
BaseItem#drawItemCenteredImplParams:
| Name | Type | Attribute | Description |
| x | number | ||
| y | number | ||
| parameters | DrawParameters | ||
| diameter | number= |
public equalsImpl(other: BaseItem): * source
Override for custom comparison
Override:
BaseItem#equalsImplParams:
| Name | Type | Attribute | Description |
| other | BaseItem |
Return:
| * |
public getAsCopyableKey(): string source
Returns a string id of the item
