mustachio-game 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/.github/workflows/pr.yaml +0 -21
- package/.github/workflows/push.yaml +0 -26
- package/eslint.config.ts +0 -17
- package/index.html +0 -22
- package/src/assets/Mustachio.webp +0 -0
- package/src/assets/Mustachio_FacingLeft.webp +0 -0
- package/src/assets/Mustachio_FacingLeft_Fire.webp +0 -0
- package/src/assets/Mustachio_FacingRight.webp +0 -0
- package/src/assets/Mustachio_FacingRight_Fire.webp +0 -0
- package/src/assets/Mustachio_Fire.webp +0 -0
- package/src/assets/brick.webp +0 -0
- package/src/assets/cannonDown.webp +0 -0
- package/src/assets/cannonLeft.webp +0 -0
- package/src/assets/cannonRight.webp +0 -0
- package/src/assets/cannonUp.webp +0 -0
- package/src/assets/fallingFloor.webp +0 -0
- package/src/assets/homestead.webp +0 -0
- package/src/assets/homesteadClosed.webp +0 -0
- package/src/assets/itemBlock.webp +0 -0
- package/src/assets/obstacleBrick.webp +0 -0
- package/src/assets/punchedBlock.webp +0 -0
- package/src/assets/stacheSeed1.webp +0 -0
- package/src/assets/stacheSeed2.webp +0 -0
- package/src/assets/stacheSeedReversed1.webp +0 -0
- package/src/assets/stacheSeedReversed2.webp +0 -0
- package/src/assets/stacheShotDown.webp +0 -0
- package/src/assets/stacheShotLeft.webp +0 -0
- package/src/assets/stacheShotRight.webp +0 -0
- package/src/assets/stacheShotUp.webp +0 -0
- package/src/assets/stacheSlinger1.webp +0 -0
- package/src/assets/stacheSlinger2.webp +0 -0
- package/src/assets/stacheStalker.webp +0 -0
- package/src/assets/stacheStalkerReversed.webp +0 -0
- package/src/assets/stacheStreaker1.webp +0 -0
- package/src/assets/stacheStreaker2.webp +0 -0
- package/src/classes/game-objects/bg-objects/background.ts +0 -18
- package/src/classes/game-objects/bg-objects/cloud.ts +0 -37
- package/src/classes/game-objects/mustachio.ts +0 -482
- package/src/classes/game-objects/point-objects/enemies/enemy.ts +0 -64
- package/src/classes/game-objects/point-objects/enemies/stache-seed.ts +0 -124
- package/src/classes/game-objects/point-objects/enemies/stache-shot.ts +0 -68
- package/src/classes/game-objects/point-objects/enemies/stache-slinger.ts +0 -63
- package/src/classes/game-objects/point-objects/enemies/stache-stalker.ts +0 -41
- package/src/classes/game-objects/point-objects/enemies/stache-streaker.ts +0 -78
- package/src/classes/game-objects/point-objects/items/coin.ts +0 -72
- package/src/classes/game-objects/point-objects/items/fire-stache.ts +0 -48
- package/src/classes/game-objects/point-objects/items/item.ts +0 -27
- package/src/classes/game-objects/point-objects/items/stacheroom.ts +0 -48
- package/src/classes/game-objects/point-objects/point-item.ts +0 -10
- package/src/classes/game-objects/projectiles/brick-debris.ts +0 -44
- package/src/classes/game-objects/projectiles/enemy-projectiles/enemy-projectile.ts +0 -3
- package/src/classes/game-objects/projectiles/enemy-projectiles/fire-ball.ts +0 -87
- package/src/classes/game-objects/projectiles/enemy-projectiles/fire-bar.ts +0 -65
- package/src/classes/game-objects/projectiles/enemy-projectiles/fire-cross.ts +0 -67
- package/src/classes/game-objects/projectiles/enemy-projectiles/laser.ts +0 -41
- package/src/classes/game-objects/projectiles/projectile.ts +0 -3
- package/src/classes/game-objects/projectiles/stache-ball.ts +0 -57
- package/src/classes/game-objects/set-pieces/flag.ts +0 -34
- package/src/classes/game-objects/set-pieces/obstacles/blocks/block.ts +0 -17
- package/src/classes/game-objects/set-pieces/obstacles/blocks/cave-wall.ts +0 -21
- package/src/classes/game-objects/set-pieces/obstacles/blocks/falling-floor.ts +0 -65
- package/src/classes/game-objects/set-pieces/obstacles/blocks/fire-bar-block.ts +0 -31
- package/src/classes/game-objects/set-pieces/obstacles/blocks/fire-cross-block.ts +0 -28
- package/src/classes/game-objects/set-pieces/obstacles/blocks/punchable-blockS/brick.ts +0 -44
- package/src/classes/game-objects/set-pieces/obstacles/blocks/punchable-blockS/item-block.ts +0 -82
- package/src/classes/game-objects/set-pieces/obstacles/blocks/punchable-blockS/punchable-block.ts +0 -6
- package/src/classes/game-objects/set-pieces/obstacles/blocks/stache-cannon.ts +0 -54
- package/src/classes/game-objects/set-pieces/obstacles/blocks/wall.ts +0 -22
- package/src/classes/game-objects/set-pieces/obstacles/floor.ts +0 -27
- package/src/classes/game-objects/set-pieces/obstacles/obstacle-types.ts +0 -14
- package/src/classes/game-objects/set-pieces/obstacles/obstacle.ts +0 -3
- package/src/classes/game-objects/set-pieces/obstacles/pipe.ts +0 -35
- package/src/classes/game-objects/set-pieces/obstacles/warp-pipe.ts +0 -17
- package/src/classes/game-objects/set-pieces/set-piece.ts +0 -3
- package/src/classes/game-objects/ui-objects/score-display.ts +0 -10
- package/src/classes/game-objects/ui-objects/timer-display.ts +0 -15
- package/src/classes/game-objects/ui-objects/ui-object.ts +0 -16
- package/src/classes/game-objects/ui-objects/win-display.ts +0 -25
- package/src/dev.ts +0 -5
- package/src/index.ts +0 -3
- package/src/levels/caves/cave-one.ts +0 -90
- package/src/levels/level-helpers.ts +0 -101
- package/src/levels/level-one.ts +0 -379
- package/src/levels/test-levels/blocks-and-items.ts +0 -77
- package/src/levels/test-levels/cannon-and-cross.ts +0 -75
- package/src/levels/test-levels/caves-and-enemies.ts +0 -73
- package/src/levels/test-levels/win-game.ts +0 -24
- package/src/main.ts +0 -6
- package/src/mustachi-game-context.ts +0 -35
- package/src/shared/app-code.ts +0 -106
- package/src/shared/constants.ts +0 -1
- package/src/shared/game-context.ts +0 -547
- package/src/shared/game-objects/game-object.ts +0 -28
- package/src/shared/game-objects/moving-game-object.ts +0 -46
- package/src/shared/game-objects/rotating-game-object.ts +0 -58
- package/src/shared/game-objects/updating-game-object.ts +0 -7
- package/src/shared/player.ts +0 -73
- package/src/shared/types.ts +0 -21
- package/tsconfig.json +0 -26
- package/vite.config.ts +0 -13
package/package.json
CHANGED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
name: 'Verify Typescript'
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
Build:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v4
|
|
13
|
-
- uses: actions/setup-node@v4
|
|
14
|
-
with:
|
|
15
|
-
cache: "npm"
|
|
16
|
-
|
|
17
|
-
- name: Build and Lint
|
|
18
|
-
run: |
|
|
19
|
-
npm ci
|
|
20
|
-
npm run lint
|
|
21
|
-
npm run build
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
name: Tag and Release on Main
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
|
|
10
|
-
publish-package:
|
|
11
|
-
uses: 'parkerstovall/workflows/.github/workflows/Publish_NPM.yaml@main'
|
|
12
|
-
with:
|
|
13
|
-
package_directory: '.'
|
|
14
|
-
secrets:
|
|
15
|
-
npm_token: ${{ secrets.NPM_AUTH_TOKEN }}
|
|
16
|
-
|
|
17
|
-
update-pac-man-repo:
|
|
18
|
-
if: ${{ needs.publish-package.outputs.created_tag == 'true' }}
|
|
19
|
-
uses: 'parkerstovall/workflows/.github/workflows/Push_PackageUpdate.yaml@main'
|
|
20
|
-
needs: publish-package
|
|
21
|
-
with:
|
|
22
|
-
package_directory: '.'
|
|
23
|
-
repo: 'parkerstovall/mustachio'
|
|
24
|
-
package_name: 'mustachio'
|
|
25
|
-
secrets:
|
|
26
|
-
repo_token: ${{ secrets.CROSS_REPO_TOKEN }}
|
package/eslint.config.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import js from "@eslint/js";
|
|
2
|
-
import globals from "globals";
|
|
3
|
-
import tseslint from "typescript-eslint";
|
|
4
|
-
import { defineConfig, globalIgnores } from "eslint/config";
|
|
5
|
-
import pluginPrettier from "eslint-plugin-prettier/recommended";
|
|
6
|
-
|
|
7
|
-
export default defineConfig([
|
|
8
|
-
globalIgnores(["dist/", "**/*.js"]),
|
|
9
|
-
{
|
|
10
|
-
files: ["**/*.ts"],
|
|
11
|
-
plugins: { js, tseslint },
|
|
12
|
-
extends: ["js/recommended"],
|
|
13
|
-
languageOptions: { globals: globals.browser },
|
|
14
|
-
},
|
|
15
|
-
tseslint.configs.recommended,
|
|
16
|
-
pluginPrettier,
|
|
17
|
-
]);
|
package/index.html
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>mustachio</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<style>
|
|
11
|
-
#app {
|
|
12
|
-
height: 36vw;
|
|
13
|
-
width: 64vw;
|
|
14
|
-
margin: auto;
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
|
|
18
|
-
<div id="app"></div>
|
|
19
|
-
<script type="module" src="/src/dev.ts"></script>
|
|
20
|
-
</script>
|
|
21
|
-
</body>
|
|
22
|
-
</html>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/assets/brick.webp
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/assets/cannonUp.webp
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { GameContext } from "../../../shared/game-context";
|
|
2
|
-
import { GameObject } from "../../../shared/game-objects/game-object";
|
|
3
|
-
|
|
4
|
-
export class Background extends GameObject {
|
|
5
|
-
constructor(gameContext: GameContext) {
|
|
6
|
-
super(gameContext, {
|
|
7
|
-
width: gameContext.gameArea.width,
|
|
8
|
-
height: gameContext.gameArea.height,
|
|
9
|
-
x: 0,
|
|
10
|
-
y: 0,
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
draw(ctx: CanvasRenderingContext2D): void {
|
|
15
|
-
ctx.fillStyle = "#87CEEB"; // Sky blue color
|
|
16
|
-
ctx.fillRect(0, 0, this.rect.width, this.rect.height);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { GameContext } from "../../../shared/game-context";
|
|
2
|
-
import { UpdatingGameObject } from "../../../shared/game-objects/updating-game-object";
|
|
3
|
-
import type { collision } from "../../../shared/types";
|
|
4
|
-
|
|
5
|
-
export class Cloud extends UpdatingGameObject {
|
|
6
|
-
private readonly speed = 0.3;
|
|
7
|
-
constructor(gameContext: GameContext, x: number, y: number) {
|
|
8
|
-
super(gameContext, {
|
|
9
|
-
width: 100,
|
|
10
|
-
height: 60,
|
|
11
|
-
x: x,
|
|
12
|
-
y: y,
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17
|
-
update(_: collision[]): void {
|
|
18
|
-
this.rect.x -= this.speed;
|
|
19
|
-
|
|
20
|
-
// Reset position if the cloud goes off-screen
|
|
21
|
-
if (this.rect.x + this.rect.width < 0) {
|
|
22
|
-
this.rect.x = this.gameContext.gameArea.width;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
draw(ctx: CanvasRenderingContext2D): void {
|
|
27
|
-
ctx.fillStyle = "#FFFFFF"; // White color for the cloud
|
|
28
|
-
ctx.beginPath();
|
|
29
|
-
|
|
30
|
-
// Draw a simple cloud shape
|
|
31
|
-
ctx.arc(this.rect.x, this.rect.y - 20, 25, 0, 360);
|
|
32
|
-
ctx.arc(this.rect.x + 20, this.rect.y, 25, 0, 360);
|
|
33
|
-
ctx.arc(this.rect.x - 20, this.rect.y, 25, 0, 360);
|
|
34
|
-
ctx.closePath();
|
|
35
|
-
ctx.fill();
|
|
36
|
-
}
|
|
37
|
-
}
|