Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
rndD committed Sep 29, 2024
1 parent 3d38104 commit 45ce0d7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/base/gameEffects.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ASSERT, hsl, ParticleEmitter, PI, Vector2 } from "littlejsengine";
import { mainSystem } from "../systems/mainSystem";
const persistentParticleDestroyCallback = (particle: any) => {
// copy particle to tile layer on death
ASSERT(
Expand All @@ -7,7 +8,7 @@ const persistentParticleDestroyCallback = (particle: any) => {
);
if (particle.groundObject)
// @ts-ignore
tileLayers[foregroundLayerIndex].drawTile(
mainSystem.floorTile.drawTile(
particle.pos,
particle.size,
particle.tileInfo,
Expand Down
1 change: 0 additions & 1 deletion src/menuUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
mainCanvas,
mousePos,
mouseWasReleased,
playAudioFile,
screenToWorld,
vec2,
} from "littlejsengine";
Expand Down
26 changes: 16 additions & 10 deletions src/systems/mainSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,23 @@ export const LEVELS_XP = [
150,
200,
300,
450,
700,
1000,
1300,
1700,
2100,
2500,
415,
550,
700, // 10
900,
1200,
1500,
2000,
2500, // 15
3000,
3500,
4000,
5000,
6500,
8000,
10000,
6000, // 20
7500,
9000,
11000,
15000,
Infinity,
];

Expand All @@ -61,6 +65,7 @@ export class MainSystem {
l!: number;
map!: LevelMap;
levels!: { map: LevelMap; rooms: Room[]; floorTile?: TileLayer }[];
floorTile!: TileLayer;
rooms!: Room[];
levelExit?: LevelExit;

Expand Down Expand Up @@ -107,6 +112,7 @@ export class MainSystem {

const floorTile = generateLevelLayer(map, rooms, true);
floorTile.redraw();
this.floorTile = floorTile;
this.setBackground();

this.character = new Character(
Expand Down

0 comments on commit 45ce0d7

Please sign in to comment.