Brekamp Experiente [***]
Mensagens : 60 Cash Makers : 89
| Assunto: Brekamp HUD Qua Set 30, 2009 4:47 pm | |
| {Brekamp HUD}
por {Brekamp} Introdução Essa é uma HUD bem leve e simples que eu fiz Características
- Barras de HP e SP
- HUD leve
- Não usa Pictures
ScreenshotsComo usarCole acima do Main. Script - Código:
-
=begin Script criado por Brekamp =end
class Window_Base < Window Back_Color = Color.new(0, 255, 0) HP_Color = Color.new(255, 0, 0) SP_Color = Color.new(0, 0, 255) def draw_gauge(x, y, width, height, value, max, gauge_color, opacity = 255) gauge_bitmap = Bitmap.new(width, height) gauge_bitmap.fill_rect(0, 0, width, height, Back_Color) gauge_width = width * value / max gauge_bitmap.fill_rect(0, 0, gauge_width, height, gauge_color) self.contents.blt(x, y, gauge_bitmap, Rect.new(0, 0, width, height), opacity) gauge_bitmap.dispose end def draw_actor_hp_gauge(actor, x, y, width, height, opacity) draw_gauge(x, y, width, height, actor.hp, actor.maxhp, HP_Color, opacity) end def draw_actor_sp_gauge(actor, x, y, width, height, opacity) draw_gauge(x, y, width, height, actor.sp, actor.maxsp, SP_Color, opacity) end end X = 0 Y = 0 Largura = 250 Altura = 120 class Hud < Window_Base def initialize super(X,Y,Largura,Altura) self.contents = Bitmap.new(width - 32, height - 32) @ator = 0 self.opacity = 30 refresh end
def refresh self.contents.clear actor = $game_party.actors[0] draw_actor_exp(actor,0, 60) draw_actor_hp(actor, 0, 20, width = 144) draw_actor_sp(actor, 0, 40, width = 144) draw_actor_graphic(actor, 180, 90) draw_actor_name(actor, 4, 0) draw_actor_hp_gauge(actor, 32, 28, 128, 16, 100) draw_actor_sp_gauge(actor, 32, 48, 128, 16, 100) if $scene.is_a?(Scene_Menu) self.contents.clear end if $scene.is_a?(Scene_Battle) self.contents.clear self.visible = false end end end class Scene_Map alias hud_main main def main @Hud = Hud.new hud_main @Hud.dispose end alias hud_update update def update hud_update @Hud.update @Hud.refresh end end Perguntas Frequentes - Citação :
- Tem pra VX?:
Resposta: Não Créditos e Agradecimentos | |
|