查看: 4079|回复: 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
星屑
46133
在线时间
7978 小时
注册时间
2009-7-6
回帖
13342

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 | 显示全部楼层
没用过这么大的图像
绘制图标应该是下面这段吧
点击展开/收起


  1. //-----------------------------------------------------------------------------
  2. // Sprite_StateIcon
  3. // 状态图标精灵
  4. // The sprite for displaying state icons.
  5. // 显示状态图标的精灵

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

  9. //设置原形
  10. Sprite_StateIcon.prototype = Object.create(Sprite.prototype);
  11. //设置创造者
  12. Sprite_StateIcon.prototype.constructor = Sprite_StateIcon;
  13. //初始化
  14. Sprite_StateIcon.prototype.initialize = function() {
  15.     Sprite.prototype.initialize.call(this);
  16.     this.initMembers();
  17.     this.loadBitmap();
  18. };

  19. Sprite_StateIcon._iconWidth  = 32;
  20. Sprite_StateIcon._iconHeight = 32;
  21. //初始化成员
  22. Sprite_StateIcon.prototype.initMembers = function() {
  23.     this._battler = null;
  24.     this._iconIndex = 0;
  25.     this._animationCount = 0;
  26.     this._animationIndex = 0;
  27.     this.anchor.x = 0.5;
  28.     this.anchor.y = 0.5;
  29. };
  30. //读取
  31. Sprite_StateIcon.prototype.loadBitmap = function() {
  32.     this.bitmap = ImageManager.loadSystem('IconSet');
  33.     this.setFrame(0, 0, 0, 0);
  34. };
  35. //安装
  36. Sprite_StateIcon.prototype.setup = function(battler) {
  37.     this._battler = battler;
  38. };
  39. //更新
  40. Sprite_StateIcon.prototype.update = function() {
  41.     Sprite.prototype.update.call(this);
  42.     this._animationCount++;
  43.     if (this._animationCount >= this.animationWait()) {
  44.         this.updateIcon();
  45.         this.updateFrame();
  46.         this._animationCount = 0;
  47.     }
  48. };
  49. //动画等待
  50. Sprite_StateIcon.prototype.animationWait = function() {
  51.     return 40;
  52. };
  53. //更新图标
  54. Sprite_StateIcon.prototype.updateIcon = function() {
  55.     var icons = [];
  56.     if (this._battler && this._battler.isAlive()) {
  57.         icons = this._battler.allIcons();
  58.     }
  59.     if (icons.length > 0) {
  60.         this._animationIndex++;
  61.         if (this._animationIndex >= icons.length) {
  62.             this._animationIndex = 0;
  63.         }
  64.         this._iconIndex = icons[this._animationIndex];
  65.     } else {
  66.         this._animationIndex = 0;
  67.         this._iconIndex = 0;
  68.     }
  69. };
  70. //更新帧
  71. Sprite_StateIcon.prototype.updateFrame = function() {
  72.     var pw = Sprite_StateIcon._iconWidth;
  73.     var ph = Sprite_StateIcon._iconHeight;
  74.     var sx = this._iconIndex % 16 * pw;
  75.     var sy = Math.floor(this._iconIndex / 16) * ph;
  76.     this.setFrame(sx, sy, pw, ph);
  77. };
复制代码


点评

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

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部