| input / output | ColorObject | Color† | HSVColorObject | number† | string |
|---|---|---|---|---|---|
| (h: number, s: number, l: number) | HSLToColor | ||||
| (h: number, s: number, v: number) | HSVToRGB | HSVToRGB | |||
| (r: number, g: number, b: number, a: number) | GetColor32 | ||||
| (r: number, g: number, b: number) | RGBToHSV | RGBToHSV | GetColor | RGBToString | |
| ColorObject | ObjectToColor, ValueToColor | ||||
| string '#RGB' '#RRGGBB' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import 'phaser'; | |
| import GameScalePlugin from 'phaser-plugin-game-scale'; | |
| console.assert(GameScalePlugin, 'GameScalePlugin'); | |
| var config = { | |
| type: Phaser.AUTO, | |
| width: 800, | |
| height: 600, |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @author Richard Davey <rich@photonstorm.com> | |
| * @copyright 2016 Photon Storm Ltd. | |
| * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} | |
| * | |
| * @overview | |
| * | |
| * Phaser - http://phaser.io | |
| * | |
| * v2.11.1 "2018-10-02" - Built: Fri Feb 01 2019 14:02:33 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var music = [ | |
| { | |
| key: 'bgMusic', | |
| url: 'assets/TownTheme.mp3', | |
| config: { | |
| volume: 0.1, | |
| loop: true | |
| } | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | |
| ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░ | |
| ░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░▓ ▓ ▓░░░░░░░░░░░░░░░░░░░░ | |
| ░░░░░░░░░▓ ▓░░░░░░░░░▓ $ ◆ ▓░░░░░░░░░░░░░░░░░░░░ | |
| ░░░░░░░░░▓ ⚜︎ ▓░░░░░░░░░▓ ▓ ⚒︎ ▓░░▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░ | |
| ░░░░░░░░░▓ $ $ ▓▓▓▓▓▓▓▓▓▓▓ ▓ ▓░░▓ ⚱︎ ▓░░░░░ | |
| ░░░░░░░░░▓ ▓ ⚜︎ $ ▓▓▓◇▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░▓ ▓░░░░░ | |
| ░░░░░░░░░▓ ▓ ⚑ ▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓░░░░░ | |
| ░░░░░░░░░▓ ◆ ▓ ▓ ▓ ▓░░░░░ | |
| ░░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ◆ ⚘ ▓ ◇ ▓░░░░░ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class BaseScene extends Phaser.Scene | |
| { | |
| constructor(config) | |
| { | |
| super(config); | |
| } | |
| init() | |
| { | |
| this.user = this.registry.get('user'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| JavaScript port of <http://scale2x.sourceforge.net/algorithm.html> | |
| */ | |
| var scaleX = (function (exports) { | |
| function getPixel32(data, x, y, w) { | |
| var id = (x + y * w) * 4; | |
| return (data[id] << 16) | (data[id + 1] << 8) | data[id + 2]; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const gameConfig = { | |
| scene: { | |
| create: function () { | |
| this.add.text(0, 0, "Hello world"); | |
| } | |
| } | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const gameConfig = { | |
| scene: { | |
| create: function () { | |
| this.add.text(0, 0, "Hello world"); | |
| } | |
| } | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* global Phaser */ | |
| // GlobalClock | |
| // Modified from Phaser.Time.Clock by Richard Davey © 2013-2023 Photon Storm Ltd. <https://opensource.org/licenses/MIT> | |
| class GlobalClock { | |
| constructor(pluginManager) { | |
| this.pluginManager = pluginManager; | |
| this.game = pluginManager.game; | |
| this.now = 0; |