I've learned a valuable lesson the past few days...I don't do well with online learning. I think I've watched the videos and read the articles 5 or 6 times trying to understand LUA. The goal with this assignment was to be introduced to lua and to create a simple app using corona and lua. I understand parts of this but for the most part I need to sit down with someone and really look at it and talk through it. Mostly what's here is what was presented by the lesson, though I tried a bunch of other combos but they never worked. Peter, I'd love to sit down and get some more one-on-one on this so I can really understand the basics. But here's what I was able to do after a couple of hours of trying to understand this all.
print( "I have no idea what's going on" )
local myTextObeject = display.newText( "I have no idea what's going on", 200, 100, "Garamond", 30 )
-- function screentap()
-- local r=math.random( 0, 100)
-- local g=math.random( 0, 100)
-- local b=math.random(0, 100)
-- myTextObeject:setFillColor(r/100, g/100, b/100)
-- end
-- display.currentStage: addEventListener( "tap", screentap )
local firstName = "Michael"
local lastName = "Boren"
local fullName = firstName .. " " .. lastName
print (fullName)
local yearBorn = "1987"
local yearToday = "2014"
local age = yearToday - yearBorn
print ( fullName .. "is" .. age .. "years old in 2014" )
local function makeFullName( firstName, lastName )
local name = firstName .." ".. lastName
return name
end
local firstName = "Michael"
local lastName = "Boren"
local fullName = makeFullName( firstName, lastName)

No comments:
Post a Comment