Permalink
Browse files

Renamed screenGroup to screen in all scenes

  • Loading branch information...
1 parent 40e58f5 commit 2d1dc125648b70b855fe5a318ad8a6ee30a4e1d2 @radamanthus committed Nov 12, 2012
Showing with 23 additions and 13 deletions.
  1. +3 −2 about.lua
  2. +3 −2 help.lua
  3. +4 −2 loadmenu.lua
  4. +7 −5 menu.lua
  5. +3 −1 play.lua
  6. +3 −1 settings.lua
View
@@ -7,9 +7,10 @@ local radlib = require "scripts.lib.radlib"
---------------------------------------------------------------------------------
-- BEGINNING OF YOUR IMPLEMENTATION
---------------------------------------------------------------------------------
-function scene:createScene( event )
- local screenGroup = self.view
+local screen = nil
+function scene:createScene( event )
+ screen = self.view
end
function scene:enterScene( event )
View
@@ -7,9 +7,10 @@ local radlib = require "scripts.lib.radlib"
---------------------------------------------------------------------------------
-- BEGINNING OF YOUR IMPLEMENTATION
---------------------------------------------------------------------------------
-function scene:createScene( event )
- local screenGroup = self.view
+local screen = nil
+function scene:createScene( event )
+ screen = self.view
end
function scene:enterScene( event )
View
@@ -4,19 +4,21 @@ local scene = storyboard.newScene()
---------------------------------------------------------------------------------
-- BEGINNING OF YOUR IMPLEMENTATION
---------------------------------------------------------------------------------
+local screen = nil
+
function initializeGame()
require 'init_buttons'
math.randomseed( os.time() )
end
function scene:createScene( event )
- local screenGroup = self.view
+ screen = self.view
local loadingImage = display.newImageRect( "images/splash_screen.png", 480, 320 )
loadingImage.x = display.contentWidth/2
loadingImage.y = display.contentHeight/2
- screenGroup:insert(loadingImage)
+ screen:insert(loadingImage)
local gotoMainMenu = function()
storyboard.gotoScene( "menu" )
View
@@ -7,8 +7,10 @@ local radlib = require "scripts.lib.radlib"
---------------------------------------------------------------------------------
-- BEGINNING OF YOUR IMPLEMENTATION
---------------------------------------------------------------------------------
+local screen = nil
+
function scene:createScene( event )
- local screenGroup = self.view
+ screen = self.view
local playButton = nil
local function onPlayPressed ( event )
@@ -25,7 +27,7 @@ function scene:createScene( event )
playButton.x = 160
playButton.y = 80
playButton.isActive = true
- screenGroup:insert(playButton)
+ screen:insert(playButton)
local settingsButton = nil
local function onSettingsPressed( event )
@@ -42,7 +44,7 @@ function scene:createScene( event )
settingsButton.x = 160
settingsButton.y = 130
settingsButton.isActive = true
- screenGroup:insert(settingsButton)
+ screen:insert(settingsButton)
local aboutButton = nil
local function onAboutPressed( event )
@@ -59,7 +61,7 @@ function scene:createScene( event )
aboutButton.x = 160
aboutButton.y = 180
aboutButton.isActive = true
- screenGroup:insert(aboutButton)
+ screen:insert(aboutButton)
local helpButton = nil
local function onHelpPressed( event )
@@ -76,7 +78,7 @@ function scene:createScene( event )
helpButton.x = 160
helpButton.y = 230
helpButton.isActive = true
- screenGroup:insert(helpButton)
+ screen:insert(helpButton)
end
function scene:enterScene( event )
View
@@ -7,8 +7,10 @@ local radlib = require "scripts.lib.radlib"
---------------------------------------------------------------------------------
-- BEGINNING OF YOUR IMPLEMENTATION
---------------------------------------------------------------------------------
+local screen = nil
+
function scene:createScene( event )
- local screenGroup = self.view
+ screen = self.view
end
View
@@ -7,8 +7,10 @@ local radlib = require "scripts.lib.radlib"
---------------------------------------------------------------------------------
-- BEGINNING OF YOUR IMPLEMENTATION
---------------------------------------------------------------------------------
+local screen = nil
+
function scene:createScene( event )
- local screenGroup = self.view
+ screen = self.view
end

0 comments on commit 2d1dc12

Please sign in to comment.