赞 | 1 |
VIP | 20 |
好人卡 | 8 |
积分 | 4 |
经验 | 6181 |
最后登录 | 2022-8-5 |
在线时间 | 271 小时 |
Lv2.观梦者 神隐的主犯
- 梦石
- 0
- 星屑
- 373
- 在线时间
- 271 小时
- 注册时间
- 2008-2-22
- 帖子
- 7691

|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
先发脚本:
- class Window_Position < Window_Selectable
-
- #--------------------------------------------------------------------------
- # ● 初始化对象
- # actor : 角色
- #--------------------------------------------------------------------------
- def initialize(x, y)
- super(x, y, 400, 300)
- @column_max = 4
- @indexes = 0
- @timeses = 0
- @bitmap = []
- for actor in $game_party.members
- @bitmap.push(Cache.character(actor.character_name))
- end
- self.active = true
- self.index = -1
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @timeses += 1
- #draw_location(0, 0)
- case @indexes
- when 0
- index = 0
- when 1,3
- index = 1
- when 2
- index = 2
- end
- if @timeses % 15 == 0
- @indexes += 1
- for actor in $game_party.members
- xs = Position::BAPN[2][1][0]
- ys = Position::BAPN[2][3][1]
- draw_characters(@bitmap[actor.id - 1], index, xs + actor.id * 50, ys,$game_actors[actor.id].direction)
- end
- @indexes = @indexes % 4
- @timeses = 0
- else
- for actor in $game_party.members
- xs = Position::BAPN[2][1][0]
- ys = Position::BAPN[2][3][1]
- draw_characters(@bitmap[actor.id - 1], index, xs + actor.id * 50, ys, $game_actors[actor.id].direction)
- end
- end
- update
- end
- #--------------------------------------------------------------------------
- # ● 描绘行走图
- #--------------------------------------------------------------------------
- def draw_characters(character_name,character_index, x, y,dir = true)
- return if character_name == nil
- # bitmap = Cache.character(character_name)
- n = character_index
- if dir
- src_rect = Rect.new((n%3) *32, 32, 32, 32)
- self.contents.blt(x, y, character_name, src_rect)
- else
- src_rect = Rect.new((n%3) *32, 64, 32, 32)
- self.contents.blt(x, y, character_name, src_rect)
- end
- # bitmap.dispose
- end
- #--------------------------------------------------------------------------
- # ● 获取项目要描画的矩形
- # index : 项目编号
- #--------------------------------------------------------------------------
- def item_rect(index)
- rect = Rect.new(0, 0, 0, 0)
- rect.width = 32
- rect.height = 32
- rect.x = index % @column_max * rect.width
- rect.y = index / @column_max * 32
- return rect
- end
- #--------------------------------------------------------------------------
- # ● 描绘场景
- #--------------------------------------------------------------------------
- def draw_location(x, y)
- bitmap = Bitmap.new("Graphics/Pictures/Lineup.png")
- rect = Rect.new(0, 0, 0, 0)
- rect.x = x
- rect.y = y
- rect.width = 128
- rect.height = 128
- self.contents.blt(x, y, bitmap, rect)
- bitmap.dispose
- end
- end
复制代码
问题是,在调用这个窗口的 时候,光标移动不能,麻烦大家帮我看看,是哪里错了?{/hx} 版务信息:本贴由楼主自主结贴~ |
|