赞 | 0 |
VIP | 4 |
好人卡 | 43 |
积分 | 94 |
经验 | 75226 |
最后登录 | 2019-3-3 |
在线时间 | 1131 小时 |
Lv4.逐梦者
- 梦石
- 3
- 星屑
- 6420
- 在线时间
- 1131 小时
- 注册时间
- 2007-12-26
- 帖子
- 2402
|
本帖最后由 幻耶 于 2012-1-13 16:02 编辑
比如判断出当武器含有11号属性,提示框里的文字变成红色;比如判断出当武器含有12号属性,提示框里的文字变成黄色- def get_weapon(weapon_name, n)
- @weapon_name = weapon_name
- for i in 1...$data_weapons.size
- if $data_weapons[i].name == @weapon_name
- @weapon_id = i
- end
- end
- $game_party.gain_weapon(@weapon_id, n)
- enghao_showbar_weapon = $data_weapons[@weapon_id]
- enghao_showbar = Window_Base.new((640-300)/2,128,300,100)
- enghao_showbar.contents = Bitmap.new(enghao_showbar.width - 32, enghao_showbar.height - 32)
- if n >= 0
- enghao_showbar.contents.draw_text(0,0,240,32,"获得武器:")
- Audio.se_play("Audio/SE/"+"006-System06",80,100)
- else
- enghao_showbar.contents.draw_text(0,0,240,32,"失去武器:")
- Audio.se_play("Audio/SE/"+"005-System05",80,100)
- end
- enghao_showbar_bitmap = RPG::Cache.icon(enghao_showbar_weapon.icon_name)
- enghao_showbar.contents.blt(0, 32, enghao_showbar_bitmap, Rect.new(0, 0, 24, 24), 255)
- enghao_showbar.contents.draw_text(0 + 28, 32, 212, 32, enghao_showbar_weapon.name, 0)
- enghao_showbar.contents.draw_text(0, 32, 268, 32, "×"+n.abs.to_s, 2)
- enghao_showbar.opacity = 160
- for i in 0...30
- Graphics.update
- end
- for i in 0...10
- enghao_showbar.opacity -= 30
- enghao_showbar.contents_opacity -= 30
- Graphics.update
- end
- enghao_showbar.dispose
- end
复制代码 |
|