赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 235 |
最后登录 | 2013-10-19 |
在线时间 | 2 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 2 小时
- 注册时间
- 2006-9-3
- 帖子
- 61
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
字显示的比较难看,自己调吧!!{/cy}
- class Floating_Location < Window_Base
- def initialize
- @map_name = get_name
- @size = Win_Size.new(@map_name)
- width = @size[0]
- height = @size[1]
- super(0, 0, width+32, height+32)
- self.contents = Bitmap.new(width, height)
- self.opacity = 240
- self.back_opacity = 240
- self.contents_opacity = 240
- @frame_wait = Graphics.frame_count + 60
- refresh
- end
- def refresh
- self.contents.font.color = Color.new(217,87,0,255)
- self.contents.draw_text(0, 0, @size[0]+32, @size[1], @map_name)
- end
- def update
- if get_name != @map_name
- self.dispose
- return
- end
- if @frame_wait <= Graphics.frame_count
- if self.opacity > 0
- self.opacity -= 20
- self.back_opacity -= 20
- self.contents_opacity -= 20
- else
- self.dispose
- return
- end
- end
- end
- def get_name
- data = load_data("Data/MapInfos.rxdata")
- data[$game_map.map_id].name
- end
- end
- class Win_Size < Window_Base
-
- def initialize(text)
- super(0, 0, 640, 480)
- self.contents = Bitmap.new(640 - 32, 480 - 32)
- @w = contents.text_size(text).width
- @h = contents.text_size(text).height
- self.dispose
- end
-
- def [](value)
- if value == 0
- return @w
- else
- return @h
- end
- end
- end
-
- class Scene_Map
- alias :main_orig :main
- alias :update_orig :update
- alias :transfer_player_orig :transfer_player
- def main
- @floating_location.dispose unless @floating_location.nil?
- @floating_location = Floating_Location.new
- main_orig
- @floating_location.dispose unless (@floating_location.disposed? or
- @floating_location.nil?)
- end
- def update
- @floating_location.update unless (@floating_location.disposed? or
- @floating_location.nil?)
- update_orig
- end
-
- def transfer_player
- transfer_player_orig
- @floating_location.dispose unless (@floating_location.disposed? or
- @floating_location.nil?)
- @floating_location = Floating_Location.new
- end
- end
复制代码 |
|