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

Project1

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

怎么同时执行 攻击方动画 和 被攻击动画 …

 关闭 [复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-6-4
帖子
31
跳转到指定楼层
1
发表于 2008-7-13 06:14:58 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽

Lv1.梦旅人

今、空を見上げ

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-8-11
帖子
2022
2
发表于 2008-7-13 06:42:59 | 只看该作者
主战上有一个脚本 配合全动画战斗能弄出LZ要的效果
很多全动画战斗的脚本都使用了那个
这个插在全动画脚本前
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================


  4. module RPG
  5. class Sprite < ::Sprite
  6.    def animation_set_sprites(sprites, cell_data, position, invisible = false)
  7.      if invisible
  8.        for i in 0..15
  9.          sprites[i].visible = false
  10.        end
  11.        return
  12.      end
  13.      for i in 0..15
  14.        sprite = sprites[i]
  15.        pattern = cell_data[i, 0]
  16.        if sprite == nil or pattern == nil or pattern == -1
  17.          sprite.visible = false if sprite != nil
  18.          next
  19.        end
  20.        sprite.visible = true
  21.        sprite.src_rect.set(pattern % 5 * 192, pattern / 5 * 192, 192, 192)
  22.        if position == 3
  23.          if self.viewport != nil
  24.            sprite.x = self.viewport.rect.width / 2
  25.            sprite.y = self.viewport.rect.height - 160
  26.          else
  27.            sprite.x = 320
  28.            sprite.y = 240
  29.          end
  30.        else
  31.          sprite.x = self.x - self.ox + self.src_rect.width / 2
  32.          sprite.y = self.y - self.oy + self.src_rect.height / 2
  33.          sprite.y -= self.src_rect.height / 4 if position == 0
  34.          sprite.y += self.src_rect.height / 4 if position == 2
  35.        end
  36.        sprite.x += cell_data[i, 1]
  37.        sprite.y += cell_data[i, 2]
  38.        sprite.z = 2000
  39.        sprite.ox = 96
  40.        sprite.oy = 96
  41.        sprite.zoom_x = cell_data[i, 3] / 100.0
  42.        sprite.zoom_y = cell_data[i, 3] / 100.0
  43.        sprite.angle = cell_data[i, 4]
  44.        sprite.mirror = (cell_data[i, 5] == 1)
  45.        sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
  46.        sprite.blend_type = cell_data[i, 7]
  47.      end
  48.    end
  49.    def update_loop_animation
  50.      if @_animation_duration > 0
  51.        frame_index = @_loop_animation_index
  52.        cell_data = @_loop_animation.frames[frame_index].cell_data
  53.        position = @_loop_animation.position
  54.        animation_set_sprites(@_loop_animation_sprites, cell_data, position,true)
  55.      else
  56.        frame_index = @_loop_animation_index
  57.        cell_data = @_loop_animation.frames[frame_index].cell_data
  58.        position = @_loop_animation.position
  59.        animation_set_sprites(@_loop_animation_sprites, cell_data, position)
  60.        for timing in @_loop_animation.timings
  61.          if timing.frame == frame_index
  62.            animation_process_timing(timing, true)
  63.          end
  64.        end
  65.      end
  66.    end
  67. end
  68. end


  69. #==============================================================================
  70. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  71. #==============================================================================
复制代码



全动画脚本的地址 : http://rpg.blue/web/htm/news729.htm

目前我只发现站上有这种
不用全动画战斗实现 我也不知道 或者等高人回答- -
做任何事,都不要为自己找借口。任何事都不存在困难的借口。你只有3个字“做得到”
回复 支持 反对

使用道具 举报

Lv1.梦旅人

蚂蚁卡卡

梦石
0
星屑
116
在线时间
66 小时
注册时间
2007-12-16
帖子
3081
3
发表于 2008-7-13 07:07:13 | 只看该作者
LS 请教那个脚本 是干什么用的{/jy}
全动画脚本是 攻击方动画 是空白的 也就是等待的帧
只有对象方 动画 是有主角(人物)去攻击 然后返回
http://rpg.blue/web/htm/news729.htm 去下他的范例工程 看看 就明白了
《隋唐乱》完整解密版点击进入
米兰,让我怎么说离开……

曾经我也是一个有志青年,直到我膝盖中了一箭……

《隋唐乱》博客地址
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-8-8 19:13

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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