Skip to content

Commit

Permalink
added a new way of instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
kleber-jg committed Sep 6, 2021
1 parent aa95574 commit d749a7c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion example/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function preload() {

function create() {
const refImage = new Phaser.Image(game, 0, 0, 'ref');
game.plugins.add(new PhaserRuntimeEditor.Plugin(game, game.world, refImage));
game.plugins.add(new Phaser.Plugin.RuntimeEditor(game, game.world, refImage));

// Modify the world and camera bounds
// game.world.setBounds(-1000, -1000, 2000, 2000);
Expand Down
3 changes: 3 additions & 0 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Example</title>
<script src="/js/phaser.js"></script>
<!-- DEV -->
<script src="/js/index.js"></script>
<!-- PROD -->
<!-- <script src="/js/phaser-runtime-editor.min.js"></script> -->
<link rel="stylesheet" href="./styles.css" type="text/css" />
<link rel="stylesheet" href="./js/phaser-runtime-editor-styles.css" type="text/css" />
</head>
Expand Down
2 changes: 2 additions & 0 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,5 @@ export class Plugin extends Phaser.Plugin {
Editor.data.dispatchScheduledEvents();
}
}

(Phaser.Plugin as any).RuntimeEditor = Plugin;

0 comments on commit d749a7c

Please sign in to comment.