Skip to content

Commit

Permalink
fix build; remove debug logs; add README
Browse files Browse the repository at this point in the history
  • Loading branch information
siuying committed May 10, 2012
1 parent deac2a6 commit b96b7b4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
3 changes: 3 additions & 0 deletions README.md
@@ -0,0 +1,3 @@
# README

Demo to use Sparrow Framework - iOS opensource engine - on RubyMotion.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -9,5 +9,5 @@ Motion::Project::App.setup do |app|
dependency 'Sparrow-Framework' dependency 'Sparrow-Framework'
end end


app.files_dependencies "app/models/game.rb" => "app/supports/object_ext.rb" app.files_dependencies "app/game/game.rb" => "app/supports/number_ext.rb"
end end
5 changes: 1 addition & 4 deletions app/app_delegate.rb
Expand Up @@ -8,18 +8,15 @@ def application(application, didFinishLaunchingWithOptions:launchOptions)
SPStage.setSupportHighResolutions(true, doubleOnPad: true) SPStage.setSupportHighResolutions(true, doubleOnPad: true)
width = ipad? ? 384 : 320 width = ipad? ? 384 : 320
height = ipad? ? 512 : 480 height = ipad? ? 512 : 480


$stderr.puts "setup sparrowView"
@sparrowView = SPView.alloc.initWithFrame(screenBounds) @sparrowView = SPView.alloc.initWithFrame(screenBounds)
@sparrowView.multipleTouchEnabled = false @sparrowView.multipleTouchEnabled = false
@sparrowView.frameRate = 30 @sparrowView.frameRate = 30
@window.addSubview(@sparrowView) @window.addSubview(@sparrowView)


$stderr.puts "setup gameController"
@gameController = GameController.new(width, height) @gameController = GameController.new(width, height)
@sparrowView.stage = @gameController @sparrowView.stage = @gameController


$stderr.puts "setup viewController"
@viewController = ViewController.new(@sparrowView) @viewController = ViewController.new(@sparrowView)
if @window.respondsToSelector(:"setRootViewController:") if @window.respondsToSelector(:"setRootViewController:")
@window.setRootViewController(@viewController) @window.setRootViewController(@viewController)
Expand Down
3 changes: 1 addition & 2 deletions app/game/game_controller.rb
Expand Up @@ -19,8 +19,7 @@ def self.new(width, height)
gc.game.x = width / 2 gc.game.x = width / 2
gc.game.y = height / 2 gc.game.y = height / 2
gc.rotateToInterfaceOrientation(orientation, animationTime:0) gc.rotateToInterfaceOrientation(orientation, animationTime:0)


$stderr.puts "GameController.addChild"
gc.addChild(gc.game) gc.addChild(gc.game)
gc gc
end end
Expand Down

0 comments on commit b96b7b4

Please sign in to comment.