赞 | 2 |
VIP | 109 |
好人卡 | 208 |
积分 | 4 |
经验 | 22037 |
最后登录 | 2024-11-11 |
在线时间 | 1198 小时 |
Lv2.观梦者 虚構歪曲
- 梦石
- 0
- 星屑
- 364
- 在线时间
- 1198 小时
- 注册时间
- 2010-12-18
- 帖子
- 3928
|
本帖最后由 忧雪の伤 于 2011-3-19 13:06 编辑
- #______________________________________________________________________________
- # * 此脚本归66RPG - Idiot Script Association(ISA)所有,谢绝任何形式转载。
- #______________________________________________________________________________
- #==============================================================================
- # ■ 头顶的东西 - Put On The Thing
- #------------------------------------------------------------------------------
- # 遵守协议:66RPG - Idiot Script Association(ISA)
- # 初始脚本:忧雪の伤
- # 更新优化:无
- # 当前版本:1.0.0.0
- #------------------------------------------------------------------------------
- # 更新日记:忧雪の伤(2011.3.19)
- # - 初始化对象
- #------------------------------------------------------------------------------
- # 功能介绍:创建一个可以跟随移动,指定文件,显示在Player头上的Icon。
- # 使用方法:插入接入包的下端处。
- # 存在问题:无
- #==============================================================================
- #--------------------------------------------------------------------------
- # ● 资料记录
- #--------------------------------------------------------------------------
- module ISA
- Use["头顶的东西"] = [true, "1.0.0.0"]
- System["头顶的东西"] = {}
- end
- #--------------------------------------------------------------------------
- # ● 设定部分
- #--------------------------------------------------------------------------
- module ISA
- # 窗口的坐标修正设定
- System["头顶的东西"]["坐标修正设定"] = [30, 82]
- end
- #==============================================================================
- # ■ Window_Put_On
- #------------------------------------------------------------------------------
- # 显示图标的窗口。
- #==============================================================================
- class Window_Put_On < Window_Base
- include ISA
- #--------------------------------------------------------------------------
- # ● 初始化窗口
- #--------------------------------------------------------------------------
- def initialize(name)
- super(0, 0, 64, 64)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.opacity = 0
- self.x = $game_player.screen_x - System["头顶的东西"]["坐标修正设定"][0]
- self.y = $game_player.screen_y - System["头顶的东西"]["坐标修正设定"][1]
- self.z = 0
- @name = name
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- bitmap = RPG::Cache.icon(@name)
- self.contents.blt(0, 0, bitmap, Rect.new(0, 0, 24, 24))
- end
- end
- #==============================================================================
- # ■ Scene_Map
- #------------------------------------------------------------------------------
- # 处理地图画面的类。
- #==============================================================================
- class Scene_Map
- include ISA
- #--------------------------------------------------------------------------
- # ● 主处理
- #--------------------------------------------------------------------------
- alias :put_on_the_thing_main :main unless method_defined? :put_on_the_thing_main
- def main
- put_on_the_thing_main
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- alias :put_on_the_thing_update :update unless method_defined? :put_on_the_thing_update
- def update
- if @put_on_window != nil
- @put_on_window.visible = true
- @put_on_window.x = $game_player.screen_x - System["头顶的东西"]["坐标修正设定"][0]
- @put_on_window.y = $game_player.screen_y - System["头顶的东西"]["坐标修正设定"][1]
- end
- put_on_the_thing_update
- end
- #--------------------------------------------------------------------------
- # ● 设置图标
- #--------------------------------------------------------------------------
- def set_icon(name)
- @put_on_window = Window_Put_On.new(name)
- @put_on_window.visible = true
- end
- #--------------------------------------------------------------------------
- # ● 图标关闭
- #--------------------------------------------------------------------------
- def set_icon_no
- if @put_on_window != nil
- @put_on_window.visible = false
- end
- return true
- end
- end
复制代码 |
评分
-
查看全部评分
|