Ресурсы
Как более подробно описано здесь, рекомендуется инициализировать матрицу активов в начале проекта, загрузить активы и продумать, когда они должны быть загружены.
В ink, пользователь имеет меньше контроля чем, например, в Javascript/Typescript над тем когда и как загружать активы. В ink, pixi-vn предоставляет единственную функцию, которая загружает активы перед запуском меток. To do this, you need to use the following syntax:
# + [operation] + [assets or bundle] + [list of URL/path of the image]
#: It is a special character used by ink syntax for use a special script.[operation]: It is the operation that you want to do. The available operations are:load: It loads with await the assets or bundle (Assets.loadorAssets.loadBundle).lazyload: It loads the assets or bundle in the background (Assets.backgroundLoadorAssets.backgroundLoadBundle).
[assets or bundle]: It is the type of asset that you want to load. The available types are:assets: It loads the assets.bundle: It loads the bundle.
[list of URL/path of the image]: It is the list of URL/path of the images that you want to show. If you have initialized the asset matrix, you can use the alias of the texture. Keep in mind that to writehttps://in ink you must usehttps:\/\/because the//is considered a comment in ink.
=== start ===
# lazyload bundle main_menu start
# load assets eggHead flowerTop my_video
# show image eggHead
# show image flowerTop
# show video my_video
# pause
-> start