Annotations changes: clarification of types, addition of missing annotations

This commit is contained in:
Van
2025-10-03 20:50:14 +03:00
parent ab92e372f3
commit 69b8c6469c
13 changed files with 129 additions and 84 deletions

View File

@@ -1,20 +1,23 @@
---@class TileSheet
---@field image string Name of texture
---@field width number Number of tiles in the table horizontally
---@field height number Number of tiles in the table vertically
---@field height number Number of tiles in the table vertically
local TileSheet = {}
---@param image string Name of texture
---@param width number Number of tiles in the table horizontally
---@param height number Number of tiles in the table vertically
---@param height number Number of tiles in the table vertically
---@return TileSheet
function TileSheet:new(image, width, height)
---@type TileSheet
local instance = setmetatable({
image = image,
width = width,
height = height,
}, {__index = self})
-- TODO возможно будет лучше сделать автоматическое определение высоты и ширины по разрешению текстуры
return instance
end
@@ -28,7 +31,7 @@ function TileSheet:getTextureName(x, y)
return textureName
end
---Aleas for `TileSheet:getTextureName`.
---Alias for `TileSheet:getTextureName`.
---@param x number
---@param y number
---@return string