Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Properties

assets_loaded: boolean = false
audio: Audio = null

Class responsible for controlling the game audio engine

battle_instance: Battle | BattleAnimationTester = null

Class responsible for a battle

camera: Camera = null

Class responsible for some specific camera features for this engine

collision: Collision = null

Class responsible for the collision system

control_manager: ControlManager = null
cursor_manager: CursorManager = null
dbs: any = {}
debug: Debug = null

Class responsible for the debug systems

electron_app: boolean
fps_reduction_active: boolean = false
fullscreen: boolean = false

Whether the game is in fullscreen state.

game: Game = null
game_event_manager: GameEventManager = null

Class responsible for the game events

gamepad: Gamepad
healer_menu: HealerMenu = null

Class responsible for the healer menu

healer_open: boolean = false
hero: Hero = null

Class responsible for the control of the main hero

ignore_system_scaling: boolean = false
in_battle: boolean = false
info: GameInfo = ...
inn_menu: InnMenu = null

Class responsible for the inn system

inn_open: boolean = false
ipcRenderer: any
loading_progress: string = ""
loading_what: string = ""
logger: Logger = null

Class responsible to log stuff. It logs mainly user bad input.

main_menu: MainMenu = null

Class responbible for the main menu

map: Map = null

The current active map

menu_open: boolean = false
middlelayer_group: Group = null

Phaser.Group that holds sprites that are in the same level as Hero.

overlayer_group: Group = null

Phaser.Group that holds sprites that are over Hero.

particle_manager: ParticleStorm = null
particle_wrapper: ParticlesWrapper = null

A wrapper for Particles Storm.

save_menu: SaveMenu = null

Class responbible for saving a snapshot of the game.

save_open: boolean = false
scale_factor: number = 1

The zoom scaling factor if the game canvas.

shop_menu: ShopMenu = null

Class responsible for the shop system

shop_open: boolean = false
showing_fps_banner: boolean = false
snapshot_manager: Snapshot = null

Class responsible for generating and restoring save files.

start_menu: StartMenu = null

Class responbible for the start menu

storage: Storage = null

Class responsible for storing the game custom states

super_group: Group = null

Phaser.Group that holds underlayer, middlelayer and overlayer groups.

tile_event_manager: TileEventManager = null

Class responsible for the tile events

underlayer_group: Group = null

Phaser.Group that holds sprites that are below Hero.

verbose_game_event_fire: boolean = false

Methods

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

    Returns Promise<void>

  • force_target_fps(): void
  • 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.

  • init_electron(): void
  • initialize_game(): Promise<void>
  • Initializes the game. It can be a new one or a restored one from snapshot.

    Returns Promise<void>

  • initialize_psynergy_controls(): void
  • Initializes controls related to psynergy casting. Psynergy shortcuts.

    Returns void

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

    Returns void

  • load_render(): void
  • preload(): void
  • render(): void
  • render_loading(): void
  • set_canvas_scale(): void
  • Changes canvas scale and fires appropriate events related to rescaling and window resizing.

    Returns void

  • set_fullscreen_mode(change_flag?: boolean): void
  • Deals with fullscreen mode. It will be called on fullscreen mode change.

    Parameters

    • change_flag: boolean = true

      whether the fullscreen flag should be toggled.

    Returns void

  • 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

  • update(): void

Generated using TypeDoc