Make Private Servers
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Make Private Servers

Suporte para criação e administração de servidores criados apartir do RPG maker VX/XP ou outras engines.Divulgação de seu servidor ou jogo offline.
 
PortalInícioProcurarÚltimas imagensRegistarEntrar

 

 HUD - God of War II

Ir para baixo 
AutorMensagem
Moura
Admin
Admin
Moura


Mensagens : 26
Reputação : 1
Data de inscrição : 23/07/2011
Idade : 27
Localização : Amapá

HUD - God of War II Empty
MensagemAssunto: HUD - God of War II   HUD - God of War II Icon_minitimeQua Jul 27, 2011 2:46 am

HUD - God of War II Huduh

Código:
X = 0
Y = 0
Largura = 343
Altura = 148
class Hud < Window_Base
  def initialize
      super(X,Y,Largura,Altura)
      self.contents = Bitmap.new(width - 32, height - 32)
      self.windowskin = RPG::Cache.windowskin("Skin")
      @ator = 0
      refresh
    end

  def refresh
    self.contents.clear
    actor = $game_party.actors[0]
hud3 = RPG::Cache.picture("HUD")
hud1 = hud3.width
hud2 = hud3.height
hud4 = Rect.new(0,0,hud1,hud2)
self.contents.blt(0,0,hud3,hud4)
#Conteúdo:     
draw_actor_hp_bar_1(actor, 74, 33)
draw_actor_sp_bar_1(actor, 74, 43)
#Fim 
 
    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
#Adiciona a janela a o mapa.
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

class Window_Base < Window
def draw_face (actor, x, y)
  bitmap = RPG::Cache.picture(actor.name + "_face")
  cw = bitmap.width
  ch = bitmap.height
  src_rect = Rect.new(0, 0, cw, ch)
  self.contents.blt(x -cw / 2 , y - ch,bitmap, src_rect)
 end
 
 def draw_actor_hp_bar_1(actor, x, y)
  back = RPG::Cache.picture("Barra_Fundo") 
  cw = back.width
  ch = back.height
  src_rect = Rect.new(0, 0, cw, ch) 
  self.contents.blt(x + 65, y - ch + 30, back, src_rect)
  meter = RPG::Cache.picture("Barra_Hp")   
  cw = meter.width  * actor.hp / actor.maxhp
  ch = meter.height
  src_rect = Rect.new(0, 0, cw, ch)
  self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
  end
 
  def draw_actor_sp_bar_1(actor, x, y)
  back = RPG::Cache.picture("Barra_Fundo") 
  cw = back.width
  ch = back.height
  src_rect = Rect.new(0, 0, cw, ch) 
  self.contents.blt(x + 65, y - ch + 30, back, src_rect)
  meter = RPG::Cache.picture("Barra_Sp") 
  cw = meter.width  * actor.sp / actor.maxsp
  ch = meter.height
  src_rect = Rect.new(0, 0, cw, ch)
  self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
 end
end

Baixar Demo!
Ir para o topo Ir para baixo
http://mpservers.directorioforuns.com
 
HUD - God of War II
Ir para o topo 
Página 1 de 1

Permissões neste sub-fórumNão podes responder a tópicos
Make Private Servers :: RPG maker XP :: Scripts-
Ir para: