Skip to content

Commit

Permalink
updated camera-fitter sample
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Meehan committed Dec 6, 2018
1 parent a9cf617 commit 5b8d5a9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 52 deletions.
16 changes: 8 additions & 8 deletions samples/camera-fitter/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ viewport = MOAIViewport.new ()
viewport:setSize ( 320, 480 )
viewport:setScale ( 320, 480 )

camera = MOAICamera2D.new ()
camera = MOAICamera.new ()

layer = MOAIPartitionViewLayer.new ()
layer:setViewport ( viewport )
Expand All @@ -24,13 +24,13 @@ fitter:setBounds ( -1000, -64, 1000, 10000 )
fitter:setMin ( 256 )
fitter:start ()

gfxQuad = MOAIGfxQuad2D.new ()
gfxQuad:setTexture ( "moai.png" )
gfxQuad:setRect ( -64, -64, 64, 64 )
spriteDeck = MOAISpriteDeck2D.new ()
spriteDeck:setTexture ( '../resources/moai.png' )
spriteDeck:setRect ( -64, -64, 64, 64 )

prop = MOAIProp.new ()
prop:setDeck ( gfxQuad )
prop:moveLoc ( 256, 0, 3 )
prop:setDeck ( spriteDeck )
prop:moveLoc ( 256, 0, 0, 3 )
prop:setPartition ( layer )

anchor = MOAICameraAnchor2D.new ()
Expand All @@ -39,8 +39,8 @@ anchor:setRect ( -64, -64, 64, 64 )
fitter:insertAnchor ( anchor )

prop = MOAIProp.new ()
prop:setDeck ( gfxQuad )
prop:moveLoc ( -256, 0, 3 )
prop:setDeck ( spriteDeck )
prop:moveLoc ( -256, 0, 0, 3 )
prop:setPartition ( layer )

anchor = MOAICameraAnchor2D.new ()
Expand Down
Binary file removed samples/camera-fitter/moai.png
Binary file not shown.
24 changes: 0 additions & 24 deletions samples/camera-fitter/run.bat

This file was deleted.

20 changes: 0 additions & 20 deletions samples/camera-fitter/run.sh

This file was deleted.

0 comments on commit 5b8d5a9

Please sign in to comment.