Game Development Reference
In-Depth Information
Saving Data
When working with an application, you might want to save the data so that it persists. The data can
be saved either locally, making it available to only the current Codea project, or globally, making it
available to all Codea projects on the device. Here's an example of saving data locally:
local theName = (readLocalData("username"))
if theName == nil then
theName = "Default"
saveLocalData("username", theName)
end
print(theName)
clearLocalData
no . These are described in the following subsections.
The noFill function sets the fill color to transparent, drawing a shape that has no fill (but could have
an outline). Figure 12-3 demonstrates drawing a rectangle with and without a fill.
Figure 12-3. A rectangle with a fill (left) and one without (right)
noStroke
The noStroke function sets the color used for drawing to transparent. This function removes the
outline from a shape. (See Figure 12-4 .)
Figure 12-4. A rectangle with a stroke (left) and one without (right)
 
Search WWH ::




Custom Search