[FIX] Col·lisió en el peu
[FIX] Canviada dialeg.run a dialeg.show [NEW] Afegit dialeg.add
This commit is contained in:
+18
-3
@@ -47,11 +47,23 @@ function dialeg.draw_globo(x, y, w, h, flip, text)
|
||||
font.current(font_curr)
|
||||
end
|
||||
|
||||
function dialeg.run(_x, _y, _w, flip, text, always_visible)
|
||||
local w = math.floor(4.6*#text)
|
||||
local h = 20
|
||||
function dialeg.add(_actor, _text, _time)
|
||||
local _w = math.floor(4.6*#_text)
|
||||
table.insert(
|
||||
dialeg.list,
|
||||
{ actor= _actor,
|
||||
text = _text,
|
||||
time = _time,
|
||||
w = _w,
|
||||
h = 20,
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
function dialeg.show(_x, _y, _w, flip, text, always_visible)
|
||||
local x = 0
|
||||
local y = 0
|
||||
|
||||
y = _y-20
|
||||
if flip then
|
||||
x = _x-w
|
||||
@@ -63,6 +75,9 @@ function dialeg.run(_x, _y, _w, flip, text, always_visible)
|
||||
if x<0 then x=0 end
|
||||
if y<0 then y=0 end
|
||||
end
|
||||
|
||||
local w = math.floor(4.6*#text)
|
||||
local h = 20
|
||||
dialeg.draw_globo(x, y, w, h, flip, text)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user