-- trueなら時分 falseなら月日 を表示 local _displayMode = true function updateAll() -- 時分の表示 if _displayMode == true then local time = os.date(("%H:%M")) -- TimerText のオブジェクトに TextMeshPro がアタッチされてます vci.assets.SetText("TimerText", tostring(time)) end -- 月日の表示 if _displayMode == false then local time = os.date(("%m/%d")) -- TimerText のオブジェクトに TextMeshPro がアタッチされてます vci.assets.SetText("TimerText", tostring(time)) end end function onUse(use) if use == "TimerItem" then _displayMode = not(_displayMode) end end