Nicholas Hayashi
4 years ago
10 changed files with 160 additions and 82 deletions
-
2src/color.lua
-
9src/extra.lua
-
33src/grid.lua
-
42src/hexyz.lua
-
52src/main.lua
-
9src/math.lua
-
23src/mob.lua
-
11src/texture.lua
-
15src/tower.lua
-
10src/util.lua
@ -1,4 +1,13 @@ |
|||
|
|||
|
|||
function math.wrapf(float, range) |
|||
return float - range * math.floor(float / range) |
|||
end |
|||
|
|||
function math.lerpv2(v1, v2, t) |
|||
return v1 * t + v2 * (1 - t) |
|||
end |
|||
|
|||
function table.rchoice(t) |
|||
return t[math.floor(math.random() * #t) + 1] |
|||
end |
@ -1,9 +0,0 @@ |
|||
|
|||
function math.wrapf(float, range) |
|||
return float - range * math.floor(float / range) |
|||
end |
|||
|
|||
function math.lerpv2(v1, v2, t) |
|||
return v1 * t + v2 * (1 - t) |
|||
end |
|||
|
@ -0,0 +1,15 @@ |
|||
|
|||
TOWERS = {} |
|||
|
|||
function is_buildable(tile, tower) |
|||
|
|||
end |
|||
|
|||
function make_tower() |
|||
|
|||
end |
|||
|
|||
function do_tower_updates() |
|||
|
|||
end |
|||
|
@ -1,10 +0,0 @@ |
|||
|
|||
function pack_texture_into_sprite(texture, width, height) |
|||
return am.sprite{ |
|||
texture = texture, |
|||
s1 = 0, s2 = 1, t1 = 0, t2 = 1, |
|||
x1 = 0, x2 = width, width = width, |
|||
y1 = 0, y2 = height, height = height |
|||
} |
|||
end |
|||
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue