贴吧用户_79GeM51
幸运的solve
关注数: 1
粉丝数: 1
发帖数: 36
关注贴吧数: 4
事件头部显示名称 写个超级简单的插件来蹭下热度~~~~效果如图,在事件栏备注一下名字就可以了 <name:破坏神> 特别注意,改插件依赖于 MZ 自带的插件:PluginBaseFunction /*: * * * @plugindesc headName * @author lh * @date 14:42 * @target MZ * @base PluginBaseFunction * * @param front * @text 字体大小 * @desc 绘制顶部文字的大小 * @default 18 * @type number * * @param width * @text 宽度 * @desc 当名字比较长显示不下可以调大该值 * @default 64 * @type number * * @param height * @text 高度 * @desc 默认是居中的,所以会影响padding值 * @default 18 * @type number * * @help * 事件栏备注: * <name:破坏神> * * * */ const solve_HeadName =PluginManager.parameters('Solve_SimpleHeadName') function Sprite_HeadName() { this.initialize(...arguments); } Sprite_HeadName.prototype = Object.create(Sprite.prototype); Sprite_HeadName.prototype.constructor = Sprite_HeadName; Sprite_HeadName.prototype.initialize = function (deploy) { Sprite.prototype.initialize.call(this); this._deploy = deploy; this.bitmap = new Bitmap(solve_HeadName.width, solve_HeadName.height) }; Sprite_HeadName.prototype.update = function () { Sprite.prototype.update.call(this); this.x = this._deploy.x - (solve_HeadName.width) / 2 this.y = this._deploy.y - solve_HeadName.height-this._deploy.height this.z = this._deploy.z + 1 this.opacity = this._deploy.opacity this.blendMode = this._deploy.blendMode this._bushDepth = this._deploy._bushDepth this.visible = this._deploy.visible; this.bitmap.fontSize = solve_HeadName.front this.bitmap.drawText(this.headName(), 0, 0, solve_HeadName.width, solve_HeadName.height, 'center') } Sprite_HeadName.prototype.headName = function () { let character = this._deploy._character; if (character && character.findMeta) { return character.findMeta("name") || '' } return ''; } solve_HeadName.Sprite_Character_initialize = Sprite_Character.prototype.initialize Sprite_Character.prototype.initialize = function (character) { solve_HeadName.Sprite_Character_initialize.call(this, character); if (character && character.findMeta&&character.findMeta("name")) { this._headSprite = new Sprite_HeadName(this) } }; solve_HeadName.Sprite_Character_update = Sprite_Character.prototype.update Sprite_Character.prototype.update = function () { solve_HeadName.Sprite_Character_update.call(this); if (this._headSprite) { this.parent.addChild(this._headSprite) this._headSprite = undefined; } };
【新坑】新坑寻求助攻 目前本人已经完成了第一个作品:王者佣兵传奇, 一款偏刷装备的RPG游戏。 因为MZ的出现,所以想新开一个坑... 目前初步的计划是一款 以 刷装备 + 角色养成 的三国风游戏。 本人现在主要缺少的是: 1. 素材.... 因为想制作一个有版权的游戏, 所以素材是一个绕不过去的坎, 初步设想主要需要的可能就是 战斗图和UI 这块。 所以在这里想寻求一些画师大佬, 可以选择合作模式,直接私信我就好了。 也可以选择交易模式, 如果是交易的话,我只需要使用权限, 不需要所有权,可以直接带个范例和价格私信我。 2 剧情... 这块不是刚需吧~但是个人确实不是太擅长这块, 所以如果你有想法,也欢迎私信我哦~~~ 最后~如果你有想看下我的第一个作品, 也欢迎加群 156928564
1
下一页