import {ShapezGameAnalytics} from 'shapez.io/js/platform/browser/game_analytics.js'ShapezGameAnalytics
Extends:
Member Summary
| Public Members | ||
| public get |
|
|
| public |
syncKey: * |
|
Method Summary
| Public Methods | ||
| public |
generateGameDump(root: GameRoot): {"shapes": *, "upgrades": *, "belts": *, "buildings": *} Generates a game dump |
|
| public |
|
|
| public |
|
|
| public |
handleLevelCompleted(level: number) Handles the given level completed |
|
| public |
handleUpgradeUnlocked(id: string, level: number) Handles the given upgrade completed |
|
| public |
initialize(): Promise<void> |
|
| public |
isInterestingShape(root: GameRoot, key: string): boolean Returns true if the shape is interesting |
|
| public |
sendGameEvent(category: string, value: string) Sends a game event to the analytics |
|
| public |
|
|
| public |
Sends a request to the api |
|
Inherited Summary
| From class GameAnalyticsInterface | ||
| public |
app: import("../application").Application |
|
| public |
Handles a resumed game |
|
| public |
Handles a new game which was started |
|
| public |
handleLevelCompleted(level: number) Handles the given level completed |
|
| public |
handleUpgradeUnlocked(id: string, level: number) Handles the given upgrade completed |
|
| public |
initialize(): Promise<void> Initializes the analytics |
|
Public Methods
public generateGameDump(root: GameRoot): {"shapes": *, "upgrades": *, "belts": *, "buildings": *} source
Generates a game dump
Params:
| Name | Type | Attribute | Description |
| root | GameRoot |
Return:
| {"shapes": *, "upgrades": *, "belts": *, "buildings": *} |
public handleLevelCompleted(level: number) source
Handles the given level completed
Params:
| Name | Type | Attribute | Description |
| level | number |
public initialize(): Promise<void> source
Initializes the analytics
Override:
GameAnalyticsInterface#initializepublic isInterestingShape(root: GameRoot, key: string): boolean source
Returns true if the shape is interesting
