赞 | 0 |
VIP | 1 |
好人卡 | 2 |
积分 | 1 |
经验 | 6641 |
最后登录 | 2019-2-12 |
在线时间 | 108 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 55
- 在线时间
- 108 小时
- 注册时间
- 2014-3-29
- 帖子
- 125
|
皮卡星 发表于 2014-5-29 20:56
因为你要一直按才会执行吧……
你应该这样写
从下面这个得失物品的脚本中得出的结论,下面这个脚本第68-76行的写法会导致战斗画面定格- def show_gain_window(type, value, string=nil)
- snstar2006_66rpg_item = $data_armors[@params[0]] if string == nil and type != 0
- snstar2006_66rpg = Window_Base.new((S_WIDTH-312)/2,(S_HEIGHT-132)/2,312,132)
- snstar2006_66rpg.contents = Bitmap.new(snstar2006_66rpg.width - 32, snstar2006_66rpg.height - 32)
- if value >= 0
- gain_text = "获得"
- else
- gain_text = "失去"
- end
-
- case type
- when 0
- gain_type = "金钱"
- if value >=0
- Audio.se_play(Gain_gold_se,80,100)
- else
- Audio.se_play(Loss_gold_se,80,100)
- end
- when 1
- gain_type = "物品"
- string = $data_items[@params[0]] if string == nil
- if value >=0
- Audio.se_play(Gain_item_se,80,100)
- else
- Audio.se_play(Loss_item_se,80,100)
- end
- when 2
- gain_type = "武器"
- string = $base_weapons[@params[0]] if string == nil
- if value >=0
- Audio.se_play(Gain_weapon_se,80,100)
- else
- Audio.se_play(Loss_weapon_se,80,100)
- end
- when 3
- unless @params[0] == PA::CRYSTAL
- gain_type = "防具"
- else
- gain_type = "物品"
- end
- string = $base_armors[@params[0]] if string == nil
- if value >=0
- Audio.se_play(Gain_armor_se,80,100)
- else
- Audio.se_play(Loss_armor_se,80,100)
- end
- when 4
- gain_type = "防具"
- string = $base_armors[@params[0]] if string == nil
- if value >=0
- Audio.se_play(Gain_armor_se,80,100)
- else
- Audio.se_play(Loss_armor_se,80,100)
- end
- end
-
- snstar2006_66rpg.contents.draw_text(0,0,160,32,gain_text+gain_type+":")
-
- unless type == 0
- snstar2006_66rpg.draw_item_name(string, 28, 32, true)
- snstar2006_66rpg.contents.draw_text(0, 64, 150, 32, "×"+value.abs.to_s, 2)
- else
- snstar2006_66rpg.contents.draw_text(32,32,240,32,value.abs.to_s + " "+ Vocab::gold)
- end
-
- snstar2006_66rpg.opacity = 160
-
- for i in 0..30
- Graphics.update
- end
-
- for i in 0..10
- snstar2006_66rpg.opacity -= 30
- snstar2006_66rpg.contents_opacity -= 30
- Graphics.update
- end
-
- snstar2006_66rpg.dispose
- end
复制代码 |
|