Project1

标题: 关于动画中的全频动画坐标(画面)! [打印本页]

作者: qcc001    时间: 2008-2-16 00:18
标题: 关于动画中的全频动画坐标(画面)!
关于动画中的全频动画坐标(画面)!
在哪改? [LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~
作者: 水迭澜    时间: 2008-2-16 00:36

MS是module RPG
  class Sprite < ::Sprite
这一段
RPG::Sprite属于底层脚本……不建议新手修改


   def animation_set_sprites(sprites, cell_data, position)
      for i in 0..15
        sprite = sprites
        pattern = cell_data[i, 0]
        if sprite == nil or pattern == nil or pattern == -1
          sprite.visible = false if sprite != nil
          next
        end
        sprite.visible = true
        sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192)
        
          if position == 3
          if self.viewport != nil
            sprite.x = self.viewport.rect.width / 2
            sprite.y = self.viewport.rect.height - 160
          else
            sprite.x = 320
            sprite.y = 240
          end

        else
          sprite.x = self.x - self.ox + self.src_rect.width / 2
          sprite.y = self.y - self.oy + self.src_rect.height / 2
          sprite.y -= self.src_rect.height / 4 if position == 0
          sprite.y += self.src_rect.height / 4 if position == 2
        end
        sprite.x += cell_data[i, 1]
        sprite.y += cell_data[i, 2]
        sprite.z = 2000
        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.angle = cell_data[i, 4]
        sprite.mirror = (cell_data[i, 5] == 1)
        sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
        sprite.blend_type = cell_data[i, 7]
      end
    end [LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者: qcc001    时间: 2008-2-16 00:46
非常感谢
水迭澜
又帮了我的大忙

我只是改下 X Y坐标
应该不会有事的吧




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