设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1066|回复: 2
打印 上一主题 下一主题

如何将动画的播放置于插入图片之上

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
82 小时
注册时间
2006-1-28
帖子
996
跳转到指定楼层
1
发表于 2007-7-15 19:30:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
在大地图由于插入图片,导致播放的动画无法看到

最后的目的是:我需要将103动画在插入图片之上播放

我使用了好人卡的脚本 但还是不行。。。

###########################################################################
  case @_animation.id
  when 103 #其他的动画编号
    sprite.z = 9999
  end
###########################################################################




下面是全部代码:

直接引用好人卡的段落

module RPG
class Sprite < ::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]
###########################################################################
case @_animation.id
  when 103 #其他的动画编号
    sprite.z = 9999
  end

###########################################################################
  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
end
end

Lv1.梦旅人

梦石
0
星屑
50
在线时间
82 小时
注册时间
2006-1-28
帖子
996
2
 楼主| 发表于 2007-7-15 19:30:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
在大地图由于插入图片,导致播放的动画无法看到

最后的目的是:我需要将103动画在插入图片之上播放

我使用了好人卡的脚本 但还是不行。。。

###########################################################################
  case @_animation.id
  when 103 #其他的动画编号
    sprite.z = 9999
  end
###########################################################################




下面是全部代码:

直接引用好人卡的段落

module RPG
class Sprite < ::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]
###########################################################################
case @_animation.id
  when 103 #其他的动画编号
    sprite.z = 9999
  end

###########################################################################
  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
end
end

Lv1.梦旅人

梦石
0
星屑
50
在线时间
82 小时
注册时间
2006-1-28
帖子
996
3
 楼主| 发表于 2007-7-17 00:55:12 | 只看该作者
顶一下先
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-9-22 08:07

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表