赞 | 12 |
VIP | 107 |
好人卡 | 6 |
积分 | 4 |
经验 | 31122 |
最后登录 | 2024-6-29 |
在线时间 | 1606 小时 |
Lv2.观梦者 傻♂逼
- 梦石
- 0
- 星屑
- 374
- 在线时间
- 1606 小时
- 注册时间
- 2007-3-13
- 帖子
- 6562
|
- #==============================================================================
- # Window Hud
- #==============================================================================
- module CrissaegrimHud
-
- # imagem de fundo da hud
- Background = "HUD_Background"
- # Switch que ativa / desativa a HUD
- # se for = 0, a Hud será mostrada na tela permanentemente
- OnOff_Hud_Switch = 0
- end
- #------------------------------------------------------------------------------
- class Window_CrissaegrimHud < Window_Base
- def initialize
- super(0,0,320,100)
- self.opacity = 0
- update
- end
- def update
- if ($game_party.members[0].hp != @hp or $game_party.members[0].mp != @mp) or (Crissaegrim_ABS != @abs or ($game_party.members[0].level != @level or $game_party.members[0].states != @states))
- @abs = Crissaegrim_ABS
- @hp = $game_party.members[0].hp
- @mp = $game_party.members[0].mp
- @item = Crissaegrim_ABS::Item_Button
- @level = $game_party.members[0].level
- @states = $game_party.members[0].states
- self.contents.font.size = 16
- self.contents.clear
- skill_count = 0
- for button in Crissaegrim_ABS::Skill_Button.keys
- next if button == nil
- skill = $data_skills[Crissaegrim_ABS::Skill_Button[button]]
- next if skill == nil
- show_icon(skill, (28 * skill_count) + 155, 0)
- skill_count += 1
- end
- item_count = 0
- for btn in Crissaegrim_ABS::Item_Button.keys
- next if btn == nil
- item = $data_items[Crissaegrim_ABS::Item_Button[btn]]
- next if item == nil
- show_icon(item, (28 * item_count) + 155, 40)
- item_count += 1
- end
- refresh
- end
- end
- def refresh
- actor = $game_party.members[0]
- draw_actor_hp(actor, 0, -4, 96)
- draw_actor_mp(actor, 0, 20, 96)
- draw_actor_level(actor, 0, 44)
- show_state(actor, 115, 0)
- if Crissaegrim_ABS::Distance_Weapons.has_key?($game_party.members[0].weapon_id)
- if Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][5] > 0
- show_icon($data_items[Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][5]], 260, 0)
- self.contents.font.size = 18
- self.contents.font.color = text_color(15)
- self.contents.draw_text(260, 8, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][5]]),1)
- self.contents.font.size = 16
- self.contents.font.color = text_color(0)
- self.contents.draw_text(260, 8, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][5]]),1)
- end
- if Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][6] > 0
- show_icon($data_items[Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][6]], 260, 40)
- self.contents.font.size = 18
- self.contents.font.color = text_color(15)
- self.contents.draw_text(260, 48, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][6]]),1)
- self.contents.font.size = 16
- self.contents.font.color = text_color(0)
- self.contents.draw_text(260, 48, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][6]]),1)
- end
- end
- end
- def show_state(actor, x, y)
- count = 0
- for state in actor.states
- draw_icon(state.icon_index, x, y + 24 * count)
- count += 1
- break if (24 * count > 76)
- end
- end
- def show_icon(item, x, y)
- if item != nil
- draw_icon(item.icon_index, x, y)
- end
- end
- end
- #------------------------------------------------------------------------------
- class Scene_Map
- alias hud_start start
- alias hud_update update
- alias hud_terminate terminate
- def start
- super
- @bg = Sprite.new
- @bg.bitmap = Cache.system(CrissaegrimHud::Background)
- @bg.x = 0
- @bg.y = 316
- @hud = Window_CrissaegrimHud.new
- @hud.x = 0
- @hud.y = 316
- hud_properties
- hud_start
- end
- def update
- super
- @bg.update
- @hud.update
- hud_properties
- hud_update
- end
- def hud_properties
- if CrissaegrimHud::OnOff_Hud_Switch == 0 or $game_switches[CrissaegrimHud::OnOff_Hud_Switch] == true
- @hud.visible = true
- @bg.visible = true
- else
- @hud.visible = false
- @bg.visible = false
- end
- end
- def terminate
- super
- @bg.dispose
- @hud.dispose
- hud_terminate
- end
- end
复制代码
降低刷新频率了
不过我的电脑上看不出什么 {/gg}{/gg} |
|