-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate.lua
31 lines (26 loc) · 1.15 KB
/
create.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
module(..., package.seeall)
function new()
local localGroup = display.newGroup()
--> This is how we start every single file or "screen" in our folder, except for main.lua
-- and director.lua
--> director.lua is NEVER modified, while only one line in main.lua changes, described in that file
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- local background = display.newImage ("bluebackground.png")
-- localGroup:insert(background)
local bluebutton = display.newImage ("bluebutton.png")
bluebutton.x = display.contentWidth / 2
bluebutton.y = display.contentHeight / 2
localGroup:insert(bluebutton)
local function pressblue (event)
if event.phase == "ended" then
print("pressblue")
director:changeScene ("gallery")
end
end
bluebutton:addEventListener ("touch", pressblue)
------------------------------------------------------------------------------
------------------------------------------------------------------------------
return localGroup
end
--> This is how we end every file except for director and main, as mentioned in my first comment