Project1
标题:
popname插件事件没出现但是头上还会显示文字
[打印本页]
作者:
pajiman1999
时间:
2023-6-29 13:16
标题:
popname插件事件没出现但是头上还会显示文字
本帖最后由 pajiman1999 于 2023-6-29 13:19 编辑
popname插件事件没出现但是头上还会显示文字 如何修改呀?
代码如下
(function() {
_Sprite_Character_prototype_initialize = Sprite_Character.prototype.initialize;
Sprite_Character.prototype.initialize = function(character) {
_Sprite_Character_prototype_initialize.call(this, character);
this._tempCharacter = character;
if (character instanceof Game_Event) {
if (character.event().note.match("NAMEPOP") != null) {
var notetext = character.event().note.split("|");
this._namepopY = Number(notetext[1]) || 1;
this._fontSize = Number(notetext[2]) || 18;
this.createNamepopSet();
}
}
};
Sprite_Character.prototype.createNamepopSet = function() {
var h = this._fontSize;
this._namepopSprite = new Sprite();
this._namepopSprite.bitmap = new Bitmap(h * 10, h);
this._namepopSprite.bitmap.fontSize = h;
this._namepopSprite.bitmap.drawText(this._tempCharacter.event().name, 0, 0, h * 10, h, 'center');
this._namepopSprite.anchor.x = 0.5;
this._namepopSprite.anchor.y = 1;
this._namepopSprite.y = this.y - this._namepopY * 48;
this.addChild(this._namepopSprite);
};
}());
事件备注 NAMEPOP|1|26|rgba(255,255,255,1) 然后NPC在某些情况下如果不出现的话,但头顶还会出现字……
作者:
RyanYe
时间:
2023-6-30 22:15
不用修改,直接删掉,然后换钻头群主的漂浮文字插件即可
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1