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

Project1

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

新的死法.......- -`|||(更新了一个分成2半的东西``)

 关闭 [复制链接]

Lv1.梦旅人

彩色的银子

梦石
0
星屑
50
在线时间
190 小时
注册时间
2006-6-13
帖子
1361

贵宾

跳转到指定楼层
1
发表于 2006-11-11 08:33:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
就是类似仙剑那样..死了之后不是红光一闪..而是直接..升天- -`|||||
其实只是重新定义collapse而已..............
  1. module RPG
  2.   class Sprite < ::Sprite   
  3.     def initialize(viewport = nil)
  4.       super(viewport)
  5.       @_whiten_duration = 0
  6.       @_appear_duration = 0
  7.       @_escape_duration = 0
  8.       @_collapse_duration = 0
  9.       @_damage_duration = 0
  10.       @_animation_duration = 0
  11.       @_blink = false
  12.       @coll_time = 0
  13.     end
  14.     def collapse
  15.       @coll.dispose if @coll != nil
  16.       @coll = Sprite.new
  17.       @coll.bitmap = Bitmap.new("Graphics/Battlers/#{@battler_name}")
  18.       @coll.ox = self.ox
  19.       @coll.oy = self.oy
  20.       @coll.opacity = 100
  21.       @coll.z = 0
  22.       @coll.blend_type = 1
  23.       @coll.x = self.x
  24.       @coll.y = self.y
  25.       @coll_time = 42
  26.       @_whiten_duration = 0
  27.       @_appear_duration = 0
  28.       @_escape_duration = 0
  29.     end
  30.   def update
  31.       super
  32.       if @_whiten_duration > 0
  33.         @_whiten_duration -= 1
  34.         self.color.alpha = 128 - (16 - @_whiten_duration) * 10
  35.       end
  36.       if @_appear_duration > 0
  37.         @_appear_duration -= 1
  38.         self.opacity = (16 - @_appear_duration) * 16
  39.       end
  40.       if @_escape_duration > 0
  41.         @_escape_duration -= 1
  42.         self.opacity = 256 - (32 - @_escape_duration) * 10
  43.       end
  44.       if @coll_time > 0
  45.         @coll_time -= 1
  46.         @coll.y = self.y - (48 - @coll_time) * 6
  47.         self.opacity = 256 - (48 - @coll_time) * 6
  48.         if @coll_time == 0
  49.           @coll.dispose
  50.         end
  51.       end
  52.       if @_damage_duration > 0
  53.         @_damage_duration -= 1
  54.         case @_damage_duration
  55.         when 38..39
  56.           @_damage_sprite.y -= 2
  57.         when 36..37
  58.           @_damage_sprite.y -= 4
  59.         when 34..35
  60.           @_damage_sprite.y -= 2
  61.         when 28..33
  62.           @_damage_sprite.y -= 4
  63.         end
  64.         @_damage_sprite.opacity = 256 - (12 - @_damage_duration) * 32
  65.         if @_damage_duration == 0
  66.           dispose_damage
  67.         end
  68.       end
  69.       if @_animation != nil and (Graphics.frame_count % 2 == 0)
  70.         @_animation_duration -= 1
  71.         update_animation
  72.       end
  73.       if @_loop_animation != nil and (Graphics.frame_count % 2 == 0)
  74.         update_loop_animation
  75.         @_loop_animation_index += 1
  76.         @_loop_animation_index %= @_loop_animation.frame_max
  77.       end
  78.       if @_blink
  79.         @_blink_count = (@_blink_count + 1) % 32
  80.         if @_blink_count < 16
  81.           alpha = (16 - @_blink_count) * 6
  82.         else
  83.           alpha = (@_blink_count - 16) * 6
  84.         end
  85.         self.color.set(255, 255, 255, alpha)
  86.       end
  87.       @@_animations.clear
  88.     end
  89.   end
  90. end
复制代码



分成2半
  1. module RPG
  2.   class Sprite < ::Sprite   
  3.     def initialize(viewport = nil)
  4.       super(viewport)
  5.       @_whiten_duration = 0
  6.       @_appear_duration = 0
  7.       @_escape_duration = 0
  8.       @_collapse_duration = 0
  9.       @_damage_duration = 0
  10.       @_animation_duration = 0
  11.       @_blink = false
  12.       @coll_time = 0
  13.     end
  14.     def collapse
  15.       @coll.dispose if @coll != nil
  16.       @coll = Sprite.new
  17.       @coll.bitmap = Bitmap.new("Graphics/Battlers/#{@battler_name}")
  18.       @coll.ox = self.ox
  19.       @coll.oy = self.oy
  20.       @coll.opacity = 100
  21.       @coll.z = 0
  22.       w = @coll.bitmap.width
  23.       h = @coll.bitmap.height
  24.       @coll.x = self.x
  25.       @coll.y = self.y + h/2
  26.       @coll.src_rect = Rect.new(0,h/2,w,h)
  27.       @collq.dispose if @collq != nil
  28.       @collq = Sprite.new
  29.       @collq.bitmap = Bitmap.new("Graphics/Battlers/#{@battler_name}")
  30.       @collq.ox = self.ox
  31.       @collq.oy = self.oy
  32.       @collq.opacity = 255
  33.       @collq.z = 0
  34.       @collq.x = self.x
  35.       @collq.y = self.y
  36.       @collq.src_rect = Rect.new(0,0,w,h/2)
  37.       @coll_time = 42
  38.       @_whiten_duration = 0
  39.       @_appear_duration = 0
  40.       @_escape_duration = 0
  41.     end
  42.   def update
  43.       super
  44.       if @_whiten_duration > 0
  45.         @_whiten_duration -= 1
  46.         self.color.alpha = 128 - (16 - @_whiten_duration) * 10
  47.       end
  48.       if @_appear_duration > 0
  49.         @_appear_duration -= 1
  50.         self.opacity = (16 - @_appear_duration) * 16
  51.       end
  52.       if @_escape_duration > 0
  53.         @_escape_duration -= 1
  54.         self.opacity = 256 - (32 - @_escape_duration) * 10
  55.       end
  56.       if @coll_time > 0
  57.         self.opacity = 0
  58.         @coll_time -= 1
  59.         @coll.x = self.x + (42 - @coll_time) * 16
  60.         @collq.x = self.x - (42 - @coll_time) * 16
  61.         @coll.opacity = 256 - (42 - @coll_time) * 16
  62.         @collq.opacity = 256 - (42 - @coll_time) * 16
  63.         #@collq.opacity = 256 - (42 - @coll_time) * 16
  64.         if @coll_time == 0
  65.           @coll.dispose
  66.         end
  67.       end
  68.       if @_damage_duration > 0
  69.         @_damage_duration -= 1
  70.         case @_damage_duration
  71.         when 38..39
  72.           @_damage_sprite.y -= 2
  73.         when 36..37
  74.           @_damage_sprite.y -= 4
  75.         when 34..35
  76.           @_damage_sprite.y -= 2
  77.         when 28..33
  78.           @_damage_sprite.y -= 4
  79.         end
  80.         @_damage_sprite.opacity = 256 - (12 - @_damage_duration) * 32
  81.         if @_damage_duration == 0
  82.           dispose_damage
  83.         end
  84.       end
  85.       if @_animation != nil and (Graphics.frame_count % 2 == 0)
  86.         @_animation_duration -= 1
  87.         update_animation
  88.       end
  89.       if @_loop_animation != nil and (Graphics.frame_count % 2 == 0)
  90.         update_loop_animation
  91.         @_loop_animation_index += 1
  92.         @_loop_animation_index %= @_loop_animation.frame_max
  93.       end
  94.       if @_blink
  95.         @_blink_count = (@_blink_count + 1) % 32
  96.         if @_blink_count < 16
  97.           alpha = (16 - @_blink_count) * 6
  98.         else
  99.           alpha = (@_blink_count - 16) * 6
  100.         end
  101.         self.color.set(255, 255, 255, alpha)
  102.       end
  103.       @@_animations.clear
  104.     end
  105.   end
  106. end
复制代码




效果如图


嗯 ..大概就是这样```

              [本贴由 雷欧纳德 于 2006-11-20 19:18:29 进行了编辑]
-.-

Lv1.梦旅人

彩色的银子

梦石
0
星屑
50
在线时间
190 小时
注册时间
2006-6-13
帖子
1361

贵宾

2
 楼主| 发表于 2006-11-11 08:33:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
就是类似仙剑那样..死了之后不是红光一闪..而是直接..升天- -`|||||
其实只是重新定义collapse而已..............
  1. module RPG
  2.   class Sprite < ::Sprite   
  3.     def initialize(viewport = nil)
  4.       super(viewport)
  5.       @_whiten_duration = 0
  6.       @_appear_duration = 0
  7.       @_escape_duration = 0
  8.       @_collapse_duration = 0
  9.       @_damage_duration = 0
  10.       @_animation_duration = 0
  11.       @_blink = false
  12.       @coll_time = 0
  13.     end
  14.     def collapse
  15.       @coll.dispose if @coll != nil
  16.       @coll = Sprite.new
  17.       @coll.bitmap = Bitmap.new("Graphics/Battlers/#{@battler_name}")
  18.       @coll.ox = self.ox
  19.       @coll.oy = self.oy
  20.       @coll.opacity = 100
  21.       @coll.z = 0
  22.       @coll.blend_type = 1
  23.       @coll.x = self.x
  24.       @coll.y = self.y
  25.       @coll_time = 42
  26.       @_whiten_duration = 0
  27.       @_appear_duration = 0
  28.       @_escape_duration = 0
  29.     end
  30.   def update
  31.       super
  32.       if @_whiten_duration > 0
  33.         @_whiten_duration -= 1
  34.         self.color.alpha = 128 - (16 - @_whiten_duration) * 10
  35.       end
  36.       if @_appear_duration > 0
  37.         @_appear_duration -= 1
  38.         self.opacity = (16 - @_appear_duration) * 16
  39.       end
  40.       if @_escape_duration > 0
  41.         @_escape_duration -= 1
  42.         self.opacity = 256 - (32 - @_escape_duration) * 10
  43.       end
  44.       if @coll_time > 0
  45.         @coll_time -= 1
  46.         @coll.y = self.y - (48 - @coll_time) * 6
  47.         self.opacity = 256 - (48 - @coll_time) * 6
  48.         if @coll_time == 0
  49.           @coll.dispose
  50.         end
  51.       end
  52.       if @_damage_duration > 0
  53.         @_damage_duration -= 1
  54.         case @_damage_duration
  55.         when 38..39
  56.           @_damage_sprite.y -= 2
  57.         when 36..37
  58.           @_damage_sprite.y -= 4
  59.         when 34..35
  60.           @_damage_sprite.y -= 2
  61.         when 28..33
  62.           @_damage_sprite.y -= 4
  63.         end
  64.         @_damage_sprite.opacity = 256 - (12 - @_damage_duration) * 32
  65.         if @_damage_duration == 0
  66.           dispose_damage
  67.         end
  68.       end
  69.       if @_animation != nil and (Graphics.frame_count % 2 == 0)
  70.         @_animation_duration -= 1
  71.         update_animation
  72.       end
  73.       if @_loop_animation != nil and (Graphics.frame_count % 2 == 0)
  74.         update_loop_animation
  75.         @_loop_animation_index += 1
  76.         @_loop_animation_index %= @_loop_animation.frame_max
  77.       end
  78.       if @_blink
  79.         @_blink_count = (@_blink_count + 1) % 32
  80.         if @_blink_count < 16
  81.           alpha = (16 - @_blink_count) * 6
  82.         else
  83.           alpha = (@_blink_count - 16) * 6
  84.         end
  85.         self.color.set(255, 255, 255, alpha)
  86.       end
  87.       @@_animations.clear
  88.     end
  89.   end
  90. end
复制代码



分成2半
  1. module RPG
  2.   class Sprite < ::Sprite   
  3.     def initialize(viewport = nil)
  4.       super(viewport)
  5.       @_whiten_duration = 0
  6.       @_appear_duration = 0
  7.       @_escape_duration = 0
  8.       @_collapse_duration = 0
  9.       @_damage_duration = 0
  10.       @_animation_duration = 0
  11.       @_blink = false
  12.       @coll_time = 0
  13.     end
  14.     def collapse
  15.       @coll.dispose if @coll != nil
  16.       @coll = Sprite.new
  17.       @coll.bitmap = Bitmap.new("Graphics/Battlers/#{@battler_name}")
  18.       @coll.ox = self.ox
  19.       @coll.oy = self.oy
  20.       @coll.opacity = 100
  21.       @coll.z = 0
  22.       w = @coll.bitmap.width
  23.       h = @coll.bitmap.height
  24.       @coll.x = self.x
  25.       @coll.y = self.y + h/2
  26.       @coll.src_rect = Rect.new(0,h/2,w,h)
  27.       @collq.dispose if @collq != nil
  28.       @collq = Sprite.new
  29.       @collq.bitmap = Bitmap.new("Graphics/Battlers/#{@battler_name}")
  30.       @collq.ox = self.ox
  31.       @collq.oy = self.oy
  32.       @collq.opacity = 255
  33.       @collq.z = 0
  34.       @collq.x = self.x
  35.       @collq.y = self.y
  36.       @collq.src_rect = Rect.new(0,0,w,h/2)
  37.       @coll_time = 42
  38.       @_whiten_duration = 0
  39.       @_appear_duration = 0
  40.       @_escape_duration = 0
  41.     end
  42.   def update
  43.       super
  44.       if @_whiten_duration > 0
  45.         @_whiten_duration -= 1
  46.         self.color.alpha = 128 - (16 - @_whiten_duration) * 10
  47.       end
  48.       if @_appear_duration > 0
  49.         @_appear_duration -= 1
  50.         self.opacity = (16 - @_appear_duration) * 16
  51.       end
  52.       if @_escape_duration > 0
  53.         @_escape_duration -= 1
  54.         self.opacity = 256 - (32 - @_escape_duration) * 10
  55.       end
  56.       if @coll_time > 0
  57.         self.opacity = 0
  58.         @coll_time -= 1
  59.         @coll.x = self.x + (42 - @coll_time) * 16
  60.         @collq.x = self.x - (42 - @coll_time) * 16
  61.         @coll.opacity = 256 - (42 - @coll_time) * 16
  62.         @collq.opacity = 256 - (42 - @coll_time) * 16
  63.         #@collq.opacity = 256 - (42 - @coll_time) * 16
  64.         if @coll_time == 0
  65.           @coll.dispose
  66.         end
  67.       end
  68.       if @_damage_duration > 0
  69.         @_damage_duration -= 1
  70.         case @_damage_duration
  71.         when 38..39
  72.           @_damage_sprite.y -= 2
  73.         when 36..37
  74.           @_damage_sprite.y -= 4
  75.         when 34..35
  76.           @_damage_sprite.y -= 2
  77.         when 28..33
  78.           @_damage_sprite.y -= 4
  79.         end
  80.         @_damage_sprite.opacity = 256 - (12 - @_damage_duration) * 32
  81.         if @_damage_duration == 0
  82.           dispose_damage
  83.         end
  84.       end
  85.       if @_animation != nil and (Graphics.frame_count % 2 == 0)
  86.         @_animation_duration -= 1
  87.         update_animation
  88.       end
  89.       if @_loop_animation != nil and (Graphics.frame_count % 2 == 0)
  90.         update_loop_animation
  91.         @_loop_animation_index += 1
  92.         @_loop_animation_index %= @_loop_animation.frame_max
  93.       end
  94.       if @_blink
  95.         @_blink_count = (@_blink_count + 1) % 32
  96.         if @_blink_count < 16
  97.           alpha = (16 - @_blink_count) * 6
  98.         else
  99.           alpha = (@_blink_count - 16) * 6
  100.         end
  101.         self.color.set(255, 255, 255, alpha)
  102.       end
  103.       @@_animations.clear
  104.     end
  105.   end
  106. end
复制代码




效果如图


嗯 ..大概就是这样```

              [本贴由 雷欧纳德 于 2006-11-20 19:18:29 进行了编辑]
-.-
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2006-10-31
帖子
36
3
发表于 2006-11-11 08:39:36 | 只看该作者
我来支持你一下

不知道超级横版可以用不
下来试试看
回复 支持 反对

使用道具 举报

Lv1.梦旅人

彩色的银子

梦石
0
星屑
50
在线时间
190 小时
注册时间
2006-6-13
帖子
1361

贵宾

4
 楼主| 发表于 2006-11-11 08:40:06 | 只看该作者
应该不会有任何冲突的说..............
-.-
回复 支持 反对

使用道具 举报

Lv1.梦旅人

风之塞尔达

梦石
0
星屑
50
在线时间
57 小时
注册时间
2005-10-22
帖子
2492

贵宾

5
发表于 2006-11-11 08:41:38 | 只看该作者
更改一下死亡对象精灵的横纵比会更有趣的~~
zoom_x=,zoom_y=...~
在程序里延续塞尔达的传说, 在画板上勾勒塞尔达的轮廓!!
回复 支持 反对

使用道具 举报

Lv1.梦旅人

彩色的银子

梦石
0
星屑
50
在线时间
190 小时
注册时间
2006-6-13
帖子
1361

贵宾

6
 楼主| 发表于 2006-11-11 08:42:32 | 只看该作者
扭曲的灵魂`- -`|||...
-.-
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2006-10-31
帖子
36
7
发表于 2006-11-11 08:56:32 | 只看该作者
冲突矢不会有的没错

超级横版战斗图很特别
战斗图中有N个人物动作拼凑.升天图也是N个动作的合壁图
刚才怪物一死啊,那真是群妖乱舞{/hx}
回复 支持 反对

使用道具 举报

Lv1.梦旅人

彩色的银子

梦石
0
星屑
50
在线时间
190 小时
注册时间
2006-6-13
帖子
1361

贵宾

8
 楼主| 发表于 2006-11-11 09:01:35 | 只看该作者
- -`|这样啊.....

在@coll.bitmap = Bitmap.new下面加一行
@coll.src_rect = Rect.new(0,0,宽,高)
这样就好了..根据战斗图的行和列来设置宽高吧`
-.-
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2006-10-31
帖子
36
9
发表于 2006-11-11 09:07:04 | 只看该作者
{/fd}

我以为没戏了...

谢谢.
回复 支持 反对

使用道具 举报

Lv1.梦旅人

66RPG站长

梦石
0
星屑
54
在线时间
615 小时
注册时间
2005-10-10
帖子
5734

RMVX自由创作大赛亚军第2届短篇游戏比赛亚军第5届短篇游戏比赛冠军

10
发表于 2006-11-11 11:34:38 | 只看该作者
再做两个吧:
一个是横腰斩断成俩bitmap
一个是变成很多小方块飞散
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-7 10:22

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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