| 赞 | 0 |
| VIP | 136 |
| 好人卡 | 4 |
| 积分 | 1 |
| 经验 | 2058 |
| 最后登录 | 2013-1-17 |
| 在线时间 | 142 小时 |
Lv1.梦旅人 辉瑞中国首席研究员<
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 142 小时
- 注册时间
- 2008-1-18
- 帖子
- 2129
|
class Window_Base < Window
#先设置2个变量
@index = 0
@phase = 0
def draw_walk_actor_graphic(actor, x, y)
#该成VX
bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
w = bitmap.width / 4
h = bitmap.height / 4
根据@phase确定行走土
如果是大行走土,请自己修改坐标
case @phase
when 0
x = 0
when 1
x = w
when 2
x = w * 2
when 3
x = w * 3
end
src_rect = Rect.new(x, 0, w, h)
end
self.contents.blt(x bitmap, src_rect)
end
alias old_update update
def update
old_update
@index += 1
用SPEED来控制速度
if @turn_index == SPEED then
refresh
@index = 0
@phase = (@phase+1)%4
end
end
系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~ |
|