Compare commits
No commits in common. "master" and "1.3.0" have entirely different histories.
3 changed files with 1 additions and 23 deletions
|
|
@ -1,9 +1,4 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 1.4.0
|
|
||||||
Date: 10.01.2026
|
|
||||||
Changes:
|
|
||||||
- Add Entity.setFilename
|
|
||||||
---------------------------------------------------------------------------------------------------
|
|
||||||
Version: 1.3.0
|
Version: 1.3.0
|
||||||
Date: 24.12.2025
|
Date: 24.12.2025
|
||||||
Changes:
|
Changes:
|
||||||
|
|
|
||||||
|
|
@ -26,21 +26,4 @@ Entity.collisionBox = function(width, height, margin)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Sets the file name on a picture considering various formats.
|
|
||||||
--- If sheets or layers are found, use the optional param to select the right one.
|
|
||||||
--- @param sprite table The sprite to replace the filename in
|
|
||||||
--- @param filename string The new filename
|
|
||||||
--- @param sheetLayer number The sheet or layer index to use. Defaults to 1.
|
|
||||||
Entity.setFilename = function(sprite, filename, sheetLayer)
|
|
||||||
if sprite.filename then
|
|
||||||
sprite.filename = filename
|
|
||||||
elseif sprite.sheet then
|
|
||||||
sprite.sheet.filename = filename
|
|
||||||
elseif sprite.sheets then
|
|
||||||
sprite.sheets[sheetLayer or 1].filename = filename
|
|
||||||
elseif sprite.layers then
|
|
||||||
sprite.layers[sheetLayer or 1].filename = filename
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return Entity
|
return Entity
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "cf-lib",
|
"name": "cf-lib",
|
||||||
"version": "1.4.0",
|
"version": "1.3.0",
|
||||||
"title": "cackling fiends library",
|
"title": "cackling fiends library",
|
||||||
"description": "Because I'd like to have my own library :-)",
|
"description": "Because I'd like to have my own library :-)",
|
||||||
"author": "cackling fiend",
|
"author": "cackling fiend",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue