Represents the Canvas page

Hierarchy

  • HTMLElement
    • CanvasComponent

Constructors

  • Returns CanvasComponent

Properties

_currentGameState?: DefaultGameState

Current game state

_gameEventService: GameEventService = ...

Instance of the game event service

_gameRouteService: GameRouteService = ...

Instance of the game route service

_selectedActionButton?: ActionReference

Current active action button

_selectedGameObjectButtons: Set<GameObjectReference> = ...

Current active game object buttons

Methods

  • The "constructor" of a Web Component

    Returns void

  • Handle the click on an action button

    Parameters

    Returns Promise<void>

  • Handle the click on a game object button

    Parameters

    Returns Promise<void>

  • Refresh the current game state

    Returns Promise<void>

  • Render the contents of this page

    Returns void

  • Render an action button for a given action reference

    Parameters

    Returns HTMLElement

    HTML element of the action button

  • Render the content element

    Returns string

    String with raw HTML for the content element

  • Render the footer element

    Returns HTMLElement

    HTML element of the footer

  • Render a game object button for a given game object reference

    Parameters

    Returns HTMLElement

    HTML element of the game object button

  • Render the header element

    Returns string

    String with raw HTML for the header element. Can be empty.

  • Render the title element

    Returns string

    String with raw HTML for the title element. Can be empty.

  • Update the canvas to the provided game state

    Parameters

    • state: GameState

      Game state to update the canvas to

    Returns void