Project1
标题:
关于画血槽的问题
[打印本页]
作者:
天猴
时间:
2009-3-6 04:11
提示:
作者被禁止或删除 内容自动屏蔽
作者:
jhlv0650
时间:
2009-3-6 04:11
天干宝典庚卷里面有教学的
作者:
天猴
时间:
2009-3-6 04:13
提示:
作者被禁止或删除 内容自动屏蔽
作者:
redant
时间:
2009-3-6 05:05
#图片血槽显示Ver 1.0(清爽版)
# by逐月
#描画HP槽
def HP (actor,x,y)
@bitmap3 = Bitmap.new("Graphics/Pictures/底")
@src_rect3 = Rect.new(0,0,@bitmap3.width, @bitmap3.height)
self.contents.blt(x,y, @bitmap3, @src_rect3)
#HP显示
@bitmap3 = Bitmap.new("Graphics/Pictures/hp")
w3 = @bitmap3.width * actor.hp/actor.maxhp
@src_rect3 = Rect.new(0,0,w3, @bitmap3.height)
self.contents.blt(x+4,y+2, @bitmap3, @src_rect3)
end
#描画SP槽
def SP (actor,x,y)
@bitmap1 = Bitmap.new("Graphics/Pictures/底")
@src_rect1 = Rect.new(0,0,@bitmap1.width, @bitmap1.height)
self.contents.blt(x,y, @bitmap1, @src_rect1)
#SP显示
@bitmap1 = Bitmap.new("Graphics/Pictures/sp")
w1 = @bitmap1.width * actor.sp/actor.maxsp
@src_rect1 = Rect.new(0,0,w1, @bitmap1.height)
self.contents.blt(x+4,y+2, @bitmap1, @src_rect1)
end
#==============================================================================
# ■ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ● 初始化
#--------------------------------------------------------------------------
alias xrxs_bp3_refresh refresh
def refresh
xrxs_bp3_refresh
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
bitmap = Bitmap.new("Graphics/system/menu/back/" + actor.name + "_name.png")
src_rect = Rect.new(0, 0, 120, 66)
case i
when 0
x = 145
y = 259
#draw_actor_name(actor, 400 - 40,420-5)
self.contents.blt(345, 405 , bitmap, src_rect)
when 1
x = 145
y = 339
# draw_actor_name(actor, 470 - 40,350-15 )
self.contents.blt(420, 330 , bitmap, src_rect)
when 2
x = 145
y = 419
# draw_actor_name(actor, 540 - 30,280-20)
self.contents.blt(500, 255 , bitmap, src_rect)
when 3
x = 145
y = 499
#draw_actor_name(actor, 610 - 40 ,210 )
self.contents.blt(560, 190 , bitmap, src_rect)
end
###########################一切自改##############################
HP(actor, x-10, y)
SP(actor, x-10, y + 18)
# draw_actor_name(actor, x ,y )
#######################################一切自改###############
end
end
end
复制代码
作者:
后知后觉
时间:
2009-3-6 05:58
帮你上传了一个
http://www.uushare.com/user/yk67602298/file/1351609
[LINE]1,#dddddd[/LINE]
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者:
jhlv0650
时间:
2009-3-6 19:51
按F1看帮助里面的RGSS参考》游戏库》内部类,
再看看Bitmap、rect、Sprite里面定义的方法。
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1