-
Notifications
You must be signed in to change notification settings - Fork 0
How to: Integrate Panels
UnbelievableFlavour edited this page Sep 7, 2022
·
1 revision
Panels is an awesome library that can add comic-like cutscenes to your Cotton projects.
- Download Panels from: https://github.com/cadin/panels
- Add Panels to your Cotton project under
Source/libraries/panels
. - Add
import "libraries/panels/Panels"
to the top of yourmain.lua
file. - Wherever you want to add a cutscene, just add the following code:
local comicData = {
{ -- Sequence 1
title = "Chapter 1",
panels = { -- a list of PANELS for Sequence 1
{ -- Panel 1
layers = {
-- list of layers for panel 1
}
},
{ -- Panel 2
layers = {
-- list of layers for panel 2
}
}
}
},
}
function afterCutScene()
scene.back()
end
scene.startCutScene(comicData, afterCutScene)