查看: 1733|回复: 0

[已经过期] 战斗中显示HP等怎么调队伍间距

[复制链接]
梦石
0
星屑
50
在线时间
168 小时
注册时间
2007-7-26
回帖
427
发表于 2016-6-25 13:34:18 | 显示全部楼层 |阅读模式

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

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

×
QQ图片20160625133118.png

这个队伍之间的距离怎么调
  1.   #--------------------------------------------------------------------------
  2.   # ● 刷新
  3.   #--------------------------------------------------------------------------
  4.   def refresh
  5.       self.contents.clear
  6.     self.contents.font.size = 24     ####这个是字体大小,默认是24
  7.     @item_max = $game_party.actors.size
  8.     for i in 0...$game_party.actors.size
  9.       actor = $game_party.actors[i]
  10.       actor_x = i * 160 + 4
  11. ###      draw_actor_name(actor, actor_x, 0)

  12.       hpwidth = @bmp_bak.width * actor.hp / actor.maxhp
  13.       rect = Rect.new(0,0,@bmp_bak.width,@bmp_bak.height)
  14.     #---------------------------------------------------
  15.       self.contents.blt(actor_x + 80,200,@bmp_bak,rect)
  16.       rect = Rect.new(0,0,hpwidth,@bmp_bak.height)
  17.       self.contents.blt(actor_x + 80,200,@bmp_hp,rect)
  18.       spwidth = @bmp_bak.width * actor.sp / actor.maxsp
  19.       rect = Rect.new(0,0,@bmp_bak.width,@bmp_bak.height)
  20.       self.contents.blt(actor_x + 80,200+@bmp_bak.height-15,@bmp_bak,rect)
  21.       rect = Rect.new(0,0,spwidth,@bmp_bak.height)
  22.       self.contents.blt(actor_x + 80,200+@bmp_bak.height-15,@bmp_sp,rect)
复制代码



头像也是,怎么调整间距。
  1.     # ===============================================================
  2.     # 加头像
  3.     # ===============================================================
  4.    
  5.     @actor_face = []
  6.     for i in 0...$game_party.actors.size
  7.       actor = $game_party.actors[i]
  8.       @actor_face[i] = Sprite.new
  9.       @actor_face[i].bitmap = Bitmap.new\
  10.       ("Graphics/face/"+actor.name.to_s+".png")
  11.       @actor_face[i].x = i * 210 + 4 + 20# 头像X坐标
  12.       @actor_face[i].y = 372 + 140         # 头像Y坐标
  13.       @actor_face[i].z = 999          # 头像Z 101在文字下 没特殊需要就别动了
  14.     end
复制代码

点评

发现好多新手问题没人回复,那些脚本达人的问题,回复者颇多!  发表于 2016-6-26 21:17
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

在本版发帖返回顶部