Permalink
Browse files

fix build; remove debug logs; add README

  • Loading branch information...
1 parent deac2a6 commit b96b7b4b921edf97e7f082f8bdfa2b2e323c18a1 @siuying committed May 10, 2012
Showing with 6 additions and 7 deletions.
  1. +3 −0 README.md
  2. +1 −1 Rakefile
  3. +1 −4 app/app_delegate.rb
  4. +1 −2 app/game/game_controller.rb
View
3 README.md
@@ -0,0 +1,3 @@
+# README
+
+Demo to use Sparrow Framework - iOS opensource engine - on RubyMotion.
View
2 Rakefile
@@ -9,5 +9,5 @@ Motion::Project::App.setup do |app|
dependency 'Sparrow-Framework'
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
View
5 app/app_delegate.rb
@@ -8,18 +8,15 @@ def application(application, didFinishLaunchingWithOptions:launchOptions)
SPStage.setSupportHighResolutions(true, doubleOnPad: true)
width = ipad? ? 384 : 320
height = ipad? ? 512 : 480
-
- $stderr.puts "setup sparrowView"
+
@sparrowView = SPView.alloc.initWithFrame(screenBounds)
@sparrowView.multipleTouchEnabled = false
@sparrowView.frameRate = 30
@window.addSubview(@sparrowView)
- $stderr.puts "setup gameController"
@gameController = GameController.new(width, height)
@sparrowView.stage = @gameController
- $stderr.puts "setup viewController"
@viewController = ViewController.new(@sparrowView)
if @window.respondsToSelector(:"setRootViewController:")
@window.setRootViewController(@viewController)
View
3 app/game/game_controller.rb
@@ -19,8 +19,7 @@ def self.new(width, height)
gc.game.x = width / 2
gc.game.y = height / 2
gc.rotateToInterfaceOrientation(orientation, animationTime:0)
-
- $stderr.puts "GameController.addChild"
+
gc.addChild(gc.game)
gc
end

0 comments on commit b96b7b4

Please sign in to comment.