mirror of
https://github.com/Cola-Echo/memory-manager-concurrent.git
synced 2026-06-13 07:45:50 +00:00
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>
This commit is contained in:
68
games/mario/super-mario-bros/mario.js
Normal file
68
games/mario/super-mario-bros/mario.js
Normal file
@@ -0,0 +1,68 @@
|
||||
(function() {
|
||||
|
||||
/**
|
||||
*
|
||||
* Backbone Game Engine - An elementary HTML5 canvas game engine using Backbone.
|
||||
*
|
||||
* Copyright (c) 2014 Martin Drapeau
|
||||
* https://github.com/martindrapeau/backbone-game-engine
|
||||
*
|
||||
*/
|
||||
|
||||
Backbone.Mario = Backbone.Hero.extend({
|
||||
defaults: _.extend({}, Backbone.Hero.prototype.defaults, {
|
||||
name: "mario",
|
||||
spriteSheet: "mario"
|
||||
}),
|
||||
bounce: function(sprite, dir, dir2) {
|
||||
var cur = this.getStateInfo(),
|
||||
state = this.buildState("jump", cur.dir);
|
||||
this.set({
|
||||
state: state,
|
||||
yVelocity: this.animations[state].yStartVelocity*0.5,
|
||||
nextState: this.buildState("idle", cur.dir)
|
||||
});
|
||||
this.cancelUpdate = true;
|
||||
return this;
|
||||
},
|
||||
hit: function(sprite, dir, dir2) {
|
||||
if (this._handlingSpriteHit) return this;
|
||||
this._handlingSpriteHit = sprite;
|
||||
|
||||
if (sprite.get("type") == "artifact") {
|
||||
this.cancelUpdate = true;
|
||||
} else if (sprite.get("type") == "character") {
|
||||
var name = sprite.get("name"),
|
||||
cur = this.getStateInfo(),
|
||||
opo = dir == "left" ? "right" : (dir == "right" ? "left" : (dir == "top" ? "bottom" : "top"));
|
||||
|
||||
if (dir == "bottom" && name != "spike") {
|
||||
this.bounce.apply(this, arguments);
|
||||
} else if (sprite.isAttacking()) {
|
||||
this.knockout(sprite, "left");
|
||||
}
|
||||
sprite.trigger("hit", this, opo);
|
||||
}
|
||||
|
||||
this._handlingSpriteHit = undefined;
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
||||
Backbone.Luigi = Backbone.Mario.extend({
|
||||
defaults: _.extend({}, Backbone.Hero.prototype.defaults, {
|
||||
name: "luigi",
|
||||
spriteSheet: "mario"
|
||||
}),
|
||||
animations: _.reduce(Backbone.Hero.prototype.animations, function(animations, anim, name) {
|
||||
var clone = _.clone(anim);
|
||||
clone.sequences = _.map(anim.sequences, function(index) {
|
||||
return index + 42;
|
||||
});
|
||||
animations[name] = clone;
|
||||
return animations;
|
||||
}, {})
|
||||
});
|
||||
|
||||
|
||||
}).call(this);
|
||||
Reference in New Issue
Block a user