Add the intro cutscene, a start to the map, and various other things.
This commit is contained in:
parent
d0c0a3ebb6
commit
1b2199705b
46 changed files with 1401 additions and 91 deletions
|
|
@ -50,7 +50,7 @@ local function interpolate(ref, target, t, x1, y1, x2, y2)
|
|||
local eased_t = bezier_ease(t, x1 or 0, y1 or 0, x2 or 1, y2 or 1)
|
||||
return ref + (target - ref) * eased_t
|
||||
end
|
||||
|
||||
artifact.interpolate = interpolate
|
||||
|
||||
function ns.register_hud_type(def)
|
||||
ns.hud_types[def.name] = setmetatable(def, {__index = ns.Element})
|
||||
|
|
@ -184,7 +184,7 @@ minetest.register_globalstep(function(dtime)
|
|||
end)
|
||||
|
||||
function ns.color_to_number(color)
|
||||
return tonumber(string.format("0x%.2x%.2x%.2x%.2x", color.r, color.g, color.b, color.a))
|
||||
return tonumber(string.format("0x%.2x%.2x%.2x", color.r, color.g, color.b))
|
||||
end
|
||||
|
||||
ns.register_hud_type {
|
||||
|
|
@ -193,12 +193,14 @@ ns.register_hud_type {
|
|||
field_types = {
|
||||
offset = "vec2",
|
||||
pos = "vec2",
|
||||
size = "vec2",
|
||||
color = "color"
|
||||
},
|
||||
defaults = {
|
||||
dir = 0,
|
||||
align = {x=0, y=0},
|
||||
offset = {x=0, y=0},
|
||||
size = {x=1, y=1},
|
||||
color = {r = 0xff, g = 0xff, b = 0xff, a = 0xff}
|
||||
},
|
||||
add = function(e, m)
|
||||
|
|
@ -209,6 +211,7 @@ ns.register_hud_type {
|
|||
alignment = e.align,
|
||||
offset = e.offset,
|
||||
scale = {x=100, y=100},
|
||||
size = e.size,
|
||||
text = e.text,
|
||||
number = ns.color_to_number(e.color)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue