forked from n8fr8/Ghosts-vs.-Monsters
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.lua
56 lines (42 loc) · 1.41 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
--
-- Abstract: Ghosts Vs Monsters sample project
-- Designed and created by Jonathan and Biffy Beebe of Beebe Games exclusively for Ansca, Inc.
-- http://beebegamesonline.appspot.com/
-- (This is easiest to play on iPad or other large devices, but should work on all iOS and Android devices)
--
-- Version: 1.1
--
-- Sample code is MIT licensed, see http://developer.anscamobile.com/code/license
-- Copyright (C) 2010 ANSCA Inc. All Rights Reserved.
-- SOME INITIAL SETTINGS
display.setStatusBar( display.HiddenStatusBar ) --Hide status bar from the beginning
local oldTimerCancel = timer.cancel
timer.cancel = function(t) if t then oldTimerCancel(t) end end
local oldRemove = display.remove
display.remove = function( o )
if o ~= nil then
Runtime:removeEventListener( "enterFrame", o )
oldRemove( o )
o = nil
end
end
-- Import director class
local director = require("director")
ui = require( "ui" )
movieclip = require( "movieclip" )
-- Create a main group
local mainGroup = display.newGroup()
-- Main function
local function main()
-- Add the group from director class
mainGroup:insert(director.directorView)
-- Uncomment below code and replace init() arguments with valid ones to enable openfeint
--[[
openfeint = require ("openfeint")
openfeint.init( "App Key Here", "App Secret Here", "Ghosts vs. Monsters", "App ID Here" )
]]--
director:changeScene( "loadmainmenu" )
return true
end
-- Begin
main()