Project1

标题: 图片相互遮挡用什么办法解决? [打印本页]

作者: 武装宝宝    时间: 2007-8-2 02:28
提示: 作者被禁止或删除 内容自动屏蔽
作者: 武装宝宝    时间: 2007-8-2 02:28
提示: 作者被禁止或删除 内容自动屏蔽
作者: 瞌睡虫    时间: 2007-8-2 02:32
在SE与闪烁效果中.
选对象消失
再选择消失时间
作者: 武装宝宝    时间: 2007-8-2 02:39
提示: 作者被禁止或删除 内容自动屏蔽
作者: 瞌睡虫    时间: 2007-8-2 02:41
设置时间
作者: 武装宝宝    时间: 2007-8-2 02:48
提示: 作者被禁止或删除 内容自动屏蔽
作者: 精灵使者    时间: 2007-8-2 02:56
这个……你可以看看这个,相信对你有帮助。

  1. module RPG
  2.   class Sprite < ::Sprite
  3.     def update_loop_animation
  4.       frame_index = @_loop_animation_index
  5.       cell_data = @_loop_animation.frames[frame_index].cell_data
  6.       position = @_loop_animation.position
  7.       animation_set_sprites(@_loop_animation_sprites, cell_data, position)
  8.   ###########################################################################
  9.       case @_loop_animation.id
  10.       # 这里设定状态的循环动画ID,只需要填写会被角色盖住的,其他不需要。
  11.       when 199
  12.         for i in 0..15
  13.           @_loop_animation_sprites[i].z = 0
  14.         end
  15.       end
  16.   ###########################################################################
  17.       for timing in @_loop_animation.timings
  18.         if timing.frame == frame_index
  19.           animation_process_timing(timing, true)
  20.         end
  21.       end
  22.     end
  23.     def animation_set_sprites(sprites, cell_data, position)
  24.       for i in 0..15
  25.         sprite = sprites[i]
  26.         pattern = cell_data[i, 0]
  27.         if sprite == nil or pattern == nil or pattern == -1
  28.           sprite.visible = false if sprite != nil
  29.         next
  30.       end
  31.       sprite.visible = true
  32.       sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192)
  33.       if position == 3
  34.         if self.viewport != nil
  35.           sprite.x = self.viewport.rect.width / 2
  36.           sprite.y = self.viewport.rect.height - 160
  37.         else
  38.           sprite.x = 320
  39.           sprite.y = 240
  40.         end
  41.       else
  42.         sprite.x = self.x - self.ox + self.src_rect.width / 2
  43.         sprite.y = self.y - self.oy + self.src_rect.height / 2
  44.         sprite.y -= self.src_rect.height / 4 if position == 0
  45.         sprite.y += self.src_rect.height / 4 if position == 2
  46.       end
  47.       sprite.x += cell_data[i, 1]
  48.       sprite.y += cell_data[i, 2]
  49.   ###########################################################################
  50.       case @_animation.id
  51.       # 这边的动画指得是战斗时后的出招,挨打动画,并非状态的循环动画。
  52.       when 198..199,203..204 # 需要被角色盖住的动画编号,自己设定
  53.         sprite.z = 0
  54.       when 1..197, 200..202,205..210 # 其他的动画编号
  55.         sprite.z = 2000
  56.       end
  57.   ###########################################################################
  58.       sprite.ox = 96
  59.       sprite.oy = 96
  60.       sprite.zoom_x = cell_data[i, 3] / 100.0
  61.       sprite.zoom_y = cell_data[i, 3] / 100.0
  62.       sprite.angle = cell_data[i, 4]
  63.       sprite.mirror = (cell_data[i, 5] == 1)
  64.       sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
  65.       sprite.blend_type = cell_data[i, 7]
  66.       end
  67.     end
  68.   end
  69. end
复制代码

作者: 武装宝宝    时间: 2007-8-2 02:59
提示: 作者被禁止或删除 内容自动屏蔽
作者: 精灵使者    时间: 2007-8-2 03:00
当然是MAIN前面罗?需要的技能和待机动画在###里面修改其ID
[LINE]1,#dddddd[/LINE]
居然有人叫我大姐……泪{/ll}
作者: 武装宝宝    时间: 2007-8-2 03:03
提示: 作者被禁止或删除 内容自动屏蔽
作者: 精灵使者    时间: 2007-8-2 03:06
没错,就是动画编号。按照相应的部分填进去。里面的说明已经很详细了。
[LINE]1,#dddddd[/LINE]
大妈{/gg}我是男的好不好{/fd}
作者: 武装宝宝    时间: 2007-8-2 03:07
提示: 作者被禁止或删除 内容自动屏蔽
作者: 精灵使者    时间: 2007-8-2 03:08
年龄才25岁啊……我有那么老么{/gg}
作者: 武装宝宝    时间: 2007-8-2 03:09
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1