-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathmain.lua
executable file
·74 lines (52 loc) · 1.92 KB
/
main.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
--====================================================================--
-- Ghosts vs Monsters sample project, OOP version
--
-- OOP version by David McCuskey
-- Original designed and created by Jonathan & Biffy Beebe
-- of Beebe Games exclusively for Ansca, Inc.
--
-- Sample code is MIT licensed, the same license which covers Lua itself
-- http://en.wikipedia.org/wiki/MIT_License
-- Copyright (C) 2011-2015 David McCuskey. All Rights Reserved.
-- Copyright (C) 2010 ANSCA Inc. All Rights Reserved.
--====================================================================--
print( '\n\n##############################################\n\n' )
--====================================================================--
--== Ghost vs Monsters : main
--====================================================================--
-- Semantic Versioning Specification: http://semver.org/
local VERSION = "0.2.0"
--====================================================================--
--== Setup, Constants
local Controller = nil -- set in main()
local open_feint_params = nil
--[[
-- uncomment this section and put in Open Feint info
-- to enable Open Feint
open_feint_params = nil {
app_key='your-app-key',
app_secret='your-app-secret',
app_title='Ghost vs. Monsters',
app_id='your-app-id',
}
--]]
-- whether component communication is global or direct
-- if true, then use dmc_megaphone
--
local GLOBAL_COMMS = false -- false/true
_G.gMODE = 'RUN' -- 'TEST'/'RUN'
--====================================================================--
--== Main
--====================================================================--
if gMODE == 'TEST' then
Controller = require 'test_controller'
else
Controller = require 'app_controller'
end
assert( Controller, "GvsM Main: Error loading Controller" )
local params = {
-- put here any params required for App or Test here
open_feint=open_feint_params,
use_global_comms=GLOBAL_COMMS
}
Controller.run( params )