Confira o Videos Épicos #45!
5 Respostas   469 Visualizações
0 Membros e 1 Visitante estão vendo este tópico.
def draw_file_infos(index) if File.exist?("Save0" + (index + 1).to_s + ".rvdata2") @header = DataManager.load_header(index) self.draw_text(0, 0, $game_files[index].contents.width, 24, @header[:playtime_s], 2) File.open("Save0" + (index + 1).to_s + ".rvdata2") do |file| vars = Marshal.load(file)[:variables] $file_chapter = vars[6].to_i end else self.contents.font.size = $font_size + 2 self.draw_text(0, 36, $game_files[index].contents.width, 24, $vocab[$game_variables[5]][0], 1) end end
header[:jewel_pts] = $game_variables[4]
header = DataManager.load_header(@file_index)draw_text(119, 46, 200, line_height, header[:jewel_pts])#exemplo de como usei desenhando a var
p vars[6]
def draw_file_infos(index) if File.exist?("Save0" + (index + 1).to_s + ".rvdata2") @header = DataManager.load_header(index) self.draw_text(0, 0, $game_files[index].contents.width, 24, @header[:playtime_s], 2) File.open("Save0" + (index + 1).to_s + ".rvdata2") do |file| Marshal.load(file) vars = Marshal.load(file)[:variables] return unless var $file_chapter = vars[6].to_i end else self.contents.font.size = $font_size + 2 self.draw_text(0, 36, $game_files[index].contents.width, 24, $vocab[$game_variables[5]][0], 1) end end