Added useful method for shader work.
This commit is contained in:
parent
acd14a510b
commit
7769d53040
|
@ -62,6 +62,10 @@ function Sprite:draw(...)
|
|||
return self:getImage()(...)
|
||||
end
|
||||
|
||||
function Sprite:getSheetDimensions()
|
||||
return self.imagesheet.image:getDimensions()
|
||||
end
|
||||
|
||||
setmetatable(Sprite, {__call = function(_, ...) return Sprite.new(...) end})
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -121,6 +125,10 @@ function Animation:draw(...)
|
|||
return self:getImage()(...)
|
||||
end
|
||||
|
||||
function Animation:getSheetDimensions()
|
||||
return self.imagesheet.image:getDimensions()
|
||||
end
|
||||
|
||||
setmetatable(Animation, {__call = function(_, ...) return Animation.new(...) end})
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue
Block a user