| 赞 | 22 |
| VIP | |
| 好人卡 | |
| 积分 | 48 |
| 经验 | |
| 最后登录 | 2026-9-27 |
| 在线时间 | 389 小时 |
- 梦石
- 0
- 星屑
- 4756
- 在线时间
- 389 小时
- 注册时间
- 2012-11-8
- 回帖
- 235
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
我想插入图片用以表示HP和MP,然后我这么写
[pre lang="ruby" line="1"]#--------------------------------------------------------------------------
# ● 释放
#--------------------------------------------------------------------------
def dispose
super
@vs.dispose
@hp1.dispose
@hp2.dispose
@sp2.dispose if @sp2 !=nil
@sp1.dispose if @sp1 !=nil
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 18
@item_max = 1
self.contents.font.bold = false
self.contents.font.color = Color.new(0,0, 0, 255)
@vs=Sprite.new
@vs.bitmap=Bitmap.new("Graphics/Pictures/VS.png")
@vs.x=295
@vs.y=120
@vs.z=200
self.contents.font.color =Color.new(0,0, 0, 255)
draw_HP1(@actor, 0, 24)
draw_SP1(@actor, 0, 48) if @actor.maxsp>0
draw_HP2(@enemy, 320, 24)
draw_SP2(@enemy, 320, 48) if @enemy.maxsp>0
end
def draw_HP1(actor,x, y, w1=100)
@hp1=Sprite.new
@hp1.bitmap=Bitmap.new("Graphics/Pictures/HP.png")
@hp1.x=96
@hp1.y=204
@hp1.z=200
end[/pre]
但是当战斗结束时,HP,VS等图片要过一会才会消除,是我写的不对吗? |
|