feat: character/NPC management system with spritesheet support
Add drag & drop spritesheet upload in editor, character registry in sprites.js, character selector for NPCs, sprite rendering on editor canvas, server API for character persistence, and game-side character loading via characterLoader.js. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -103,7 +103,7 @@ export function renderWorld(timestamp) {
|
||||
if (map.npcs) {
|
||||
for (const npc of map.npcs) {
|
||||
const pos = tileToScreen(npc.x, npc.y);
|
||||
drawNPC(ctx, pos.x, pos.y, npc.facing || 'down');
|
||||
drawNPC(ctx, pos.x, pos.y, npc.facing || 'down', npc.charId || null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user