查看: 4012|回复: 7

[已经过期] 圖標高度超過8500像素敵人頭上會出現黑框

[复制链接]
梦石
0
星屑
497
在线时间
266 小时
注册时间
2015-12-8
回帖
729
发表于 2016-2-23 09:55:10 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
請問怎麼解決? 我發現只要超過8500像素 敵人頭上都有黑色的方框
梦石
0
星屑
50
在线时间
40 小时
注册时间
2012-8-4
回帖
18
发表于 2016-3-5 14:50:45 | 显示全部楼层
同问,唉
回复

使用道具 举报

梦石
0
星屑
4063
在线时间
32 小时
注册时间
2015-11-28
回帖
2
发表于 2016-3-8 17:15:38 | 显示全部楼层
顶起同问
回复

使用道具 举报

老黄鸡

梦石
4
星屑
45700
在线时间
7948 小时
注册时间
2009-7-6
回帖
13338

MZ评测员RM创作大赛01组委会开拓者贵宾

发表于 2016-3-9 08:55:44 | 显示全部楼层
为什么图标会有那么大,分隔一下不行么
RGDirect - DirectX驱动的RGSS,点我了解.
(排满,暂停)RM全系列成套系统定制请联系QQ1213237796
不接受对其他插件维护的委托
回复

使用道具 举报

梦石
0
星屑
497
在线时间
266 小时
注册时间
2015-12-8
回帖
729
 楼主| 发表于 2016-3-9 11:30:12 | 显示全部楼层
fux2 发表于 2016-3-9 08:55
为什么图标会有那么大,分隔一下不行么

全部加起來....妳以為一個圖標8500阿{:2_276:}
回复

使用道具 举报

梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
回帖
1464
发表于 2016-3-9 12:08:12 | 显示全部楼层
建议给出图示,
回复

使用道具 举报

梦石
0
星屑
497
在线时间
266 小时
注册时间
2015-12-8
回帖
729
 楼主| 发表于 2016-3-9 12:21:53 | 显示全部楼层
汪汪 发表于 2016-3-9 12:08
建议给出图示,

就敵人頭上状态變成全黑(不論有沒有中状态)
回复

使用道具 举报

梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
回帖
1464
发表于 2016-3-9 12:28:34 | 显示全部楼层
没用过这么大的图像
绘制图标应该是下面这段吧
[fold]

[pre lang="javascript"]
//-----------------------------------------------------------------------------
// Sprite_StateIcon
// 状态图标精灵
// The sprite for displaying state icons.
// 显示状态图标的精灵

function Sprite_StateIcon() {
    this.initialize.apply(this, arguments);
}

//设置原形
Sprite_StateIcon.prototype = Object.create(Sprite.prototype);
//设置创造者
Sprite_StateIcon.prototype.constructor = Sprite_StateIcon;
//初始化
Sprite_StateIcon.prototype.initialize = function() {
    Sprite.prototype.initialize.call(this);
    this.initMembers();
    this.loadBitmap();
};

Sprite_StateIcon._iconWidth  = 32;
Sprite_StateIcon._iconHeight = 32;
//初始化成员
Sprite_StateIcon.prototype.initMembers = function() {
    this._battler = null;
    this._iconIndex = 0;
    this._animationCount = 0;
    this._animationIndex = 0;
    this.anchor.x = 0.5;
    this.anchor.y = 0.5;
};
//读取
Sprite_StateIcon.prototype.loadBitmap = function() {
    this.bitmap = ImageManager.loadSystem('IconSet');
    this.setFrame(0, 0, 0, 0);
};
//安装
Sprite_StateIcon.prototype.setup = function(battler) {
    this._battler = battler;
};
//更新
Sprite_StateIcon.prototype.update = function() {
    Sprite.prototype.update.call(this);
    this._animationCount++;
    if (this._animationCount >= this.animationWait()) {
        this.updateIcon();
        this.updateFrame();
        this._animationCount = 0;
    }
};
//动画等待
Sprite_StateIcon.prototype.animationWait = function() {
    return 40;
};
//更新图标
Sprite_StateIcon.prototype.updateIcon = function() {
    var icons = [];
    if (this._battler && this._battler.isAlive()) {
        icons = this._battler.allIcons();
    }
    if (icons.length > 0) {
        this._animationIndex++;
        if (this._animationIndex >= icons.length) {
            this._animationIndex = 0;
        }
        this._iconIndex = icons[this._animationIndex];
    } else {
        this._animationIndex = 0;
        this._iconIndex = 0;
    }
};
//更新帧
Sprite_StateIcon.prototype.updateFrame = function() {
    var pw = Sprite_StateIcon._iconWidth;
    var ph = Sprite_StateIcon._iconHeight;
    var sx = this._iconIndex % 16 * pw;
    var sy = Math.floor(this._iconIndex / 16) * ph;
    this.setFrame(sx, sy, pw, ph);
};
[/pre]

[/fold]

点评

是,你可以用console.log( ) 来看看到底是哪个地方出的问题导致的....因为我没有遇到这种问题,所以无法作答  发表于 2016-3-9 13:31
這是原本的代碼?  发表于 2016-3-9 13:03
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部