-
Notifications
You must be signed in to change notification settings - Fork 0
/
Util.lua
43 lines (37 loc) · 1.16 KB
/
Util.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
32
33
34
35
36
37
38
39
40
41
42
43
-- Globals
gameName = "Erosion"
gameVer = "0.01"
Util = {
screenDebug = true,
mainDebug = true,
inputDebug = false,
logicDebug = false,
drawDebug = false
}
-- Functions
function Util.functionDebug(booleanTest, debugString)
if booleanTest then
print(debugString)
end
end
function Util.displayEvents(eventType)
print("############### Event ###############")
print("type: " .. eventType)
print("content center x: " .. display.contentCenterX)
print("content hight: " .. display.contentHeight)
print("content scale x: " .. display.contentScaleX)
print("screen origin x: " .. display.screenOriginX)
print("viewable content height: " .. display.viewableContentHeight)
print("viewable content width: " .. display.viewableContentWidth)
print("#####################################")
end
function Util.printProgramIntro()
print ("\n\n\n\n$$$$$$$$$$$$$$$$$$$$$$$$$$ PROGRAM START $$$$$$$$$$$$$$$$$$$$$$$$$$")
print ("Program: " .. gameName)
print ("Version: " .. gameVer)
print ("\n\n")
end
function Util.printObjectsOnScreen()
print("here")
print("num objects " .. display.getCurrentStage().numChildren)
end