joybox 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/LICENSE +1 -1
- data/LICENSE_Box2D +20 -0
- data/LICENSE_Cocos2D +24 -0
- data/README.md +34 -66
- data/Rakefile +2 -3
- data/bin/joybox +49 -0
- data/command/joybox/USAGE +24 -0
- data/command/joybox/templates/layer.erb +11 -0
- data/command/joybox/templates/layer_spec.erb +3 -0
- data/command/joybox/templates/scene.erb +11 -0
- data/command/joybox/templates/scene_spec.erb +3 -0
- data/command/joybox/templates/sprite.erb +11 -0
- data/command/joybox/templates/sprite_spec.erb +3 -0
- data/command/joybox_generate_command.rb +114 -0
- data/joybox.gemspec +44 -0
- data/lib/joybox/joybox-ios.rb +47 -0
- data/lib/joybox/joybox-osx.rb +47 -0
- data/lib/joybox/version.rb +1 -1
- data/lib/joybox.rb +18 -36
- data/{lib/joybox/cocos2d → motion/joybox}/actions/actions.rb +0 -0
- data/motion/joybox/actions/animate.rb +22 -0
- data/motion/joybox/actions/bezier.rb +33 -0
- data/motion/joybox/actions/blink.rb +24 -0
- data/motion/joybox/actions/ease.rb +149 -0
- data/motion/joybox/actions/fade.rb +38 -0
- data/motion/joybox/actions/jump.rb +39 -0
- data/{lib/joybox/cocos2d → motion/joybox}/actions/move.rb +4 -2
- data/motion/joybox/actions/place.rb +22 -0
- data/{lib/joybox/cocos2d → motion/joybox}/actions/repeat.rb +10 -1
- data/{lib/joybox/cocos2d → motion/joybox}/actions/rotate.rb +4 -2
- data/{lib/joybox/cocos2d → motion/joybox}/actions/scale.rb +4 -2
- data/{lib/joybox/cocos2d → motion/joybox}/actions/sequence.rb +3 -3
- data/{lib/joybox/cocos2d → motion/joybox}/actions/skew.rb +0 -0
- data/motion/joybox/actions/spawn.rb +22 -0
- data/motion/joybox/actions/tint.rb +37 -0
- data/motion/joybox/animations/animation.rb +60 -0
- data/{lib/joybox/cocos2d → motion/joybox}/common/color.rb +12 -1
- data/{lib/joybox/cocos2d → motion/joybox}/common/gc_size.rb +4 -4
- data/{lib/joybox/cocos2d → motion/joybox}/common/ns_set.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/common/numeric.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/common/screen.rb +4 -4
- data/motion/joybox/core/layer.rb +51 -0
- data/{lib/joybox/cocos2d → motion/joybox}/core/node.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/core/scene.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/core/sprite.rb +22 -3
- data/{lib/joybox/cocos2d → motion/joybox}/core/sprite_batch.rb +0 -0
- data/motion/joybox/core/sprite_frame_cache.rb +147 -0
- data/{lib/joybox/cocos2d/cocos2d.rb → motion/joybox/joybox.rb} +3 -1
- data/{lib/joybox/cocos2d → motion/joybox}/macros.rb +0 -0
- data/{lib/joybox/box2d → motion/joybox/physics}/body.rb +44 -17
- data/{lib/joybox/cocos2d/core → motion/joybox/physics}/physics_sprite.rb +1 -1
- data/motion/joybox/physics/world.rb +79 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/label.rb +3 -2
- data/{lib/joybox/cocos2d → motion/joybox}/ui/menu.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/menu_image.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/menu_label.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/ui.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/common/cg_point.rb +9 -2
- data/{lib/joybox/cocos2d → motion/joybox-ios}/common/ui_touch.rb +1 -1
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/configuration.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/file_utils.rb +0 -3
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/gl_view.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/texture_2d.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/core/layer.rb +1 -45
- data/{lib/joybox/cocos2d → motion/joybox-ios}/director.rb +6 -6
- data/motion/joybox-osx/common/ats_point.rb +48 -0
- data/motion/joybox-osx/common/ns_event.rb +8 -0
- data/motion/joybox-osx/configuration/configuration.rb +46 -0
- data/motion/joybox-osx/configuration/gl_view.rb +57 -0
- data/motion/joybox-osx/core/layer.rb +135 -0
- data/motion/joybox-osx/director.rb +42 -0
- data/template/joybox-ios/files/Rakefile.erb +9 -0
- data/{app → template/joybox-ios/files/app}/app_delegate.rb +1 -5
- data/{resources → template/joybox-ios/files/resources}/fps_images-hd.png +0 -0
- data/{resources → template/joybox-ios/files/resources}/fps_images-ipadhd.png +0 -0
- data/{resources → template/joybox-ios/files/resources}/fps_images.png +0 -0
- data/template/joybox-ios/files/spec/main_spec.rb.erb +9 -0
- data/template/joybox-osx/files/Rakefile.erb +9 -0
- data/template/joybox-osx/files/app/app_delegate.rb +23 -0
- data/template/joybox-osx/files/app/layers/default_layer.rb +5 -0
- data/template/joybox-osx/files/app/menu.rb +51 -0
- data/template/joybox-osx/files/resources/Credits.rtf +29 -0
- data/template/joybox-osx/files/resources/fps_images-hd.png +0 -0
- data/template/joybox-osx/files/resources/fps_images-ipadhd.png +0 -0
- data/template/joybox-osx/files/resources/fps_images.png +0 -0
- data/template/joybox-osx/files/spec/main_spec.rb.erb +9 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Box2D +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Box2D.framework.bridgesupport +47 -37
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Box2D +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/B2DContactListener.h +0 -0
- data/vendor/vendor-ios/Box2D.framework/Versions/A/Headers/Collision/Shapes/B2DCircleShape.h +16 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DEdgeShape.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DPolygonShape.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DShape.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Dynamics/B2DBody.h +6 -6
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Dynamics/B2DWorld.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Resources/Box2DConfig.cmake +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Resources/CMakeLists.txt +0 -0
- data/vendor/vendor-ios/Box2D.framework/Versions/A/Resources/LICENSE +22 -0
- data/vendor/vendor-ios/cocos_2d/cocos_2d.bridgesupport +9154 -0
- data/vendor/vendor-ios/cocos_2d/cocos_2d_exceptions.bridgesupport +39 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAction.h +23 -23
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionCamera.h +21 -19
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionCatmullRom.h +18 -6
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionEase.h +117 -31
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionGrid.h +19 -17
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionGrid3D.h +45 -42
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionInstant.h +21 -13
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionInterval.h +123 -81
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionManager.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionPageTurn3D.h +2 -1
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionProgressTimer.h +4 -4
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionTiledGrid.h +46 -38
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionTween.h +3 -3
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAnimation.h +8 -8
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAnimationCache.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAtlasNode.h +19 -17
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCCamera.h +12 -12
- data/vendor/vendor-ios/cocos_2d/include/CCClippingNode.h +77 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCConfiguration.h +31 -13
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCDirector.h +51 -42
- data/vendor/vendor-ios/cocos_2d/include/CCDrawNode.h +65 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCDrawingPrimitives.h +42 -8
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGLProgram.h +56 -21
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGrabber.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGrid.h +29 -29
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelAtlas.h +5 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelBMFont.h +56 -32
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelTTF.h +20 -20
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLayer.h +107 -79
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMenu.h +10 -14
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMenuItem.h +37 -32
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMotionStreak.h +18 -19
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCNode+Debug.h +0 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCNode.h +87 -37
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParallaxNode.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleBatchNode.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleExamples.h +22 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleSystem.h +51 -40
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleSystemQuad.h +4 -4
- data/vendor/vendor-ios/cocos_2d/include/CCPhysicsDebugNode.h +58 -0
- data/vendor/vendor-ios/cocos_2d/include/CCPhysicsSprite.h +82 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCProgressTimer.h +9 -11
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCProtocols.h +54 -26
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCRenderTexture.h +29 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCScene.h +4 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCScheduler.h +94 -40
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCShaderCache.h +1 -1
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSprite.h +21 -28
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteBatchNode.h +16 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteFrame.h +10 -10
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteFrameCache.h +6 -6
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXLayer.h +16 -16
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXObjectGroup.h +4 -4
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXTiledMap.h +9 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXXMLParser.h +44 -33
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTexture2D.h +17 -25
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTextureAtlas.h +10 -10
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTextureCache.h +4 -4
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTexturePVR.h +25 -8
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTileMapAtlas.h +6 -6
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransition.h +57 -12
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransitionPageTurn.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransitionProgress.h +27 -5
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms}/CCGL.h +4 -2
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms}/CCNS.h +0 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCDirectorMac.h +110 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCEventDispatcher.h +343 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCGLView.h +103 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCWindow.h +41 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCDirectorIOS.h +12 -5
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCES2Renderer.h +12 -12
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCESRenderer.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCGLView.h +28 -13
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchDelegateProtocol.h +4 -4
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchDispatcher.h +2 -2
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchHandler.h +7 -7
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCArray.h +1 -1
- data/vendor/vendor-ios/cocos_2d/include/Support/CCFileUtils.h +394 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCProfiling.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCVertex.h +1 -1
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CGPointExtension.h +4 -2
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/NSThread+performBlock.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/OpenGL_Internal.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/TGAlib.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/TransformUtils.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ZipUtils.h +4 -4
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/base64.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ccCArray.h +15 -15
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ccUtils.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/uthash.h +129 -184
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/utlist.h +298 -55
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccConfig.h +56 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccDeprecated.h +131 -0
- data/vendor/vendor-ios/cocos_2d/include/ccFPSImages.h +39 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccGLStateCache.h +44 -26
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccMacros.h +9 -9
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColorLengthTexture_frag.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColorLengthTexture_vert.h +47 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColor_frag.h +37 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColor_vert.h +40 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureA8Color_frag.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureA8Color_vert.h +45 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColorAlphaTest_frag.h +47 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColor_frag.h +39 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColor_vert.h +45 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_frag.h +38 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_uColor_frag.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_uColor_vert.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_vert.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_Position_uColor_frag.h +37 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_Position_uColor_vert.h +43 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccShaders.h +11 -0
- data/vendor/vendor-ios/cocos_2d/include/ccTypes.h +392 -0
- data/vendor/vendor-ios/cocos_2d/include/cocos2d-ios-exceptions.bridgesupport +39 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/cocos2d.h +28 -3
- data/vendor/vendor-ios/cocos_2d/include/gen_cocos2d_bridgesupport.sh +17 -0
- data/vendor/vendor-ios/cocos_2d/include/gen_cocos2d_complement.sh +17 -0
- data/vendor/vendor-ios/cocos_2d/libcocos2d.a +0 -0
- data/vendor/vendor-osx/box_2d/box_2d.bridgesupport +176 -0
- data/vendor/vendor-osx/box_2d/include/B2DBody.h +46 -0
- data/vendor/vendor-osx/box_2d/include/B2DCircleShape.h +16 -0
- data/vendor/vendor-osx/box_2d/include/B2DContactListener.h +30 -0
- data/vendor/vendor-osx/box_2d/include/B2DEdgeShape.h +17 -0
- data/vendor/vendor-osx/box_2d/include/B2DPolygonShape.h +16 -0
- data/vendor/vendor-osx/box_2d/include/B2DShape.h +18 -0
- data/vendor/vendor-osx/box_2d/include/B2DWorld.h +44 -0
- data/vendor/vendor-osx/box_2d/libBox2D.a +0 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d.bridgesupport +8292 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAction.h +195 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionCamera.h +75 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionCatmullRom.h +151 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionEase.h +245 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionGrid.h +167 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionGrid3D.h +208 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionInstant.h +235 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionInterval.h +473 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionManager.h +113 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionPageTurn3D.h +43 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionProgressTimer.h +59 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionTiledGrid.h +219 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionTween.h +62 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAnimation.h +150 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAnimationCache.h +74 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAtlasNode.h +98 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCCamera.h +98 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCClippingNode.h +77 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCConfiguration.h +144 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDirector.h +353 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDrawNode.h +65 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDrawingPrimitives.h +173 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGLProgram.h +185 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGrabber.h +44 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGrid.h +130 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelAtlas.h +71 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelBMFont.h +240 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelTTF.h +132 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLayer.h +308 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMenu.h +96 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMenuItem.h +428 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMotionStreak.h +86 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCNode+Debug.h +39 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCNode.h +619 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParallaxNode.h +50 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleBatchNode.h +99 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleExamples.h +117 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleSystem.h +464 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleSystemQuad.h +73 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCPhysicsDebugNode.h +58 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCPhysicsSprite.h +82 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCProgressTimer.h +92 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCProtocols.h +160 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCRenderTexture.h +159 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCScene.h +47 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCScheduler.h +284 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCShaderCache.h +60 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSprite.h +281 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteBatchNode.h +145 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteFrame.h +126 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteFrameCache.h +121 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXLayer.h +164 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXObjectGroup.h +67 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXTiledMap.h +145 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXXMLParser.h +228 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTexture2D.h +349 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTextureAtlas.h +188 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTextureCache.h +146 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTexturePVR.h +146 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTileMapAtlas.h +83 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransition.h +341 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransitionPageTurn.h +60 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransitionProgress.h +84 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/CCGL.h +74 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/CCNS.h +54 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCDirectorMac.h +110 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCEventDispatcher.h +343 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCGLView.h +103 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCWindow.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCArray.h +119 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCFileUtils.h +394 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCProfiling.h +89 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCVertex.h +36 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CGPointExtension.h +346 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/NSThread+performBlock.h +22 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/OpenGL_Internal.h +86 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/TGAlib.h +55 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/TransformUtils.h +36 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ZipUtils.h +91 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/base64.h +33 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ccCArray.h +229 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ccUtils.h +36 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/uthash.h +917 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/utlist.h +733 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccConfig.h +292 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccDeprecated.h +431 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccFPSImages.h +39 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccGLStateCache.h +156 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccMacros.h +353 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColorLengthTexture_frag.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColorLengthTexture_vert.h +47 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColor_frag.h +37 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColor_vert.h +40 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureA8Color_frag.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureA8Color_vert.h +45 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColorAlphaTest_frag.h +47 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColor_frag.h +39 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColor_vert.h +45 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_frag.h +38 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_uColor_frag.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_uColor_vert.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_vert.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_Position_uColor_frag.h +37 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_Position_uColor_vert.h +43 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShaders.h +56 -0
- data/vendor/{Cocos2D/include → vendor-osx/cocos_2d/cocos_2d_include}/ccTypes.h +39 -35
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/cocos2d.h +203 -0
- data/vendor/vendor-osx/cocos_2d/libcocos2d.a +0 -0
- metadata +363 -195
- data/app/layers/box2d_layer.rb +0 -109
- data/app/layers/cocos2d_layer.rb +0 -14
- data/app/layers/cocos_motion_layer.rb +0 -145
- data/app/layers/menu_layer.rb +0 -59
- data/lib/joybox/box2d/world.rb +0 -79
- data/resources/box2d/blocks_sprite_sheet.png +0 -0
- data/resources/cocos_motion/dot.png +0 -0
- data/resources/cocos_motion/dot_selected.png +0 -0
- data/resources/cocos_motion/grossini.png +0 -0
- data/resources/cocos_motion/grossinis_sister.png +0 -0
- data/resources/cocos_motion/grossinis_sister_two.png +0 -0
- data/resources/cocos_motion/left_arrow.png +0 -0
- data/resources/cocos_motion/left_arrow_selected.png +0 -0
- data/resources/cocos_motion/right_arrow.png +0 -0
- data/resources/cocos_motion/right_arrow_selected.png +0 -0
- data/vendor/Cocos2D/Cocos2D.bridgesupport +0 -7808
- data/vendor/Cocos2D/include/CCFileUtils.h +0 -188
- data/vendor/Cocos2D/include/CocosDenshion/CDAudioManager.h +0 -243
- data/vendor/Cocos2D/include/CocosDenshion/CDConfig.h +0 -60
- data/vendor/Cocos2D/include/CocosDenshion/CDOpenALSupport.h +0 -77
- data/vendor/Cocos2D/include/CocosDenshion/CDXPropertyModifierAction.h +0 -45
- data/vendor/Cocos2D/include/CocosDenshion/CocosDenshion.h +0 -440
- data/vendor/Cocos2D/include/CocosDenshion/SimpleAudioEngine.h +0 -90
- data/vendor/Cocos2D/include/RubyMotionSchedule.h +0 -7
- data/vendor/Cocos2D/include/ccShader_PositionColor_frag.h +0 -12
- data/vendor/Cocos2D/include/ccShader_PositionColor_vert.h +0 -17
- data/vendor/Cocos2D/include/ccShader_PositionTextureA8Color_frag.h +0 -16
- data/vendor/Cocos2D/include/ccShader_PositionTextureA8Color_vert.h +0 -21
- data/vendor/Cocos2D/include/ccShader_PositionTextureColorAlphaTest_frag.h +0 -23
- data/vendor/Cocos2D/include/ccShader_PositionTextureColor_frag.h +0 -14
- data/vendor/Cocos2D/include/ccShader_PositionTextureColor_vert.h +0 -22
- data/vendor/Cocos2D/include/ccShader_PositionTexture_frag.h +0 -13
- data/vendor/Cocos2D/include/ccShader_PositionTexture_uColor_frag.h +0 -16
- data/vendor/Cocos2D/include/ccShader_PositionTexture_uColor_vert.h +0 -18
- data/vendor/Cocos2D/include/ccShader_PositionTexture_vert.h +0 -17
- data/vendor/Cocos2D/include/ccShader_Position_uColor_frag.h +0 -12
- data/vendor/Cocos2D/include/ccShader_Position_uColor_vert.h +0 -19
- data/vendor/Cocos2D/include/kazmath/GL/mat4stack.h +0 -51
- data/vendor/Cocos2D/include/kazmath/GL/matrix.h +0 -58
- data/vendor/Cocos2D/include/kazmath/aabb.h +0 -53
- data/vendor/Cocos2D/include/kazmath/kazmath.h +0 -39
- data/vendor/Cocos2D/include/kazmath/mat3.h +0 -75
- data/vendor/Cocos2D/include/kazmath/mat4.h +0 -93
- data/vendor/Cocos2D/include/kazmath/neon_matrix_impl.h +0 -41
- data/vendor/Cocos2D/include/kazmath/plane.h +0 -70
- data/vendor/Cocos2D/include/kazmath/quaternion.h +0 -113
- data/vendor/Cocos2D/include/kazmath/ray2.h +0 -50
- data/vendor/Cocos2D/include/kazmath/utility.h +0 -74
- data/vendor/Cocos2D/include/kazmath/vec2.h +0 -64
- data/vendor/Cocos2D/include/kazmath/vec3.h +0 -68
- data/vendor/Cocos2D/include/kazmath/vec4.h +0 -68
- data/vendor/Cocos2D/libCocosDenshion.a +0 -0
- data/vendor/Cocos2D/libcocos2d.a +0 -0
@@ -0,0 +1,343 @@
|
|
1
|
+
/*
|
2
|
+
* cocos2d for iPhone: http://www.cocos2d-iphone.org
|
3
|
+
*
|
4
|
+
* Copyright (c) 2010 Ricardo Quesada
|
5
|
+
* Copyright (c) 2011 Zynga Inc.
|
6
|
+
*
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
12
|
+
* furnished to do so, subject to the following conditions:
|
13
|
+
*
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
15
|
+
* all copies or substantial portions of the Software.
|
16
|
+
*
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
+
* THE SOFTWARE.
|
24
|
+
*/
|
25
|
+
|
26
|
+
// Only compile this code on Mac. These files should not be included on your iOS project.
|
27
|
+
// But in case they are included, it won't be compiled.
|
28
|
+
#import "../../ccMacros.h"
|
29
|
+
#ifdef __CC_PLATFORM_MAC
|
30
|
+
|
31
|
+
#import <Cocoa/Cocoa.h>
|
32
|
+
|
33
|
+
#import "CCGLView.h"
|
34
|
+
#import "../../Support/uthash.h" // hack: uthash needs to be imported before utlist to prevent warning
|
35
|
+
#import "../../Support/utlist.h"
|
36
|
+
#import "../../ccConfig.h"
|
37
|
+
|
38
|
+
#pragma mark -
|
39
|
+
#pragma mark CCMouseEventDelegate
|
40
|
+
|
41
|
+
/** CCMouseEventDelegate protocol.
|
42
|
+
Implement it in your node to receive any of mouse events
|
43
|
+
*/
|
44
|
+
@protocol CCMouseEventDelegate <NSObject>
|
45
|
+
@optional
|
46
|
+
|
47
|
+
//
|
48
|
+
// left
|
49
|
+
//
|
50
|
+
/** called when the "mouseDown" event is received.
|
51
|
+
Return YES to avoid propagating the event to other delegates.
|
52
|
+
*/
|
53
|
+
-(BOOL) ccMouseDown:(NSEvent*)event;
|
54
|
+
|
55
|
+
/** called when the "mouseDragged" event is received.
|
56
|
+
Return YES to avoid propagating the event to other delegates.
|
57
|
+
*/
|
58
|
+
-(BOOL) ccMouseDragged:(NSEvent*)event;
|
59
|
+
|
60
|
+
/** called when the "mouseMoved" event is received.
|
61
|
+
Return YES to avoid propagating the event to other delegates.
|
62
|
+
By default, "mouseMoved" is disabled. To enable it, send the "setAcceptsMouseMovedEvents:YES" message to the main window.
|
63
|
+
*/
|
64
|
+
-(BOOL) ccMouseMoved:(NSEvent*)event;
|
65
|
+
|
66
|
+
/** called when the "mouseUp" event is received.
|
67
|
+
Return YES to avoid propagating the event to other delegates.
|
68
|
+
*/
|
69
|
+
-(BOOL) ccMouseUp:(NSEvent*)event;
|
70
|
+
|
71
|
+
|
72
|
+
//
|
73
|
+
// right
|
74
|
+
//
|
75
|
+
|
76
|
+
/** called when the "rightMouseDown" event is received.
|
77
|
+
Return YES to avoid propagating the event to other delegates.
|
78
|
+
*/
|
79
|
+
-(BOOL) ccRightMouseDown:(NSEvent*)event;
|
80
|
+
|
81
|
+
/** called when the "rightMouseDragged" event is received.
|
82
|
+
Return YES to avoid propagating the event to other delegates.
|
83
|
+
*/
|
84
|
+
-(BOOL) ccRightMouseDragged:(NSEvent*)event;
|
85
|
+
|
86
|
+
/** called when the "rightMouseUp" event is received.
|
87
|
+
Return YES to avoid propagating the event to other delegates.
|
88
|
+
*/
|
89
|
+
-(BOOL) ccRightMouseUp:(NSEvent*)event;
|
90
|
+
|
91
|
+
//
|
92
|
+
// other
|
93
|
+
//
|
94
|
+
|
95
|
+
/** called when the "otherMouseDown" event is received.
|
96
|
+
Return YES to avoid propagating the event to other delegates.
|
97
|
+
*/
|
98
|
+
-(BOOL) ccOtherMouseDown:(NSEvent*)event;
|
99
|
+
|
100
|
+
/** called when the "otherMouseDragged" event is received.
|
101
|
+
Return YES to avoid propagating the event to other delegates.
|
102
|
+
*/
|
103
|
+
-(BOOL) ccOtherMouseDragged:(NSEvent*)event;
|
104
|
+
|
105
|
+
/** called when the "otherMouseUp" event is received.
|
106
|
+
Return YES to avoid propagating the event to other delegates.
|
107
|
+
*/
|
108
|
+
-(BOOL) ccOtherMouseUp:(NSEvent*)event;
|
109
|
+
|
110
|
+
//
|
111
|
+
// scroll wheel
|
112
|
+
//
|
113
|
+
|
114
|
+
/** called when the "scrollWheel" event is received.
|
115
|
+
Return YES to avoid propagating the event to other delegates.
|
116
|
+
*/
|
117
|
+
- (BOOL)ccScrollWheel:(NSEvent *)theEvent;
|
118
|
+
|
119
|
+
|
120
|
+
//
|
121
|
+
// enter / exit
|
122
|
+
//
|
123
|
+
|
124
|
+
/** called when the "mouseEntered" event is received.
|
125
|
+
Return YES to avoid propagating the event to other delegates.
|
126
|
+
*/
|
127
|
+
- (void)ccMouseEntered:(NSEvent *)theEvent;
|
128
|
+
|
129
|
+
/** called when the "mouseExited" event is received.
|
130
|
+
Return YES to avoid propagating the event to other delegates.
|
131
|
+
*/
|
132
|
+
- (void)ccMouseExited:(NSEvent *)theEvent;
|
133
|
+
|
134
|
+
@end
|
135
|
+
|
136
|
+
#pragma mark -
|
137
|
+
#pragma mark CCKeyboardEventDelegate
|
138
|
+
|
139
|
+
/** CCKeyboardEventDelegate protocol.
|
140
|
+
Implement it in your node to receive any of keyboard events
|
141
|
+
*/
|
142
|
+
@protocol CCKeyboardEventDelegate <NSObject>
|
143
|
+
@optional
|
144
|
+
/** called when the "keyUp" event is received.
|
145
|
+
Return YES to avoid propagating the event to other delegates.
|
146
|
+
*/
|
147
|
+
-(BOOL) ccKeyUp:(NSEvent*)event;
|
148
|
+
|
149
|
+
/** called when the "keyDown" event is received.
|
150
|
+
Return YES to avoid propagating the event to other delegates.
|
151
|
+
*/
|
152
|
+
-(BOOL) ccKeyDown:(NSEvent*)event;
|
153
|
+
/** called when the "flagsChanged" event is received.
|
154
|
+
Return YES to avoid propagating the event to other delegates.
|
155
|
+
*/
|
156
|
+
-(BOOL) ccFlagsChanged:(NSEvent*)event;
|
157
|
+
@end
|
158
|
+
|
159
|
+
#pragma mark -
|
160
|
+
#pragma mark CCTouchEventDelegate
|
161
|
+
|
162
|
+
/** CCTouchEventDelegate protocol.
|
163
|
+
Implement it in your node to receive any of touch events
|
164
|
+
*/
|
165
|
+
@protocol CCTouchEventDelegate <NSObject>
|
166
|
+
@optional
|
167
|
+
/** called when the "touchesBegan" event is received.
|
168
|
+
Return YES to avoid propagating the event to other delegates.
|
169
|
+
*/
|
170
|
+
- (BOOL)ccTouchesBeganWithEvent:(NSEvent *)event;
|
171
|
+
|
172
|
+
/** called when the "touchesMoved" event is received.
|
173
|
+
Return YES to avoid propagating the event to other delegates.
|
174
|
+
*/
|
175
|
+
- (BOOL)ccTouchesMovedWithEvent:(NSEvent *)event;
|
176
|
+
|
177
|
+
/** called when the "touchesEnded" event is received.
|
178
|
+
Return YES to avoid propagating the event to other delegates.
|
179
|
+
*/
|
180
|
+
- (BOOL)ccTouchesEndedWithEvent:(NSEvent *)event;
|
181
|
+
|
182
|
+
/** called when the "touchesCancelled" event is received.
|
183
|
+
Return YES to avoid propagating the event to other delegates.
|
184
|
+
*/
|
185
|
+
- (BOOL)ccTouchesCancelledWithEvent:(NSEvent *)event;
|
186
|
+
|
187
|
+
@end
|
188
|
+
|
189
|
+
#pragma mark -
|
190
|
+
#pragma mark CCGestureEventDelegate
|
191
|
+
|
192
|
+
/** CCGestureEventDelegate protocol.
|
193
|
+
Implement it in your node to receive any of gesture events
|
194
|
+
*/
|
195
|
+
@protocol CCGestureEventDelegate <NSObject>
|
196
|
+
@optional
|
197
|
+
|
198
|
+
/** called when the "beginGesture" event is received.
|
199
|
+
Return YES to avoid propagating the event to other delegates.
|
200
|
+
*/
|
201
|
+
- (BOOL)ccBeginGestureWithEvent:(NSEvent *)event;
|
202
|
+
|
203
|
+
/** called when the "magnify" gesture event is received.
|
204
|
+
Return YES to avoid propagating the event to other delegates.
|
205
|
+
*/
|
206
|
+
- (BOOL)ccMagnifyWithEvent:(NSEvent *)event;
|
207
|
+
|
208
|
+
/** called when the "smartMagnify" gesture event is received.
|
209
|
+
Return YES to avoid propagating the event to other delegates.
|
210
|
+
*/
|
211
|
+
- (BOOL)ccSmartMagnifyWithEvent:(NSEvent *)event;
|
212
|
+
|
213
|
+
/** called when the "rotate" gesture event is received.
|
214
|
+
Return YES to avoid propagating the event to other delegates.
|
215
|
+
*/
|
216
|
+
- (BOOL)ccRotateWithEvent:(NSEvent *)event;
|
217
|
+
|
218
|
+
/** called when the "swipe" gesture event is received.
|
219
|
+
Return YES to avoid propagating the event to other delegates.
|
220
|
+
*/
|
221
|
+
- (BOOL)ccSwipeWithEvent:(NSEvent *)event;
|
222
|
+
|
223
|
+
/** called when the "endGesture" event is received.
|
224
|
+
Return YES to avoid propagating the event to other delegates.
|
225
|
+
*/
|
226
|
+
- (BOOL)ccEndGestureWithEvent:(NSEvent *)event;
|
227
|
+
|
228
|
+
@end
|
229
|
+
|
230
|
+
#pragma mark - CCEventObject
|
231
|
+
|
232
|
+
@interface CCEventObject : NSObject
|
233
|
+
{
|
234
|
+
@public
|
235
|
+
NSEvent *event;
|
236
|
+
SEL selector;
|
237
|
+
}
|
238
|
+
@end
|
239
|
+
|
240
|
+
#pragma mark - CCEventDispatcher
|
241
|
+
|
242
|
+
struct _listEntry;
|
243
|
+
struct _listDeletedEntry;
|
244
|
+
struct _listAddedEntry;
|
245
|
+
|
246
|
+
/** CCEventDispatcher
|
247
|
+
|
248
|
+
This is object is responsible for dispatching the events:
|
249
|
+
- Mouse events
|
250
|
+
- Keyboard events
|
251
|
+
- Touch events
|
252
|
+
|
253
|
+
Only available on Mac
|
254
|
+
*/
|
255
|
+
@interface CCEventDispatcher : NSObject <CCEventDelegate>
|
256
|
+
{
|
257
|
+
BOOL _dispatchEvents;
|
258
|
+
BOOL _locked;
|
259
|
+
|
260
|
+
struct _listEntry *_keyboardDelegates;
|
261
|
+
struct _listEntry *_mouseDelegates;
|
262
|
+
struct _listEntry *_touchDelegates;
|
263
|
+
struct _listEntry *_gestureDelegates;
|
264
|
+
|
265
|
+
struct _listDeletedEntry *_delegatesToBeRemoved;
|
266
|
+
struct _listAddedEntry *_delegatesToBeAdded;
|
267
|
+
|
268
|
+
}
|
269
|
+
|
270
|
+
@property (nonatomic, readwrite) BOOL dispatchEvents;
|
271
|
+
|
272
|
+
#pragma mark CCEventDispatcher - Mouse
|
273
|
+
|
274
|
+
/** Adds a mouse delegate to the dispatcher's list.
|
275
|
+
Delegates with a lower priority value will be called before higher priority values.
|
276
|
+
All the events will be propagated to all the delegates, unless the one delegate returns YES.
|
277
|
+
|
278
|
+
IMPORTANT: The delegate will be retained.
|
279
|
+
*/
|
280
|
+
-(void) addMouseDelegate:(id<CCMouseEventDelegate>) delegate priority:(NSInteger)priority;
|
281
|
+
|
282
|
+
/** removes a mouse delegate */
|
283
|
+
-(void) removeMouseDelegate:(id) delegate;
|
284
|
+
|
285
|
+
/** Removes all mouse delegates, releasing all the delegates */
|
286
|
+
-(void) removeAllMouseDelegates;
|
287
|
+
|
288
|
+
#pragma mark CCEventDispatcher - Keyboard
|
289
|
+
|
290
|
+
/** Adds a Keyboard delegate to the dispatcher's list.
|
291
|
+
Delegates with a lower priority value will be called before higher priority values.
|
292
|
+
All the events will be propagated to all the delegates, unless the one delegate returns YES.
|
293
|
+
|
294
|
+
IMPORTANT: The delegate will be retained.
|
295
|
+
*/
|
296
|
+
-(void) addKeyboardDelegate:(id<CCKeyboardEventDelegate>) delegate priority:(NSInteger)priority;
|
297
|
+
|
298
|
+
/** removes a mouse delegate */
|
299
|
+
-(void) removeKeyboardDelegate:(id) delegate;
|
300
|
+
|
301
|
+
/** Removes all mouse delegates, releasing all the delegates */
|
302
|
+
-(void) removeAllKeyboardDelegates;
|
303
|
+
|
304
|
+
#pragma mark CCEventDispatcher - Touches
|
305
|
+
|
306
|
+
/** Adds a Touch delegate to the dispatcher's list.
|
307
|
+
Delegates with a lower priority value will be called before higher priority values.
|
308
|
+
All the events will be propagated to all the delegates, unless the one delegate returns YES.
|
309
|
+
|
310
|
+
IMPORTANT: The delegate will be retained.
|
311
|
+
*/
|
312
|
+
- (void)addTouchDelegate:(id<CCTouchEventDelegate>)delegate priority:(NSInteger)priority;
|
313
|
+
|
314
|
+
/** Removes a touch delegate */
|
315
|
+
- (void)removeTouchDelegate:(id) delegate;
|
316
|
+
|
317
|
+
/** Removes all touch delegates, releasing all the delegates */
|
318
|
+
- (void)removeAllTouchDelegates;
|
319
|
+
|
320
|
+
#pragma mark CCEventDispatcher - Gesture
|
321
|
+
|
322
|
+
/** Adds a gesture delegate to the dispatcher's list.
|
323
|
+
Delegates with a lower priority value will be called before higher priority values.
|
324
|
+
All the events will be propagated to all the delegates, unless the one delegate returns YES.
|
325
|
+
|
326
|
+
IMPORTANT: The delegate will be retained.
|
327
|
+
*/
|
328
|
+
- (void)addGestureDelegate:(id<CCGestureEventDelegate>)delegate priority:(NSInteger)priority;
|
329
|
+
|
330
|
+
/** Removes a gesture delegate */
|
331
|
+
- (void)removeGestureDelegate:(id) delegate;
|
332
|
+
|
333
|
+
/** Removes all gesture delegates, releasing all the delegates */
|
334
|
+
- (void)removeAllGestureDelegates;
|
335
|
+
|
336
|
+
#pragma mark CCEventDispatcher - Dispatch
|
337
|
+
|
338
|
+
-(void) dispatchEvent:(CCEventObject*)event;
|
339
|
+
|
340
|
+
@end
|
341
|
+
|
342
|
+
|
343
|
+
#endif // __CC_PLATFORM_MAC
|
@@ -0,0 +1,103 @@
|
|
1
|
+
/*
|
2
|
+
* cocos2d for iPhone: http://www.cocos2d-iphone.org
|
3
|
+
*
|
4
|
+
* Copyright (c) 2010 Ricardo Quesada
|
5
|
+
* Copyright (c) 2011 Zynga Inc.
|
6
|
+
*
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
12
|
+
* furnished to do so, subject to the following conditions:
|
13
|
+
*
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
15
|
+
* all copies or substantial portions of the Software.
|
16
|
+
*
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
+
* THE SOFTWARE.
|
24
|
+
*/
|
25
|
+
|
26
|
+
// Only compile this code on Mac. These files should not be included on your iOS project.
|
27
|
+
// But in case they are included, it won't be compiled.
|
28
|
+
#import "../../ccMacros.h"
|
29
|
+
#ifdef __CC_PLATFORM_MAC
|
30
|
+
|
31
|
+
#import <Cocoa/Cocoa.h>
|
32
|
+
|
33
|
+
#import "../../ccConfig.h"
|
34
|
+
|
35
|
+
//PROTOCOLS:
|
36
|
+
|
37
|
+
@protocol CCEventDelegate <NSObject>
|
38
|
+
// Mouse
|
39
|
+
- (void)mouseDown:(NSEvent *)theEvent;
|
40
|
+
- (void)mouseUp:(NSEvent *)theEvent;
|
41
|
+
- (void)mouseMoved:(NSEvent *)theEvent;
|
42
|
+
- (void)mouseDragged:(NSEvent *)theEvent;
|
43
|
+
- (void)rightMouseDown:(NSEvent*)event;
|
44
|
+
- (void)rightMouseDragged:(NSEvent*)event;
|
45
|
+
- (void)rightMouseUp:(NSEvent*)event;
|
46
|
+
- (void)otherMouseDown:(NSEvent*)event;
|
47
|
+
- (void)otherMouseDragged:(NSEvent*)event;
|
48
|
+
- (void)otherMouseUp:(NSEvent*)event;
|
49
|
+
- (void)scrollWheel:(NSEvent *)theEvent;
|
50
|
+
- (void)mouseEntered:(NSEvent *)theEvent;
|
51
|
+
- (void)mouseExited:(NSEvent *)theEvent;
|
52
|
+
|
53
|
+
|
54
|
+
// Keyboard
|
55
|
+
- (void)keyDown:(NSEvent *)theEvent;
|
56
|
+
- (void)keyUp:(NSEvent *)theEvent;
|
57
|
+
- (void)flagsChanged:(NSEvent *)theEvent;
|
58
|
+
|
59
|
+
// Touches
|
60
|
+
- (void)touchesBeganWithEvent:(NSEvent *)event;
|
61
|
+
- (void)touchesMovedWithEvent:(NSEvent *)event;
|
62
|
+
- (void)touchesEndedWithEvent:(NSEvent *)event;
|
63
|
+
- (void)touchesCancelledWithEvent:(NSEvent *)event;
|
64
|
+
|
65
|
+
// Gestures
|
66
|
+
- (void)beginGestureWithEvent:(NSEvent *)event;
|
67
|
+
- (void)magnifyWithEvent:(NSEvent *)event;
|
68
|
+
- (void)smartMagnifyWithEvent:(NSEvent *)event;
|
69
|
+
- (void)rotateWithEvent:(NSEvent *)event;
|
70
|
+
- (void)swipeWithEvent:(NSEvent *)event;
|
71
|
+
- (void)endGestureWithEvent:(NSEvent *)event;
|
72
|
+
|
73
|
+
@end
|
74
|
+
|
75
|
+
/** CCGLView
|
76
|
+
|
77
|
+
Only available for Mac OS X
|
78
|
+
*/
|
79
|
+
@interface CCGLView : NSOpenGLView {
|
80
|
+
id<CCEventDelegate> _eventDelegate;
|
81
|
+
}
|
82
|
+
|
83
|
+
/** Event delegate */
|
84
|
+
@property (nonatomic, readwrite, assign) id<CCEventDelegate> eventDelegate;
|
85
|
+
|
86
|
+
/** initializes the CCGLView with a frame rect and an OpenGL context */
|
87
|
+
- (id) initWithFrame:(NSRect)frameRect shareContext:(NSOpenGLContext*)context;
|
88
|
+
|
89
|
+
/** uses and locks the OpenGL context */
|
90
|
+
-(void) lockOpenGLContext;
|
91
|
+
|
92
|
+
/** unlocks the openGL context */
|
93
|
+
-(void) unlockOpenGLContext;
|
94
|
+
|
95
|
+
/** returns the depth format of the view in BPP */
|
96
|
+
- (NSUInteger) depthFormat;
|
97
|
+
|
98
|
+
// private
|
99
|
+
+(void) load_;
|
100
|
+
@end
|
101
|
+
|
102
|
+
#endif // __CC_PLATFORM_MAC
|
103
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
/*
|
2
|
+
* cocos2d for iPhone: http://www.cocos2d-iphone.org
|
3
|
+
*
|
4
|
+
* Copyright (c) 2010 Ricardo Quesada
|
5
|
+
*
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
11
|
+
* furnished to do so, subject to the following conditions:
|
12
|
+
*
|
13
|
+
* The above copyright notice and this permission notice shall be included in
|
14
|
+
* all copies or substantial portions of the Software.
|
15
|
+
*
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
* THE SOFTWARE.
|
23
|
+
*/
|
24
|
+
|
25
|
+
// Only compile this code on Mac. These files should not be included on your iOS project.
|
26
|
+
// But in case they are included, it won't be compiled.
|
27
|
+
#import "../../ccMacros.h"
|
28
|
+
#ifdef __CC_PLATFORM_MAC
|
29
|
+
|
30
|
+
#import <Cocoa/Cocoa.h>
|
31
|
+
|
32
|
+
|
33
|
+
@interface CCWindow : NSWindow
|
34
|
+
{
|
35
|
+
}
|
36
|
+
- (id) initWithFrame:(NSRect)frame fullscreen:(BOOL)fullscreen;
|
37
|
+
|
38
|
+
@end
|
39
|
+
|
40
|
+
|
41
|
+
#endif // __CC_PLATFORM_MAC
|
@@ -55,13 +55,16 @@
|
|
55
55
|
It will enable Retina Display on iPhone4 and iPod Touch 4.
|
56
56
|
It will return YES, if it could enabled it, otherwise it will return NO.
|
57
57
|
|
58
|
-
This is the
|
58
|
+
This is the recommended way to enable Retina Display.
|
59
59
|
@since v0.99.5
|
60
60
|
*/
|
61
61
|
-(BOOL) enableRetinaDisplay:(BOOL)enableRetina;
|
62
62
|
|
63
63
|
/** returns the content scale factor */
|
64
64
|
-(CGFloat) contentScaleFactor;
|
65
|
+
|
66
|
+
/** converts a UITouch to a GL point */
|
67
|
+
-(CGPoint)convertTouchToGL:(UITouch*)touch;
|
65
68
|
@end
|
66
69
|
|
67
70
|
#pragma mark -
|
@@ -73,10 +76,14 @@
|
|
73
76
|
@interface CCDirectorIOS : CCDirector
|
74
77
|
{
|
75
78
|
/* contentScaleFactor could be simulated */
|
76
|
-
BOOL
|
79
|
+
BOOL _isContentScaleSupported;
|
77
80
|
|
78
|
-
CCTouchDispatcher *
|
81
|
+
CCTouchDispatcher *_touchDispatcher;
|
79
82
|
}
|
83
|
+
|
84
|
+
// XXX: At least one method is needed for BridgeSupport
|
85
|
+
- (void) drawScene;
|
86
|
+
|
80
87
|
@end
|
81
88
|
|
82
89
|
/** DisplayLinkDirector is a Director that synchronizes timers with the refresh rate of the display.
|
@@ -92,8 +99,8 @@
|
|
92
99
|
*/
|
93
100
|
@interface CCDirectorDisplayLink : CCDirectorIOS
|
94
101
|
{
|
95
|
-
CADisplayLink *
|
96
|
-
CFTimeInterval
|
102
|
+
CADisplayLink *_displayLink;
|
103
|
+
CFTimeInterval _lastDisplayTime;
|
97
104
|
}
|
98
105
|
-(void) mainLoop:(id)sender;
|
99
106
|
@end
|
@@ -39,26 +39,26 @@
|
|
39
39
|
@interface CCES2Renderer : NSObject <CCESRenderer>
|
40
40
|
{
|
41
41
|
// The pixel dimensions of the CAEAGLLayer
|
42
|
-
GLint
|
43
|
-
GLint
|
42
|
+
GLint _backingWidth;
|
43
|
+
GLint _backingHeight;
|
44
44
|
|
45
|
-
unsigned int
|
46
|
-
BOOL
|
45
|
+
unsigned int _samplesToUse;
|
46
|
+
BOOL _multiSampling;
|
47
47
|
|
48
|
-
unsigned int
|
49
|
-
unsigned int
|
48
|
+
unsigned int _depthFormat;
|
49
|
+
unsigned int _pixelFormat;
|
50
50
|
|
51
51
|
// The OpenGL ES names for the framebuffer and renderbuffer used to render to this view
|
52
|
-
|
53
|
-
GLuint
|
54
|
-
GLuint
|
52
|
+
GLuint _defaultFramebuffer;
|
53
|
+
GLuint _colorRenderbuffer;
|
54
|
+
GLuint _depthBuffer;
|
55
55
|
|
56
56
|
|
57
57
|
//buffers for MSAA
|
58
|
-
GLuint
|
59
|
-
GLuint
|
58
|
+
GLuint _msaaFramebuffer;
|
59
|
+
GLuint _msaaColorbuffer;
|
60
60
|
|
61
|
-
EAGLContext *
|
61
|
+
EAGLContext *_context;
|
62
62
|
}
|
63
63
|
|
64
64
|
/** Color Renderbuffer */
|
File without changes
|
@@ -90,26 +90,41 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|
90
90
|
//CLASS INTERFACE:
|
91
91
|
|
92
92
|
/** CCGLView Class.
|
93
|
-
|
94
|
-
|
95
|
-
|
93
|
+
This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
|
94
|
+
The view content is basically an EAGL surface you render your OpenGL scene into.
|
95
|
+
Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
|
96
|
+
|
97
|
+
Parameters:
|
98
|
+
|
99
|
+
- viewWithFrame: size of the OpenGL view. For full screen use [_window bounds]
|
100
|
+
- Possible values: any CGRect
|
101
|
+
- pixelFormat: Format of the render buffer. Use RGBA8 for better color precision (eg: gradients). But it takes more memory and it is slower
|
102
|
+
- Possible values: kEAGLColorFormatRGBA8, kEAGLColorFormatRGB565
|
103
|
+
- depthFormat: Use stencil if you plan to use CCClippingNode. Use Depth if you plan to use 3D effects, like CCCamera or CCNode#vertexZ
|
104
|
+
- Possible values: 0, GL_DEPTH_COMPONENT24_OES, GL_DEPTH24_STENCIL8_OES
|
105
|
+
- sharegroup: OpenGL sharegroup. Useful if you want to share the same OpenGL context between different threads
|
106
|
+
- Possible values: nil, or any valid EAGLSharegroup group
|
107
|
+
- multiSampling: Whether or not to enable multisampling
|
108
|
+
- Possible values: YES, NO
|
109
|
+
- numberOfSamples: Only valid if multisampling is enabled
|
110
|
+
- Possible values: 0 to glGetIntegerv(GL_MAX_SAMPLES_APPLE)
|
96
111
|
*/
|
97
112
|
@interface CCGLView : UIView
|
98
113
|
{
|
99
|
-
id<CCESRenderer>
|
100
|
-
EAGLContext *
|
114
|
+
id<CCESRenderer> _renderer;
|
115
|
+
EAGLContext *_context; // weak ref
|
101
116
|
|
102
|
-
NSString *
|
103
|
-
GLuint
|
104
|
-
BOOL
|
117
|
+
NSString *_pixelformat;
|
118
|
+
GLuint _depthFormat;
|
119
|
+
BOOL _preserveBackbuffer;
|
105
120
|
|
106
|
-
CGSize
|
107
|
-
BOOL
|
108
|
-
id<CCTouchDelegate>
|
121
|
+
CGSize _size;
|
122
|
+
BOOL _discardFramebufferSupported;
|
123
|
+
id<CCTouchDelegate> _touchDelegate;
|
109
124
|
|
110
125
|
//fsaa addition
|
111
|
-
BOOL
|
112
|
-
unsigned int
|
126
|
+
BOOL _multisampling;
|
127
|
+
unsigned int _requestedSamples;
|
113
128
|
}
|
114
129
|
|
115
130
|
/** creates an initializes an CCGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer. */
|
data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchDelegateProtocol.h
RENAMED
@@ -31,7 +31,7 @@
|
|
31
31
|
#import <UIKit/UIKit.h>
|
32
32
|
|
33
33
|
/**
|
34
|
-
|
34
|
+
CCTouchOneByOneDelegate.
|
35
35
|
|
36
36
|
Using this type of delegate results in two benefits:
|
37
37
|
1. You don't need to deal with NSSets, the dispatcher does the job of splitting
|
@@ -45,7 +45,7 @@
|
|
45
45
|
handler, without bothering the other handlers.)
|
46
46
|
@since v0.8
|
47
47
|
*/
|
48
|
-
@protocol
|
48
|
+
@protocol CCTouchOneByOneDelegate <NSObject>
|
49
49
|
|
50
50
|
/** Return YES to claim the touch.
|
51
51
|
@since v0.8
|
@@ -59,12 +59,12 @@
|
|
59
59
|
@end
|
60
60
|
|
61
61
|
/**
|
62
|
-
|
62
|
+
CCTouchAllAtOnceDelegate.
|
63
63
|
|
64
64
|
This type of delegate is the same one used by CocoaTouch. You will receive all the events (Began,Moved,Ended,Cancelled).
|
65
65
|
@since v0.8
|
66
66
|
*/
|
67
|
-
@protocol
|
67
|
+
@protocol CCTouchAllAtOnceDelegate <NSObject>
|
68
68
|
@optional
|
69
69
|
- (void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
|
70
70
|
- (void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
|
data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchDispatcher.h
RENAMED
@@ -98,12 +98,12 @@ struct ccTouchHandlerHelperData {
|
|
98
98
|
See StandardTouchDelegate description.
|
99
99
|
IMPORTANT: The delegate will be retained.
|
100
100
|
*/
|
101
|
-
-(void) addStandardDelegate:(id<
|
101
|
+
-(void) addStandardDelegate:(id<CCTouchAllAtOnceDelegate>) delegate priority:(int)priority;
|
102
102
|
/** Adds a targeted touch delegate to the dispatcher's list.
|
103
103
|
See TargetedTouchDelegate description.
|
104
104
|
IMPORTANT: The delegate will be retained.
|
105
105
|
*/
|
106
|
-
-(void) addTargetedDelegate:(id<
|
106
|
+
-(void) addTargetedDelegate:(id<CCTouchOneByOneDelegate>) delegate priority:(int)priority swallowsTouches:(BOOL)swallowsTouches;
|
107
107
|
/** Removes a touch delegate.
|
108
108
|
The delegate will be released
|
109
109
|
*/
|