赞 | 671 |
VIP | 62 |
好人卡 | 144 |
积分 | 335 |
经验 | 110435 |
最后登录 | 2024-11-1 |
在线时间 | 5108 小时 |
Lv5.捕梦者
- 梦石
- 0
- 星屑
- 33482
- 在线时间
- 5108 小时
- 注册时间
- 2012-11-19
- 帖子
- 4878
|
一个简单的只是显示队伍角色行走图动态的窗口- class Window_Actor_Act < Sprite
- #--------------------------------------------------------------------------
- def initialize
- super()
- self.bitmap = Bitmap.new(640, 480)
- @count = 0
- end
- #--------------------------------------------------------------------------
- def dispose
- self.bitmap.dispose
- super
- end
- #--------------------------------------------------------------------------
- def refresh
- self.bitmap.clear
- x = 320 - (100 * $game_party.actors.size / 2)
- y = 140
- for i in 0...$game_party.actors.size
- ax = i * 100 + x
- actor = $game_party.actors[i]
- bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
- cw = bitmap.width / 4 ; ch = bitmap.height / 4
- self.bitmap.blt(ax, y, bitmap, Rect.new(@count / 10 * cw, 0, cw, ch))
- end
- end
- #--------------------------------------------------------------------------
- def update
- super
- @count = (@count + 1) % 40
- if @data_count != (@count / 10)
- @data_count = (@count / 10)
- refresh
- end
- end
- end
复制代码 |
评分
-
查看全部评分
|