Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Screen.lua
- module(..., package.seeall)
- require( "camera" )
- -- Create the scene group
- local self = display.newGroup()
- new = function( params )
- -- Create the camera
- self.camera = Camera:new
- -- Insert the camera's view into the scene group
- self:insert( self.camera:getView() )
- -- Create a player image to go in the camera
- self.player = display.newImage( "player.png" )
- -- Insert the player into the camera
- camera:addObject( self.player )
- -- Create two images making sure to insert them into the scene group "self" but not the camera
- self.hudImage1 = display.newImage( self, "image1.png" )
- self.hudImage2 = display.newImage( self, "image1.png" )
- -- Return the scene group
- return self
- end
Add Comment
Please, Sign In to add comment