Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GamePush

Hierarchy

Index

Constructors

Properties

#apiClient: default
#debugConfig: DebugConfig
#projectConfig: PlayerProjectConfig
#serverTime: number
_achievementsService: default
_channelsService: default
_documentsService: default
_events: EventLite = ...
_eventsService: default
_filesService: default
_gamesCollectionsService: default
_imagesService: default
_leaderboardsService: default
_paymentsService: default
_playerService: default
_pointersManager: PointersManager
_projectService: default
_rewardsService: default
_schedulersService: default
_storage: Storage
achievements: Achievements

Achievements manager

ads: Ads

Ads manager

analytics: Analytics

Analytics manager

app: default

App manager

avatarGenerator: string

Current selected avatar generator

avatarGeneratorTemplate: string

Current selected avatar generator template URL

channels: default

Channels manager

device: default

Provides info about user's device

devtools: { addShortcut: any; changeLanguage: any; closeSticky: any; purchaseProduct: any; requestReview: any; resumeSubscription: any; showCounter: any; showFullscreen: any; showPreloader: any; showRewardedVideo: any; showSticky: any; showToast: any; unsubscribe: any }

Devtools manager, only in dev

Type declaration

documents: Documents

Documents manager

events: default

Events manager

experiments: default

AB experiments manager

files: Files

Images manager

fullscreen: Fullscreen

Fullscreen manager

gamesCollections: GamesCollections

Games Collections manager

images: Images

Images manager

isGameStarted: boolean = false

Check is game started (load is finished)

isGameplay: boolean = false

Check is in gameplay

isMobile: boolean

Is on mobile device

isPaused: boolean = false

Check game paused

language: Lang

Current selected language

leaderboard: Leaderboard

Leaderboard manager

loader: { dec: any; inc: any }

Global loader manager

Type declaration

logger: Logger = logger

Logger

overlay: { changeAvatarGenerator: any; changeLanguage: any; close: any; closeOrientationOverlay: any; closePreAdCountdownOverlay: any; closePreAdCountdownOverlayFinish: any; closeRewardedFailedOverlay: any; login: any; openAchievements: any; openChat: any; openDocument: any; openGamesCollections: any; openLeaderboard: any; openProductPurchase: any; pickPlayerOnConflict: any; setSizeOffsets: any; setUnsupportedDeviceOverlay: any; share: any; showOrientationOverlay: any; showPreAdCountdownOverlay: any; showPreAdCountdownOverlayFinish: any; showRewardedFailedOverlay: any; unlockAchievement: any }

Overlay manager

Type declaration

  • changeAvatarGenerator:function
    • changeAvatarGenerator(avatarGenerator: string): void
  • changeLanguage:function
    • changeLanguage(lang: Lang): Promise<void>
  • close:function
    • close(): void
  • closeOrientationOverlay:function
    • closeOrientationOverlay(): void
  • closePreAdCountdownOverlay:function
    • closePreAdCountdownOverlay(): void
  • closePreAdCountdownOverlayFinish:function
    • closePreAdCountdownOverlayFinish(): void
  • closeRewardedFailedOverlay:function
    • closeRewardedFailedOverlay(): void
  • login:function
    • login(options?: { withSecretCode?: boolean }): Promise<{ secretCode?: string; type: string }>
    • Parameters

      • options: { withSecretCode?: boolean } = {}
        • Optional withSecretCode?: boolean

      Returns Promise<{ secretCode?: string; type: string }>

  • openAchievements:function
    • openAchievements(achievementsInfo: FetchPlayerAchievementsOutput, __namedParameters?: { scrollTo?: string | number }): Promise<void>
    • Parameters

      • achievementsInfo: FetchPlayerAchievementsOutput
      • __namedParameters: { scrollTo?: string | number } = {}
        • Optional scrollTo?: string | number

      Returns Promise<void>

  • openChat:function
    • openChat(channel: Channel, channelMessages: FetchOutput<ChannelMessage>, personalChannelData?: PersonalChannelData): Promise<void>
    • Parameters

      • channel: Channel
      • channelMessages: FetchOutput<ChannelMessage>
      • Optional personalChannelData: PersonalChannelData

      Returns Promise<void>

  • openDocument:function
    • openDocument(document: Document): Promise<void>
  • openGamesCollections:function
    • openGamesCollections(gamesCollection: GamesCollection): Promise<void>
  • openLeaderboard:function
    • openLeaderboard(query: GetLeaderboardQuery, leaderbordInfo: RatingData): Promise<void>
    • Parameters

      • query: GetLeaderboardQuery
      • leaderbordInfo: RatingData

      Returns Promise<void>

  • openProductPurchase:function
    • openProductPurchase(product: Product): Promise<void>
  • pickPlayerOnConflict:function
    • pickPlayerOnConflict(conflictInfo: Omit<PlayerSyncConflict, "__typename">): Promise<PlayerState>
    • Parameters

      • conflictInfo: Omit<PlayerSyncConflict, "__typename">

      Returns Promise<PlayerState>

  • setSizeOffsets:function
    • setSizeOffsets(sizeOffsets: { bottom: number; top: number }): void
    • Parameters

      • sizeOffsets: { bottom: number; top: number }
        • bottom: number
        • top: number

      Returns void

  • setUnsupportedDeviceOverlay:function
    • setUnsupportedDeviceOverlay(__namedParameters: { allowed: TargetOs[]; detected: TargetOs }): void
    • Parameters

      • __namedParameters: { allowed: TargetOs[]; detected: TargetOs }
        • allowed: TargetOs[]
        • detected: TargetOs

      Returns void

  • share:function
    • share(shareType: ShareType, options: ShareOptions): Promise<boolean>
  • showOrientationOverlay:function
    • showOrientationOverlay(orientationRequired: GameOrientation): void
  • showPreAdCountdownOverlay:function
    • showPreAdCountdownOverlay(): void
  • showPreAdCountdownOverlayFinish:function
    • showPreAdCountdownOverlayFinish(wasInFullscreen: boolean): Promise<any>
  • showRewardedFailedOverlay:function
    • showRewardedFailedOverlay(): Promise<any>
  • unlockAchievement:function
    • unlockAchievement(achievement: Achievement): void
payments: Payments

Payments manager

platform: Platform

Platform info

player: MyPlayer

Player manager

players: Players

Players manager

projectId: number
ready: Promise<GamePush>

Resolves when all platform and project data was loaded

  • platform SDK loaded
rewards: default

Rewards manager

schedulers: default

Schedulers manager

segments: Segments

Segments manager

setBackground: ((__namedParameters: Partial<BackgroundSettings>) => void) = setBackground

Type declaration

    • (__namedParameters: Partial<BackgroundSettings>): void
    • Parameters

      • __namedParameters: Partial<BackgroundSettings>

      Returns void

socials: Socials

Socials manager

triggers: default

Triggers manager

variables: GameVariables

Game variables manager

Accessors

  • get _overlaySizeOffsets(): { bottom: number; top: number }
  • Returns { bottom: number; top: number }

    • bottom: number
    • top: number
  • get isAllowedOrigin(): boolean
  • get isDev(): boolean
  • get isPortrait(): boolean
  • get locale(): string
  • get nativeSDK(): any
  • get serverTime(): string

Methods

  • #checkDeviceCompatibility(): Promise<void>
  • #initOrientation(): void
  • #setup(): Promise<void>
  • changeAvatarGenerator(): Promise<void>
  • changeLanguage(lang: Lang): Promise<void>
  • gameStart(): Promise<void>
  • gameplayStart(): Promise<void>
  • gameplayStop(): Promise<void>
  • generateAvatar(hash: any, size: number): string
  • loadOverlay(): Promise<void>
  • You can preload overlay to fast open when required

    Returns Promise<void>

  • off<ET>(type: ET, handler: ((event: GPEvents[ET]) => void)): void
  • on<ET>(type: ET, handler: ((event: GPEvents[ET]) => void)): void
  • once<ET>(type: ET, handler: ((event: GPEvents[ET]) => void)): void
  • pause(): void
  • resume(): void

Generated using TypeDoc