赞 | 12 |
VIP | 107 |
好人卡 | 6 |
积分 | 4 |
经验 | 31122 |
最后登录 | 2024-6-29 |
在线时间 | 1606 小时 |
Lv2.观梦者 傻♂逼
- 梦石
- 0
- 星屑
- 374
- 在线时间
- 1606 小时
- 注册时间
- 2007-3-13
- 帖子
- 6562
|
以下引用yangff于2008-6-27 15:22:15的发言:
以下引用偶尔杀人越货于2008-6-27 15:13:15的发言:
感觉原作需要简化一下刷新流程,我逻辑盲
还是卡?
已经够简化了
我发的有点问题厄
替换一下
- #==============================================================================
- # 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
- return if Crissaegrim_ABS::Distance_Weapons == nil
- tp1 = Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][5].to_i
- tp2 = Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][6].to_i
- if (@hp != $game_party.members[0].hp or @mp != $game_party.members[0].mp) or (tp1 != @tp1 or tp2 != @tp2)
- @tp2 = tp2
- @tp1 = tp1
- @hp = $game_party.members[0].hp
- @mp = $game_party.members[0].mp
- 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
- 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].to_i > 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].to_i > 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
- 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
- if @hud.visible != false
- @hud.update
- end
- hud_properties
- hud_update
- end
- def hud_properties
- if (CrissaegrimHud::OnOff_Hud_Switch == 0 or $game_switches[CrissaegrimHud::OnOff_Hud_Switch] == true)
- if @hud.visible == false
- @hud.update
- @hud.visible = true
- @bg.visible = true
- end
- elsif @hud.visible != false
- @hud.visible = false
- @bg.visible = false
- end
- end
- def terminate
- super
- @bg.dispose
- @bg = nil
- @hud.dispose
- @hud = nil
- hud_terminate
- end
- end
复制代码
|
|