diff --git a/package-lock.json b/package-lock.json index f27b6be..aaeedb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2860,9 +2860,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.749", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.749.tgz", - "integrity": "sha512-LRMMrM9ITOvue0PoBrvNIraVmuDbJV5QC9ierz/z5VilMdPOVMjOtpICNld3PuXuTZ3CHH/UPxX9gHhAPwi+0Q==", + "version": "1.4.750", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.750.tgz", + "integrity": "sha512-9ItEpeu15hW5m8jKdriL+BQrgwDTXEL9pn4SkillWFu73ZNNNQ2BKKLS+ZHv2vC9UkNhosAeyfxOf/5OSeTCPA==", "dev": true }, "node_modules/emoji-regex": { @@ -4791,9 +4791,9 @@ ] }, "node_modules/react-is": { - "version": "18.3.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.0.tgz", - "integrity": "sha512-wRiUsea88TjKDc4FBEn+sLvIDesp6brMbGWnJGjew2waAc9evdhja/2LvePc898HJbHw0L+MTWy7NhpnELAvLQ==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/read-package-json-fast": { diff --git a/public/assets/avatar/default/base_right_down.png b/public/assets/avatar/default/base_right_down.png new file mode 100644 index 0000000..51637f7 Binary files /dev/null and b/public/assets/avatar/default/base_right_down.png differ diff --git a/public/assets/tilesets/default.png b/public/assets/tiles/default.png similarity index 100% rename from public/assets/tilesets/default.png rename to public/assets/tiles/default.png diff --git a/src/App.vue b/src/App.vue index 37d0651..27cb5d0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,9 +1,9 @@ \ No newline at end of file diff --git a/src/components/Game.vue b/src/components/Game.vue new file mode 100644 index 0000000..687d8c2 --- /dev/null +++ b/src/components/Game.vue @@ -0,0 +1,38 @@ + + + \ No newline at end of file diff --git a/src/components/World.vue b/src/components/World.vue new file mode 100644 index 0000000..acd2c6e --- /dev/null +++ b/src/components/World.vue @@ -0,0 +1,46 @@ + + + \ No newline at end of file diff --git a/src/components/game/Screen.vue b/src/components/game/Screen.vue deleted file mode 100644 index 17676de..0000000 --- a/src/components/game/Screen.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/scenes/mapScene.js b/src/scenes/mapScene.js deleted file mode 100644 index 6741a66..0000000 --- a/src/scenes/mapScene.js +++ /dev/null @@ -1,63 +0,0 @@ -import Phaser from 'phaser'; - -class Example extends Phaser.Scene -{ - constructor () { - super(); - } - - preload () { - this.load.image('tiles', '/assets/tilesets/default.png'); - } - - create () { - const mapData = new Phaser.Tilemaps.MapData({ - orientation: Phaser.Tilemaps.Orientation.ISOMETRIC, - format: Phaser.Tilemaps.Formats.ARRAY_2D, - width: 10, - height: 10, - tileWidth: 64, - tileHeight: 32, - }); - - const map = new Phaser.Tilemaps.Tilemap(this, mapData); - const tileset = map.addTilesetImage('default', 'tiles'); - const layer = map.createBlankLayer('layer', tileset); - - const data = [ - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], - [ 0, 1, 1, 1, 1, 1, 1, 1, 1, 0 ], - [ 0, 1, 1, 1, 1, 1, 1, 1, 1, 0 ], - [ 0, 1, 1, 1, 1, 1, 1, 1, 1, 0 ], - [ 0, 1, 1, 1, 1, 1, 1, 1, 1, 0 ], - [ 0, 1, 1, 1, 1, 1, 1, 1, 1, 0 ], - [ 0, 1, 1, 1, 1, 1, 1, 1, 1, 0 ], - [ 0, 1, 1, 1, 1, 1, 1, 1, 1, 0 ], - [ 0, 1, 1, 1, 1, 1, 1, 1, 1, 0 ], - [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], - ]; - - let y = 0; - - data.forEach(row => { - row.forEach((tile, x) => { - layer.putTileAt(tile, x, y); - }); - y++; - }); - - // middle of the screen by default - const centerX = map.widthInPixels / 1.5; - const centerY = map.heightInPixels / 2; - layer.setPosition(centerX, centerY); - - let cam = this.cameras.main; - this.input.on("pointermove", function (p) { - if (!p.isDown) return; - cam.scrollX -= (p.x - p.prevPosition.x) / cam.zoom; - cam.scrollY -= (p.y - p.prevPosition.y) / cam.zoom; - }); - } -} - -export default Example; \ No newline at end of file