Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GoldenSun

The project has basically two important folders: assets and base. All the source code is located inside base folder. All the game assets (images, database files, sounds, etc) are located inside assets folder. An engine user will only modify the assets folder for instance. Any modification in assets folder files will automatically be reflected in the game.

This class is the starting point to understand how the code works. It's the engine's main class. When the game starts, it will load database files in assets/dbs folder in order to instantiate the main classes of the game like Hero, Map, MainMenu, Audio, ControlManager etc.

Hierarchy

  • GoldenSun

Index

Constructors

constructor

Properties

assets_loaded

assets_loaded: boolean = false

audio

audio: Audio = null

Class responsible for controlling the game audio engine

battle_instance

battle_instance: Battle = null

Class responsible for a battle

camera

camera: Camera = null

Class responsible for some specific camera features for this engine

collision

collision: Collision = null

Class responsible for the collision system

control_manager

control_manager: ControlManager = null

cursor_manager

cursor_manager: CursorManager = null

dbs

dbs: any = {}

debug

debug: Debug = null

Class responsible for the debug systems

fullscreen

fullscreen: boolean = false

game

game: Game = null

game_event_manager

game_event_manager: GameEventManager = null

Class responsible for the game events

gamepad

gamepad: Gamepad

hero

hero: Hero = null

Class responsible for the control of the main hero

in_battle

in_battle: boolean = false

info

info: GameInfo = ...

inn_menu

inn_menu: InnMenu = null

Class responsible for the inn system

inn_open

inn_open: boolean = false

loading_progress

loading_progress: string = ""

loading_what

loading_what: string = ""

main_menu

main_menu: MainMenu = null

Class responbible for the main menu

map

map: Map = null

The current active map

menu_open

menu_open: boolean = false

npc_group

npc_group: Group = null

overlayer_group

overlayer_group: Group = null

particle_manager

particle_manager: ParticleStorm = null

scale_factor

scale_factor: number = 1

shop_menu

shop_menu: ShopMenu = null

Class responsible for the shop system

shop_open

shop_open: boolean = false

storage

storage: Storage = null

Class responsible for storing the game custom states

super_group

super_group: Group = null

tile_event_manager

tile_event_manager: TileEventManager = null

Class responsible for the tile events

underlayer_group

underlayer_group: Group = null

Methods

Private create

  • create(): Promise<void>
  • Initializes the game main classes like Hero, Map, Audio, ControlManager, Storage etc.

    Returns Promise<void>

hero_movement_allowed

  • hero_movement_allowed(allow_climbing?: boolean): boolean
  • Checks whether the hero is allowed to move.

    Parameters

    • allow_climbing: boolean = true

      if true, climbing won't be considered.

    Returns boolean

    if true, the hero is allowed to move.

Private initialize_utils_controls

  • initialize_utils_controls(): void
  • Initializes some utils controls like canvas scale control, fullscreen etc.

    Returns void

Private load_render

  • load_render(): void

Private preload

  • preload(): void
  • Loads initial database files and other assets.

    Returns void

Private render

  • render(): void

Private render_loading

  • render_loading(): void

set_whats_loading

  • set_whats_loading(loading_what: string): void
  • On loading phase, sets the loading message to be displayed.

    Parameters

    • loading_what: string

      the message.

    Returns void

Private update

  • update(): void

Generated using TypeDoc