After Width: | Height: | Size: 422 B |
After Width: | Height: | Size: 378 B |
After Width: | Height: | Size: 391 B |
After Width: | Height: | Size: 302 B |
After Width: | Height: | Size: 414 B |
After Width: | Height: | Size: 332 B |
After Width: | Height: | Size: 402 B |
After Width: | Height: | Size: 399 B |
After Width: | Height: | Size: 566 B |
After Width: | Height: | Size: 459 B |
After Width: | Height: | Size: 511 B |
After Width: | Height: | Size: 404 B |
After Width: | Height: | Size: 530 B |
After Width: | Height: | Size: 424 B |
After Width: | Height: | Size: 562 B |
After Width: | Height: | Size: 483 B |
After Width: | Height: | Size: 338 B |
After Width: | Height: | Size: 412 B |
After Width: | Height: | Size: 383 B |
After Width: | Height: | Size: 373 B |
After Width: | Height: | Size: 642 B |
After Width: | Height: | Size: 411 B |
After Width: | Height: | Size: 315 B |
After Width: | Height: | Size: 306 B |
After Width: | Height: | Size: 590 B |
After Width: | Height: | Size: 338 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1023 B |
After Width: | Height: | Size: 958 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 306 B |
After Width: | Height: | Size: 375 B |
After Width: | Height: | Size: 355 B |
After Width: | Height: | Size: 337 B |
After Width: | Height: | Size: 615 B |
After Width: | Height: | Size: 374 B |
After Width: | Height: | Size: 286 B |
After Width: | Height: | Size: 268 B |
After Width: | Height: | Size: 532 B |
After Width: | Height: | Size: 304 B |
After Width: | Height: | Size: 579 B |
After Width: | Height: | Size: 579 B |
After Width: | Height: | Size: 774 B |
After Width: | Height: | Size: 743 B |
After Width: | Height: | Size: 280 B |
After Width: | Height: | Size: 498 B |
After Width: | Height: | Size: 501 B |
After Width: | Height: | Size: 318 B |
After Width: | Height: | Size: 280 B |
After Width: | Height: | Size: 559 B |
After Width: | Height: | Size: 539 B |
After Width: | Height: | Size: 321 B |
After Width: | Height: | Size: 377 B |
After Width: | Height: | Size: 313 B |
After Width: | Height: | Size: 350 B |
After Width: | Height: | Size: 377 B |
After Width: | Height: | Size: 312 B |
After Width: | Height: | Size: 351 B |
After Width: | Height: | Size: 128 B |
After Width: | Height: | Size: 130 B |
After Width: | Height: | Size: 297 B |
After Width: | Height: | Size: 382 B |
After Width: | Height: | Size: 321 B |
After Width: | Height: | Size: 336 B |
After Width: | Height: | Size: 383 B |
After Width: | Height: | Size: 321 B |
After Width: | Height: | Size: 336 B |
After Width: | Height: | Size: 379 B |
After Width: | Height: | Size: 308 B |
After Width: | Height: | Size: 316 B |
After Width: | Height: | Size: 379 B |
After Width: | Height: | Size: 308 B |
After Width: | Height: | Size: 316 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 955 B |
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,26 @@ |
|||
import { gameManager } from "@/Game"; |
|||
import { IPointData } from "pixi.js"; |
|||
|
|||
class Position { |
|||
static instance: Position = null |
|||
private constructor() { } |
|||
static getInstance() { |
|||
if (Position.instance == null) { |
|||
Position.instance = new Position |
|||
} |
|||
return Position.instance |
|||
} |
|||
|
|||
get(xType: "center", yType: "center", offset: Partial<IPointData>): IPointData { |
|||
let x, y |
|||
if (xType === 'center') { |
|||
x = gameManager.getInfo().width / 2 + (offset.x ?? 0) |
|||
} |
|||
if (yType === 'center') { |
|||
y = gameManager.getInfo().height / 2 + (offset.y ?? 0) |
|||
} |
|||
return { x, y } |
|||
} |
|||
} |
|||
|
|||
export default Position.getInstance() |
@ -0,0 +1,24 @@ |
|||
import { EP } from "@/enmu"; |
|||
import { defineWindow } from "@/Game"; |
|||
import { Container } from "pixi.js"; |
|||
|
|||
export default defineWindow( |
|||
class { |
|||
stage: Container = null; |
|||
|
|||
constructor(stage: Container) { |
|||
this.stage = stage; |
|||
} |
|||
bindStage(stage: Container){ |
|||
this.stage = stage; |
|||
} |
|||
|
|||
onLoad() { |
|||
console.log("global page loaded"); |
|||
} |
|||
|
|||
onUnLoad() { |
|||
} |
|||
}, |
|||
EP.Resident |
|||
); |
@ -1,26 +0,0 @@ |
|||
import { EP } from "@/enmu"; |
|||
import { defineWindow } from "@/Game"; |
|||
import { Container, Loader } from "pixi.js"; |
|||
import { addSound } from "@/Game/Sound"; |
|||
|
|||
const loader = new Loader().add("my-sound", "/bg.mp3", (e) => addSound(e)); |
|||
|
|||
export default defineWindow("control", class { |
|||
stage: Container = null; |
|||
loader: Loader = loader; |
|||
|
|||
constructor(stage: Container) { |
|||
this.stage = stage; |
|||
} |
|||
|
|||
onLoad() { |
|||
console.log("onLoad control"); |
|||
} |
|||
|
|||
onUnLoad() { |
|||
console.log("onUnLoad control"); |
|||
} |
|||
|
|||
update() { |
|||
} |
|||
}, EP.Resident); |