Guest User

Untitled

a guest
May 20th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. -- Screen.lua
  2.  
  3. module(..., package.seeall)
  4.  
  5. require( "camera" )
  6.  
  7. -- Create the scene group
  8. local self = display.newGroup()
  9.  
  10. new = function( params )
  11.  
  12.     -- Create the camera
  13.     self.camera = Camera:new
  14.  
  15.     -- Insert the camera's view into the scene group
  16.     self:insert( self.camera:getView() )
  17.  
  18.     -- Create a player image to go in the camera
  19.     self.player = display.newImage( "player.png" )
  20.  
  21.     -- Insert the player into the camera
  22.     camera:addObject( self.player )
  23.  
  24.     -- Create two images making sure to insert them into the scene group "self" but not the camera
  25.     self.hudImage1 = display.newImage( self, "image1.png" )
  26.     self.hudImage2 = display.newImage( self, "image1.png" )
  27.  
  28.     -- Return the scene group
  29.     return self
  30.  
  31. end
Add Comment
Please, Sign In to add comment