设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1267|回复: 1
打印 上一主题 下一主题

[已经过期] 装备扩张导致更换装备时候很卡,求助!

[复制链接]

Lv2.观梦者

梦石
0
星屑
582
在线时间
917 小时
注册时间
2013-3-13
帖子
557
跳转到指定楼层
1
发表于 2015-3-25 13:56:56 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 crow2006 于 2015-3-25 13:59 编辑

RUBY 代码复制
  1. class Scene_Equip < Scene_Base
  2. def update_status_window
  3.     if @equip_window.active
  4.       @status_window.set_new_parameters(nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil)
  5.     elsif @item_window.active
  6.       temp_actor = Marshal.load(Marshal.dump(@actor)) #@actor.clone #
  7.       temp_actor.change_equip(@equip_window.index, @item_window.item, true)
  8.       new_atk = temp_actor.atk
  9.       new_def = temp_actor.def
  10.       new_spi = temp_actor.spi
  11.       new_agi = temp_actor.agi
  12.       new_hit = temp_actor.hit
  13.       new_eva = temp_actor.eva
  14.       new_cri = temp_actor.cri
  15.       new_maxhp = temp_actor.maxhp
  16.       new_maxmp = temp_actor.maxmp
  17.       new_sx9  = temp_actor.sx9
  18.       new_sx10 = temp_actor.sx10
  19.       new_sx11 = temp_actor.sx11
  20.       new_sx12 = temp_actor.sx12
  21.       new_sx13 = temp_actor.sx13
  22.       new_sx14 = temp_actor.sx14
  23.       new_sx15 = temp_actor.sx15
  24.       new_sx16 = temp_actor.sx16
  25.       new_sx17 = temp_actor.sx17
  26.       new_sx18 = temp_actor.sx18
  27.       new_sx19 = temp_actor.sx19
  28.       new_sx20 = temp_actor.sx20
  29.       new_sx21 = temp_actor.sx21
  30.       new_sx22 = temp_actor.sx22
  31.       new_sx23 = temp_actor.sx23
  32.       new_sx24 = temp_actor.sx24
  33.       new_sx25 = temp_actor.sx25
  34.       new_sx26 = temp_actor.sx26
  35.       new_sx27 = temp_actor.sx27
  36.       new_sx28 = temp_actor.sx28
  37.       new_sx29 = temp_actor.sx29
  38.       new_sx30 = temp_actor.sx30
  39.       @status_window.set_new_parameters(new_atk, new_def, new_spi, new_agi, new_maxhp, new_maxmp, new_hit, new_eva, new_cri, new_sx9,new_sx10, new_sx11, new_sx12, new_sx13, new_sx14, new_sx15, new_sx16, new_sx17, new_sx18, new_sx19, new_sx20, new_sx21, new_sx22, new_sx23, new_sx24, new_sx25, new_sx26, new_sx27, new_sx28, new_sx29, new_sx30)
  40.     end
  41.     @status_window.update
  42.   end
  43. end


卡的原因就在这句:temp_actor = Marshal.load(Marshal.dump(@actor))
如果改成          temp_actor = @actor.clone
虽然不再卡,但是会产生穿上的装备仍然留在包裹中不消失的BUG。
求助。

Lv3.寻梦者 (版主)

…あたしは天使なんかじゃないわ

梦石
0
星屑
2208
在线时间
4033 小时
注册时间
2010-10-4
帖子
10779

开拓者贵宾

2
发表于 2015-3-26 17:27:35 手机端发表。 | 只看该作者
仅在数据发生变化时读取数据并刷新。

点评

我没有VX,我也不知道  发表于 2015-3-28 09:57
求教。。。不知道写在哪儿  发表于 2015-3-28 09:19
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-14 11:47

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表