赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 1237 |
最后登录 | 2016-8-30 |
在线时间 | 34 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 34 小时
- 注册时间
- 2011-4-9
- 帖子
- 48
|
#==============================================================================
# ■ Window_Actor_Status
#------------------------------------------------------------------------------
# 角色状态
#==============================================================================
ACTOR_STATUS_SWITCH = 1
class Window_Actor_Status < Window_Base
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize
super(-10,-118, 640, 230)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
self.z = 9999
self.contents.font.color = 黑_color
refresh
@old_hp = $game_actors[1].hp
@old_sp = $game_actors[1].sp
cx = contents.text_size($data_system.words.gold).width
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
if $game_switches[ACTOR_STATUS_SWITCH]
@old_hp != $game_actors[1].hp or
@old_sp != $game_actors[1].sp or
@old_exp != $game_actors[1].exp
@old_hp = $game_actors[1].hp
@old_sp = $game_actors[1].sp
cf = 100 * $game_actors[1].now_exp / $game_actors[1].next_exp
cx = contents.text_size($data_system.words.gold).width
self.contents.clear
#=====================================================================#
self.contents.font.size = 12
if $game_actors[1].level < 10
self.contents.draw_text(25,94,32,32,$game_actors[1].level.to_s)
else
self.contents.draw_text(22,94,32,32,$game_actors[1].level.to_s)
end
#=====================================================================#
self.contents.font.size = 11
if $game_actors[1].hp > 1000
self.contents.draw_text(90,107,32,32,$game_actors[1].hp.to_s)
elsif $game_actors[1].hp < 100 && $game_actors[1].hp > 10
self.contents.draw_text(90+10,107,32,32,$game_actors[1].hp.to_s)
elsif $game_actors[1].hp < 10
self.contents.draw_text(90+15,107,32,32,$game_actors[1].hp.to_s)
else
self.contents.draw_text(90+5,107,32,32,$game_actors[1].hp.to_s)
end
self.contents.draw_text(90+10+20,108,32,32,"/")
self.contents.draw_text(90+10+30,107,32,32,$game_actors[1].maxhp.to_s)
bitmap1 = RPG::Cache.picture("血条")
w = bitmap1.width * $game_actors[1].hp / [$game_actors[1].maxhp,1].max
rect1 = Rect.new(0,0,w,bitmap1.height)
self.contents.blt(0,118,bitmap1,rect1)
#=====================================================================#
@plus_sp = 85
if $game_actors[1].sp > 1000
self.contents.draw_text(0+@plus_sp+5,127,32,32,$game_actors[1].sp.to_s)
elsif $game_actors[1].sp < 100 && $game_actors[1].sp > 10
self.contents.draw_text(0+10+@plus_sp+5,127,32,32,$game_actors[1].sp.to_s)
elsif $game_actors[1].sp < 10
self.contents.draw_text(0+15+@plus_sp+5,127,32,32,$game_actors[1].sp.to_s)
else
self.contents.draw_text(0+5+@plus_sp+5,127,32,32,$game_actors[1].sp.to_s)
end
self.contents.draw_text(0+10+20+@plus_sp+5,128,32,32,"/")
self.contents.draw_text(0+10+30+@plus_sp+5,127,32,32,$game_actors[1].maxsp.to_s)
bitmap2 = RPG::Cache.picture("法条")
w = bitmap2.width * $game_actors[1].sp / [$game_actors[1].maxsp,1].max
rect2 = Rect.new(0,0,w,bitmap2.height)
self.contents.blt(-87+bitmap1.width,135,bitmap2,rect2)
#=====================================================================#
@plus_exp = 85*2+20
self.contents.draw_text(-80+@plus_exp,144,22,32,cf.to_s)
bitmap3 = RPG::Cache.picture("经验条")
w = bitmap3.width * $game_actors[1].now_exp / [$game_actors[1].next_exp,1].max
rect3 = Rect.new(0,0,w,bitmap3.height)
self.contents.blt(-173+bitmap1.width+bitmap2.width,152,bitmap3,rect3)
#=========================================================================#
if $game_party.gold >= 0 && $game_party.gold < 99
self.contents.draw_text(100, 165, 120+cx,32, $game_party.gold.to_s)
elsif $game_party.gold >= 99 && $game_party.gold < 999
self.contents.draw_text(96, 165, 120+cx,32, $game_party.gold.to_s)
elsif $game_party.gold >= 999 && $game_party.gold < 9999
self.contents.draw_text(92, 165, 120+cx,32, $game_party.gold.to_s)
elsif $game_party.gold >= 9999 && $game_party.gold < 99999
self.contents.draw_text(88, 165, 120+cx,32, $game_party.gold.to_s)
elsif $game_party.gold >= 99999 && $game_party.gold < 999999
self.contents.draw_text(84, 165, 120+cx,32, $game_party.gold.to_s)
elsif $game_party.gold >= 999999 && $game_party.gold < 9999999
self.contents.draw_text(80, 165, 120+cx,32, $game_party.gold.to_s)
elsif $game_party.gold >= 9999999 && $game_party.gold < 99999999
self.contents.draw_text(76, 165, 120+cx,32, $game_party.gold.to_s)
elsif $game_party.gold >= 99999999 && $game_party.gold < 999999999
self.contents.draw_text(72, 165, 120+cx,32, $game_party.gold.to_s)
elsif $game_party.gold >= 999999999 && $game_party.gold < 9999999999
self.contents.draw_text(68, 165, 120+cx,32, $game_party.gold.to_s)
elsif $game_party.gold >= 9999999999
self.contents.draw_text(10, 165, 120+cx,32, $game_party.gold.to_s)
end
#=========================================================================#
end
end
end
换个吧 HP+SP+经验+金钱 +等级 不要的话 把SP+经验+金钱+等级的删去 |
|