赞 | 14 |
VIP | 0 |
好人卡 | 3 |
积分 | 73 |
经验 | 8295 |
最后登录 | 2024-8-24 |
在线时间 | 1690 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 7290
- 在线时间
- 1690 小时
- 注册时间
- 2017-4-28
- 帖子
- 85
|
本帖最后由 gforce 于 2018-4-29 13:38 编辑
随意修改了一下,希望没BUG
动画名子加上<U>即可
- class Sprite_Base < Sprite
- alias ori_start_animation start_animation
- def start_animation(animation, mirror = false)
- ori_start_animation(animation, mirror = false)
- if @animation
- @animation.name =~ /<U>/ ? @ani_z = -10 : @ani_z = 300
- end
- end
-
- def animation_set_sprites(frame)#只改了一行
- cell_data = frame.cell_data
- @ani_sprites.each_with_index do |sprite, i|
- next unless sprite
- pattern = cell_data[i, 0]
- if !pattern || pattern < 0
- sprite.visible = false
- next
- end
- sprite.bitmap = pattern < 100 ? @ani_bitmap1 : @ani_bitmap2
- sprite.visible = true
- sprite.src_rect.set(pattern % 5 * 192,
- pattern % 100 / 5 * 192, 192, 192)
- if @ani_mirror
- sprite.x = @ani_ox - cell_data[i, 1]
- sprite.y = @ani_oy + cell_data[i, 2]
- sprite.angle = (360 - cell_data[i, 4])
- sprite.mirror = (cell_data[i, 5] == 0)
- else
- sprite.x = @ani_ox + cell_data[i, 1]
- sprite.y = @ani_oy + cell_data[i, 2]
- sprite.angle = cell_data[i, 4]
- sprite.mirror = (cell_data[i, 5] == 1)
- end
- sprite.z = self.z + @ani_z + i ##sprite.z = self.z + 300 + i
- sprite.ox = 96
- sprite.oy = 96
- sprite.zoom_x = cell_data[i, 3] / 100.0
- sprite.zoom_y = cell_data[i, 3] / 100.0
- sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
- sprite.blend_type = cell_data[i, 7]
- end
- end
- end
复制代码 |
|