查看: 4550|回复: 16

[讨论] 描绘了32次的血条 =.= 折腾死我了

  [复制链接]

℃ake

梦石
0
星屑
50
在线时间
8 小时
注册时间
2009-6-6
回帖
670
发表于 2009-9-26 14:07:42 | 显示全部楼层 |阅读模式

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

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

×
  1. def draw_actor_hp_bar(actor, x, y)
  2.     bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
  3.     new_x = x - bitmap.width / 4
  4.     new_y = y - bitmap.height
  5.     new_y -= 10
  6.   #  描绘黑底
  7.    self.contents.fill_rect(new_x,new_y,39,1,Color.new(0,0,0,255))
  8.    self.contents.fill_rect(new_x-1,new_y+1,41,1,Color.new(0,0,0,255))
  9.    self.contents.fill_rect(new_x-2,new_y+2,43,6,Color.new(0,0,0,255))
  10.    self.contents.fill_rect(new_x-1,new_y+8,41,1,Color.new(0,0,0,255))
  11.    self.contents.fill_rect(new_x,new_y+9,39,1,Color.new(0,0,0,255))
  12.    # 描绘白边
  13.    self.contents.fill_rect(new_x,new_y+1,39,1,Color.new(228,223,192,255))
  14.    self.contents.fill_rect(new_x-1,new_y+2,41,6,Color.new(228,229,210,255))
  15.    self.contents.fill_rect(new_x,new_y+8,39,1,Color.new(237,229,228,255))
  16.    # 描绘绿底
  17.    self.contents.fill_rect(new_x+1,new_y+2,37,6,Color.new(45,74,64,255))
  18.    self.contents.fill_rect(new_x,new_y+3,39,4,Color.new(45,74,64,255))
  19.    w = 39.0000 * actor.hp / actor.maxhp
  20.    # 描绘血条
  21.    self.contents.fill_rect(new_x,new_y+3,w,1,Color.new(246,32,46,255))
  22.    self.contents.fill_rect(new_x,new_y+4,w,1,Color.new(246,117,137,255))
  23.    self.contents.fill_rect(new_x,new_y+5,w,1,Color.new(201,15,27,255))
  24.    self.contents.fill_rect(new_x,new_y+6,w,1,Color.new(191,0,9,255))
  25.   end
  26.   def draw_actor_sp_bar(actor, x, y)
  27.     bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
  28.     new_x = x - bitmap.width / 4
  29.     new_y = y - bitmap.height

  30.   #  描绘黑底
  31.    self.contents.fill_rect(new_x,new_y,39,1,Color.new(0,0,0,255))
  32.    self.contents.fill_rect(new_x-1,new_y+1,41,1,Color.new(0,0,0,255))
  33.    self.contents.fill_rect(new_x-2,new_y+2,43,6,Color.new(0,0,0,255))
  34.    self.contents.fill_rect(new_x-1,new_y+8,41,1,Color.new(0,0,0,255))
  35.    self.contents.fill_rect(new_x,new_y+9,39,1,Color.new(0,0,0,255))
  36.    # 描绘白边
  37.    self.contents.fill_rect(new_x,new_y+1,39,1,Color.new(228,223,192,255))
  38.    self.contents.fill_rect(new_x-1,new_y+2,41,6,Color.new(228,229,210,255))
  39.    self.contents.fill_rect(new_x,new_y+8,39,1,Color.new(237,229,228,255))
  40.    # 描绘绿底
  41.    self.contents.fill_rect(new_x+1,new_y+2,37,6,Color.new(45,74,64,255))
  42.    self.contents.fill_rect(new_x,new_y+3,39,4,Color.new(45,74,64,255))
  43.    # 描绘下箭头
  44.    self.contents.fill_rect(new_x+17,new_y+9,4,1,Color.new(246,240,237,255))
  45.    self.contents.fill_rect(new_x+17,new_y+10,4,1,Color.new(0,0,0,255))
  46.    self.contents.fill_rect(new_x+18,new_y+10,2,1,Color.new(246,240,237,255))
  47.    self.contents.fill_rect(new_x+18,new_y+11,2,1,Color.new(0,0,0,255))
  48.     w = 39.0000 * actor.sp / actor.maxsp
  49.   # 描绘蓝条
  50.    self.contents.fill_rect(new_x,new_y+3,w,1,Color.new(46,32,246,255))
  51.    self.contents.fill_rect(new_x,new_y+4,w,1,Color.new(137,117,246,255))
  52.    self.contents.fill_rect(new_x,new_y+5,w,1,Color.new(27,15,201,255))
  53.    self.contents.fill_rect(new_x,new_y+6,w,1,Color.new(9,0,191,255))
  54.   end
复制代码
描绘了32次的血条 =.=

折腾死我了 =.=

高仿梦想世界!

附图。哇哈哈哈。激动中。
未命名.PNG

毕竟描绘了那么多次,貌似还蛮好看。

=.=  不过,真累!
我爱66RPG,但我讨厌66.

穿越一季:朔

梦石
0
星屑
50
在线时间
333 小时
注册时间
2007-4-11
回帖
5052

贵宾

发表于 2009-9-26 14:09:55 | 显示全部楼层

你直接说自己颜色代码分不清得了
6R复活?别扯淡了.

柳柳一旦接手66RPG,我果断呵呵啊。
回复

使用道具 举报

~琉璃の雪~<

梦石
0
星屑
49
在线时间
36 小时
注册时间
2008-11-6
回帖
3570
发表于 2009-9-26 14:10:56 | 显示全部楼层
本帖最后由 夏季冰川 于 2009-9-26 14:13 编辑

要把血条描绘的很漂亮是比较麻烦的,不像我,22行脚本搞定.
~现在开始自绘头像~
回复

使用道具 举报

魔王 ⑨

梦石
0
星屑
90
在线时间
379 小时
注册时间
2006-10-16
回帖
3980

贵宾

发表于 2009-9-26 14:29:38 | 显示全部楼层
除了想说你很无聊很寂寞……我不知道说什么好
回复

使用道具 举报

~琉璃の雪~<

梦石
0
星屑
49
在线时间
36 小时
注册时间
2008-11-6
回帖
3570
发表于 2009-9-26 14:32:29 | 显示全部楼层
血槽我做过很多了,其实不是无聊啊,是没那实力作其他脚本了,囧。
~现在开始自绘头像~
回复

使用道具 举报

名侦探小柯

梦石
10
星屑
4420
在线时间
3740 小时
注册时间
2006-9-6
回帖
36596

极短27获奖MZ评测员开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

发表于 2009-9-26 14:51:38 | 显示全部楼层
你这样效率不高吧……  - -
不定期回归 ~ 游戏开发之旅
———————————————————————————————
回复

使用道具 举报

女神控

梦石
0
星屑
49
在线时间
141 小时
注册时间
2008-9-24
回帖
1384
发表于 2009-9-26 15:08:21 | 显示全部楼层
我对你的游戏有爱
回复

使用道具 举报

菜鸟飞呀飞 该用户已被删除
发表于 2009-9-26 15:57:20 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

梦·贤者

梦石
0
星屑
50
在线时间
1141 小时
注册时间
2007-12-15
回帖
4075
发表于 2009-9-26 16:00:46 | 显示全部楼层
不如直接用显示位图的方式。。。
回复

使用道具 举报

菜鸟飞呀飞 该用户已被删除
发表于 2009-9-26 16:06:34 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部