赞 | 1 |
VIP | 20 |
好人卡 | 8 |
积分 | 3 |
经验 | 6181 |
最后登录 | 2022-8-5 |
在线时间 | 271 小时 |
Lv2.观梦者 神隐的主犯
- 梦石
- 0
- 星屑
- 299
- 在线时间
- 271 小时
- 注册时间
- 2008-2-22
- 帖子
- 7691
|
- #==============================================================================
- # 武器炼化模块定义
- #==============================================================================
- module LH
- max_stone = 10
- max_weapen = 30
- weapon_hash = {}
- end
- #==============================================================================
- # 标题窗口
- #==============================================================================
- class Window_LH_Title < Window_Base
- #--------------------------------------------------------------------------
- # * 物件初始化
- #--------------------------------------------------------------------------
- def initialize
- super(150, 0, 244, 64)
- self.contents = Bitmap.new(width-32,height-32)
- refresh
- end
- #--------------------------------------------------------------------------
- # * 更新內容顯示
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- self.contents.font.color = normal_color
- self.contents.font.size = 30
- self.contents.draw_text(-12,0,self.width,30,"武器炼化",1)
- end
-
- end
- #==============================================================================
- # 矿石选择窗口
- #==============================================================================
- class Window_LH_Stone < Window_Selectable
- #--------------------------------------------------------------------------
- # * 物件初始化
- #--------------------------------------------------------------------------
- def initialize
- super(0,64,272,208)
- refresh
- self.index = 0
- end
- #--------------------------------------------------------------------------
- # * 更新內容顯示
- #--------------------------------------------------------------------------
- def refresh
- if self.contents != nil
- self.contents.clear
- end
- @stone = []
- for i in 1...$data_items.size
- @stone.push($data_items[i])
- end
-
- if @stone.size > 0
- self.contents = Bitmap.new(200,row_max * 32)
- for i in [email protected]
- draw_item(i)
- end
- else
- self.contents = Bitmap.new(width-32,32)
- self.contents.draw_text(0,0,200,32,"目前没有可以炼化的元素",0)
- self.index = -1
- end
- end
- #--------------------------------------------------------------------------
- # * 繪製條目
- #--------------------------------------------------------------------------
- def draw_item(e)
- stone = @stone[e]
- num = $game_party.item_number(stone.id)
- self.contents.font.color = normal_color
- x = 4
- y = e *32
- rect = Rect.new(x,y,200,32)
- e += 1
- draw_icon(stone.icon_index, x, y+4, true)
- self.contents.draw_text(x+30,y,192,32, stone.name)
- self.contents.draw_text(x+224,y,16,32,"X",1)
- self.contents.draw_text(x+242,y,24,32,num.to_s,1)
- end
- end
- #==============================================================================
- # ** Scene_LH
- #------------------------------------------------------------------------------
- # 這個類用來显示武器炼化系统。
- #==============================================================================
- class Scene_LH < Scene_Base
- #--------------------------------------------------------------------------
- # * 初始化
- #--------------------------------------------------------------------------
- def initialize
- end
- #--------------------------------------------------------------------------
- # * 程式开始
- #--------------------------------------------------------------------------
- def start
- super
- create_menu_background
- @tw = Window_LH_Title.new
- @sw = Window_LH_Stone.new
- end
- #--------------------------------------------------------------------------
- # ● 结束处理
- #--------------------------------------------------------------------------
- def terminate
- super
- dispose_menu_background
- @tw.dispose
- @sw.dispose
- end
- #--------------------------------------------------------------------------
- # ● 更新画面
- #--------------------------------------------------------------------------
- def update
- super
- if Input.trigger?(Input::B)
- Sound.play_cancel
- $scene = Scene_Map.new # 程式終止
- end
- @tw.update
- @sw.update
- end
- #--------------------------------------------------------------------------
- # ● 更新命令窗口
- #--------------------------------------------------------------------------
- end
复制代码 LZ 无视我我之前给的脚本了~~~ |
|