4/4/2023 0 Comments Gideros or function![]() ![]() You can create and then read files at document directory to save player progress. The files created at document directory is permanent between different application sessions. You can store application created files at document directory. Note: Resource directory is read-only and you should not try to write any files there. Note: Optionally, you can access the files at resource directory by adding "|R|" to the begining of the file name (but you don’t need to): local sprite1 = Texture.new("|R|gfx/sprite1.png") Local click = Sound.new("audio/click.wav") Local music = Sound.new("audio/game-music.mp3") Local background = Texture.new("gfx/background.png") Local sprite2 = Texture.new("gfx/sprite2.png") Therefore, to access the files at resource directory, specify the file path as it is: local sprite1 = Texture.new("gfx/sprite1.png") Resource directory is the default directory. Is stored at real device and Gideros Player like: /audio/game-music.mp3 The file and folder structure of your asset library shown below Your code, image, audio and all other files are reside at resource directory. ![]() Io.read("|T|file.txt") -> open file.txt at temporary directory to read Io.read("|D|file.txt") -> open file.txt at documents directory to read Io.read("|R|file.txt") -> open file.txt at resource directory to read (same as above) Temporary - can be used as temporary storages for files (can be modified by the app)Įxample of accessing each directory: io.read("file.txt") -> open file.txt at resource directory to read. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |