GuiアセットDirty Larryを例にしています。
アセットのインポート
- game.projectを開きます。
- DependenciesにアセットのURLを入力します。

アセットを取得・更新する
- メニューの[Project]->[Fetch Libraries]からアセットを取得・更新します。Assetsにdirtylarryライブラリが取り込まれます。

スクリプト
dirtylarry:buttonでボタンの衝突検知ができます。
-- ライブラリの要求
local dirtylarry = require "dirtylarry/dirtylarry"
-- 初期化
function init(self)
-- ユーザー入力を受け付ける
msg.post(".", "acquire_input_focus")
end
-- 入力検知
function on_input(self, action_id, action)
-- タッチ処理が離れた時
if action_id == hash("touch") and action.released then
-- ボタンと衝突判定する
-- 第1引数には、ボタンとして判定したいノード名を指定する
dirtylarry:button("button", action_id, action, function ()
print("button was pressed")
end)
end
end
まとめ
ライブラリの取り込みはURLを登録してFetchするだけ。とてもシンプルです。