Project1
标题:
[RM脚本] 地名显示
[打印本页]
作者:
kksq
时间:
2006-10-1 12:00
标题:
[RM脚本] 地名显示
字显示的比较难看,自己调吧!!{/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
复制代码
作者:
kksq
时间:
2006-10-1 12:00
标题:
[RM脚本] 地名显示
字显示的比较难看,自己调吧!!{/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
复制代码
作者:
令狐葱
时间:
2006-10-10 20:27
{/dy}不错
作者:
雪流星
时间:
2007-2-14 17:58
怎麽让地名在不想出现的时候消失?
作者:
魔剑美神
时间:
2007-2-15 01:25
恩,不错~只是,怎么去掉名字的背景啊?
作者:
火之圣者
时间:
2008-7-22 02:29
提示:
作者被禁止或删除 内容自动屏蔽
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1