Files
memory-manager-concurrent/games/mario/mario/main.js
Cola-Echo 6b80f1b755 feat: 支持 Lore-char 命名的总结世界书识别
- isSummaryBook 函数新增对 Lore-char/lore-char 的检测
- 修复启用记忆搜索助手时进度条重复显示总结世界书任务的问题
- 更新错误提示信息,说明支持的命名规则

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 00:49:28 +08:00

75 lines
1.5 KiB
JavaScript

$(window).on("load", function() {
/**
*
* Backbone Game Engine - An elementary HTML5 canvas game engine using Backbone.
*
* Copyright (c) 2014 Martin Drapeau
* https://github.com/martindrapeau/backbone-game-engine
*
*/
// Mario alone in an empty world. Control him with the touchpad.
Backbone.Mario = Backbone.Hero.extend({
defaults: _.extend({}, Backbone.Hero.prototype.defaults, {
name: "mario",
spriteSheet: "mario"
})
});
var canvas = document.getElementById("foreground");
adjustViewport(canvas);
var spriteSheets = new Backbone.SpriteSheetCollection([{
id: "mario",
img: "#mario",
tileWidth: 32,
tileHeight: 64,
tileColumns: 21,
tileRows: 6
}]).attachToSpriteClasses();
var debugPanel = new Backbone.DebugPanel();
var input = new Backbone.Input({
drawTouchpad: true,
drawPause: true
});
var mario = new Backbone.Mario({
x: 400, y: 200, floor: 500
}, {
input: input
});
var world = new Backbone.World({
width: 30, height: 17,
tileWidth: 32, tileHeight: 32,
viewportBottom: 156,
backgroundColor: "rgba(66, 66, 255, 1)"
}, {
input: input
});
world.add(mario);
var engine = new Backbone.Engine({}, {
canvas: canvas,
debugPanel: debugPanel,
input: input
});
engine.add([
world,
input,
debugPanel
]);
// Expose things as globals - easier to debug
_.extend(window, {
canvas: canvas,
engine: engine,
world: world,
mario: mario
});
});