赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 4 |
经验 | 3524 |
最后登录 | 2020-6-14 |
在线时间 | 55 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 374
- 在线时间
- 55 小时
- 注册时间
- 2013-12-6
- 帖子
- 30
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
请问各位大佬,我在使用此插件改写一个Damage图时,当角色受到伤害,显示了我设定的单帧图片,当时它一直显示在那里,请问要怎么return到正常状态下的图片?
以下是我用的插件内容:
//Replace Actor default Damage animation
var AXY_alias_Game_Actor_prototype_performDamage = Game_Actor.prototype.performDamage;
Game_Actor.prototype.performDamage = function() {
Game_Battler.prototype.performDamage.call(this);
if ($gameParty.inBattle()) {
if(this.isAXYSingleImgSVActor === true)
{
//console.log('isAXYSingleImgSVActor dead');
//console.log(this);
//console.log($gameParty);
//console.log($gameActors.actor(this._actorId));
var actorId = this._actorId;
SoundManager.playActorDamage();
console.log(AXY.SingleImgSVActor.Param.SVActor[this._actorId]);
var AXYSingleImgSVActorFileName = $dataActors[actorId].meta.axysingle_Damage ? $dataActors[actorId].meta.axysingle_death : $dataActors[actorId].meta.axysingle;
var AXYSingleImgSVActorScaleX = $dataActors[actorId].meta.axysingle_Damage_scalex;
var AXYSingleImgSVActorScaleY = $dataActors[actorId].meta.axysingle_Damage_scaley;
var AXYSingleImgSVActorRotation = $dataActors[actorId].meta.axysingle_Damage_rotation;
var AXYSingleImgSVActorHUE = $dataActors[actorId].meta.axysingle_Damage_hue ? $dataActors[actorId].meta.axysingle_Damage_hue : 0;
if(AXYSingleImgSVActorScaleX)
{
AXY.SingleImgSVActor.Param.SVActor[actorId].scale.x = AXYSingleImgSVActorScaleX;
}
if(AXYSingleImgSVActorScaleY)
{
AXY.SingleImgSVActor.Param.SVActor[actorId].scale.y = AXYSingleImgSVActorScaleY;
}
if(AXYSingleImgSVActorRotation)
{
AXY.SingleImgSVActor.Param.SVActor[actorId].rotation = AXYSingleImgSVActorRotation;
}
//AXY.SingleImgSVActor.Param.SVActor[this._actorId].bitmap.alpha = 0.5;
//AXY.SingleImgSVActor.Param.SVActor[this._actorId].bitmap.textColor = 'rgba(0,255,0,0)';
if(AXYSingleImgSVActorFileName)
{
AXY.SingleImgSVActor.Param.SVActor[this._actorId].bitmap = ImageManager.loadSvActor(AXYSingleImgSVActorFileName, AXYSingleImgSVActorHUE);
}
//this._actor.battlerHue();
//this.requestMotion('escape');
//this.addNewState(6);
//this.refresh();
//todo
//death animation
/*Sprite_Enemy.prototype.updateBitmap = function() {
Sprite_Battler.prototype.updateBitmap.call(this);
var name = this._enemy.battlerName();
var hue = this._enemy.battlerHue();
if (this._battlerName !== name || this._battlerHue !== hue) {
this._battlerName = name;
this._battlerHue = hue;
var huePlugins = hue + this._enemy.isElite() ? 100 : 0;
this.loadBitmap(name, huePlugins);
this.initVisibility();
}
if (Morpho_EliteEnemy_Plugins_Size == "true") {
this.scale.x = this._enemy.isElite() ? 1.2 : 1;
this.scale.y = this._enemy.isElite() ? 1.2 : 1;
}
};*/
}
else{
AXY_alias_Game_Actor_prototype_performDamage.call(this);
}
}
};
|
|