2023-05-20 19:34:27 +00:00
|
|
|
/******/ (() => { // webpackBootstrap
|
|
|
|
/******/ "use strict";
|
|
|
|
/******/ var __webpack_modules__ = ({
|
|
|
|
|
|
|
|
/***/ "./src/game.ts":
|
|
|
|
/*!*********************!*\
|
|
|
|
!*** ./src/game.ts ***!
|
|
|
|
\*********************/
|
2023-05-27 09:35:08 +00:00
|
|
|
/***/ ((__unused_webpack_module, exports) => {
|
2023-05-20 19:34:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
exports.Game = void 0;
|
|
|
|
class Game {
|
|
|
|
constructor(width, height, title) {
|
|
|
|
this.width = width;
|
|
|
|
this.height = height;
|
|
|
|
this.title = title;
|
|
|
|
this.clearColor = RAYWHITE;
|
|
|
|
this.quit = false;
|
|
|
|
}
|
|
|
|
run() {
|
|
|
|
initWindow(this.width, this.height, this.title);
|
|
|
|
setTargetFPS(60);
|
2023-05-27 09:35:08 +00:00
|
|
|
this.load();
|
2023-05-20 19:34:27 +00:00
|
|
|
while (!(this.quit = windowShouldClose())) {
|
2023-05-27 09:35:08 +00:00
|
|
|
this.update();
|
2023-05-20 19:34:27 +00:00
|
|
|
beginDrawing();
|
|
|
|
clearBackground(this.clearColor);
|
2023-05-27 09:35:08 +00:00
|
|
|
this.draw();
|
2023-05-20 19:34:27 +00:00
|
|
|
endDrawing();
|
|
|
|
}
|
2023-05-27 09:35:08 +00:00
|
|
|
this.unload();
|
2023-05-20 19:34:27 +00:00
|
|
|
closeWindow();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
exports.Game = Game;
|
|
|
|
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
|
|
/******/ });
|
|
|
|
/************************************************************************/
|
|
|
|
/******/ // The module cache
|
|
|
|
/******/ var __webpack_module_cache__ = {};
|
|
|
|
/******/
|
|
|
|
/******/ // The require function
|
|
|
|
/******/ function __webpack_require__(moduleId) {
|
|
|
|
/******/ // Check if module is in cache
|
|
|
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
|
|
/******/ if (cachedModule !== undefined) {
|
|
|
|
/******/ return cachedModule.exports;
|
|
|
|
/******/ }
|
|
|
|
/******/ // Create a new module (and put it into the cache)
|
|
|
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
|
|
/******/ // no module.id needed
|
|
|
|
/******/ // no module.loaded needed
|
|
|
|
/******/ exports: {}
|
|
|
|
/******/ };
|
|
|
|
/******/
|
|
|
|
/******/ // Execute the module function
|
|
|
|
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
|
|
/******/
|
|
|
|
/******/ // Return the exports of the module
|
|
|
|
/******/ return module.exports;
|
|
|
|
/******/ }
|
|
|
|
/******/
|
|
|
|
/************************************************************************/
|
|
|
|
var __webpack_exports__ = {};
|
|
|
|
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
|
|
(() => {
|
|
|
|
var exports = __webpack_exports__;
|
|
|
|
/*!**********************!*\
|
|
|
|
!*** ./src/index.ts ***!
|
|
|
|
\**********************/
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
|
const game_1 = __webpack_require__(/*! ./game */ "./src/game.ts");
|
2023-05-27 09:35:08 +00:00
|
|
|
class MyGame extends game_1.Game {
|
|
|
|
draw() {
|
|
|
|
throw new Error("Method not implemented.");
|
2023-05-20 19:34:27 +00:00
|
|
|
}
|
2023-05-27 09:35:08 +00:00
|
|
|
update() {
|
|
|
|
throw new Error("Method not implemented.");
|
2023-05-20 19:34:27 +00:00
|
|
|
}
|
2023-05-27 09:35:08 +00:00
|
|
|
load() {
|
|
|
|
throw new Error("Method not implemented.");
|
2023-05-20 19:34:27 +00:00
|
|
|
}
|
|
|
|
unload() {
|
2023-05-27 09:35:08 +00:00
|
|
|
throw new Error("Method not implemented.");
|
2023-05-20 19:34:27 +00:00
|
|
|
}
|
|
|
|
}
|
2023-05-27 09:35:08 +00:00
|
|
|
const game = new MyGame(800, 450, "Typescript Game");
|
2023-05-20 19:34:27 +00:00
|
|
|
game.run();
|
|
|
|
|
|
|
|
})();
|
|
|
|
|
|
|
|
/******/ })()
|
|
|
|
;
|