feat: add poc
This commit is contained in:
parent
43d27b04d9
commit
4a4fa05ce4
53 changed files with 6191 additions and 0 deletions
27
src/world/World.js
Normal file
27
src/world/World.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* World manager - handles areas and world state
|
||||
*/
|
||||
export class World {
|
||||
constructor() {
|
||||
this.areas = [];
|
||||
this.currentArea = null;
|
||||
this.areas.push({
|
||||
id: 'cave',
|
||||
name: 'Dark Cave',
|
||||
type: 'cave',
|
||||
spawnTypes: ['humanoid', 'beast', 'elemental'],
|
||||
spawnRate: 0.5
|
||||
});
|
||||
|
||||
this.currentArea = this.areas[0];
|
||||
}
|
||||
|
||||
getCurrentArea() {
|
||||
return this.currentArea;
|
||||
}
|
||||
|
||||
getSpawnTypes() {
|
||||
return this.currentArea ? this.currentArea.spawnTypes : ['beast'];
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue