Thank you so much!!!



This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
-- Script that creates a game ready to be played.
-- Usage:
-- local game_manager = require("scripts/game_manager")
-- local game = game_manager:create("savegame_file_name")
-- game:start()
local dialog_box_manager = require("scripts/menus/alttp_dialog_box")
local hud_manager = require("scripts/hud/hud")
local game_manager = {}
-- Sets initial values for a new savegame of this quest.
local function initialize_new_savegame(game)
-- TODO
game:set_starting_location("maps/Houses/link", "start")
-- Initially give 3 hearts
game:set_max_life(12)
game:set_life(game:get_max_life())
end
-- Creates a game ready to be played.
function game_manager:create(file)
-- Create the game (but do not start it).
local exists = sol.game.exists(file)
local game = sol.game.load(file)
if not exists then
-- This is a new savegame file.
initialize_new_savegame(game)
end
local hud
-- Function called when the player runs this game.
function game:on_started()
hud = hud_manager:create(game)
end
-- Returns whether the HUD is currently shown.
function game:is_hud_enabled()
return hud:is_enabled()
end
-- Enables or disables the HUD.
function game:set_hud_enabled(enable)
return hud:set_enabled(enable)
end
-- Return the HUD.
function game:get_hud()
return hud
end
-- Returns whether the current map is in the inside world.
function game:is_in_inside_world()
return self:get_map():get_world() == "inside_world"
end
-- Returns whether the current map is in the outside world.
function game:is_in_outside_world()
return self:get_map():get_world() == "outside_world"
end
return game
end
return game_manager
Quote from: polyglot762 on September 16, 2015, 09:16:22 PM
I'll have this HUD up and running soon.
Where should I post this if anyone else wants the zsdx HUD?
I will be using the Mercurious chest code clean-up update.
Just the HUD code not anything else.
There are quite a few pipes* to hookup before it will be serviceable.
*Pipes: (What I like to call the calls and functions and required elements.)