composer.getVariable()
ហ្វាំងសិននេះប្រើសំរាប់ retrieves តំលៃរបស់ variable (from within the Composer object) ដែលបញ្ចូលពីមុននៅ composer.setVariable()
Syntax: composer.getVariable (variableName)
variableName វាជា String ដែលជាឈ្មោះរបស់ previous variable តាមរយះ composer.setVariable()
សូមមើលកូដះ
-- Set the Composer variable "money" to 100
composer.setVariable( "money", 100 )
-- In another scene...
local currentMoney = composer.getVariable( "money" )
No comments:
Post a Comment