Cleaned a bit
This commit is contained in:
parent
11236c04c1
commit
bf379ca2f9
@ -9,11 +9,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import 'phaser';
|
||||
import 'phaser';
|
||||
import { Game, Scene } from 'phavuer'
|
||||
import World from '@/components/World.vue'
|
||||
|
||||
const gameConfig = {
|
||||
name: 'New Quest',
|
||||
scale: {
|
||||
mode: Phaser.Scale.FIT,
|
||||
autoCenter: Phaser.Scale.CENTER_BOTH,
|
||||
@ -29,11 +30,9 @@ const preload = (scene) => {
|
||||
}
|
||||
|
||||
const create = (scene) => {
|
||||
// Camera drag system
|
||||
let cam = scene.cameras.main;
|
||||
|
||||
// set camera bounds to the size of the map
|
||||
scene.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;
|
||||
|
@ -6,6 +6,7 @@
|
||||
<script setup>
|
||||
import { Circle, TilemapLayer, useScene } from 'phavuer'
|
||||
|
||||
|
||||
const scene = useScene()
|
||||
const mapData = new Phaser.Tilemaps.MapData({
|
||||
orientation: Phaser.Tilemaps.Orientation.ISOMETRIC,
|
||||
|
Loading…
x
Reference in New Issue
Block a user