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
@@ -38,110 +38,136 @@
|
|
38
38
|
#import "CCProtocols.h"
|
39
39
|
#import "CCNode.h"
|
40
40
|
|
41
|
-
#pragma mark -
|
42
|
-
|
41
|
+
#pragma mark - CCLayer
|
42
|
+
|
43
|
+
typedef enum {
|
44
|
+
kCCTouchesAllAtOnce,
|
45
|
+
kCCTouchesOneByOne,
|
46
|
+
} ccTouchesMode;
|
43
47
|
|
44
48
|
/** CCLayer is a subclass of CCNode that implements the CCTouchEventsDelegate protocol.
|
45
49
|
|
46
50
|
All features from CCNode are valid, plus the following new features:
|
47
|
-
- It can receive
|
48
|
-
- It can receive Accelerometer input
|
51
|
+
- It can receive Touches both on iOS and Mac
|
52
|
+
- It can receive Accelerometer input on iOS
|
53
|
+
- It can receive Keyboard events on Mac
|
54
|
+
- It can receive Mouse events on Mac
|
49
55
|
*/
|
50
56
|
#ifdef __CC_PLATFORM_IOS
|
51
|
-
@interface CCLayer : CCNode <
|
57
|
+
@interface CCLayer : CCNode <CCAccelerometerDelegate, CCTouchAllAtOnceDelegate, CCTouchOneByOneDelegate>
|
52
58
|
{
|
53
|
-
BOOL
|
54
|
-
|
59
|
+
BOOL _touchEnabled;
|
60
|
+
NSInteger _touchPriority;
|
61
|
+
BOOL _touchMode;
|
62
|
+
BOOL _touchSwallow;
|
63
|
+
|
64
|
+
BOOL _accelerometerEnabled;
|
55
65
|
}
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
Example:
|
60
|
-
-(void) registerWithTouchDispatcher
|
61
|
-
{
|
62
|
-
[touchDispatcher addTargetedDelegate:self priority:INT_MIN+1 swallowsTouches:YES];
|
63
|
-
}
|
66
|
+
|
67
|
+
/** whether or not it will receive Accelerometer events
|
68
|
+
You can enable / disable accelerometer events with this property.
|
64
69
|
|
65
70
|
Valid only on iOS. Not valid on Mac.
|
66
71
|
|
67
|
-
@since v0.8.
|
72
|
+
@since v0.8.1
|
68
73
|
*/
|
69
|
-
|
70
|
-
|
71
|
-
/** whether or not it will receive Touch events.
|
72
|
-
You can enable / disable touch events with this property.
|
73
|
-
Only the touches of this node will be affected. This "method" is not propagated to its children.
|
74
|
-
|
75
|
-
Valid on iOS and Mac OS X v10.6 and later.
|
74
|
+
@property(nonatomic, assign, getter = isAccelerometerEnabled) BOOL accelerometerEnabled;
|
76
75
|
|
76
|
+
/** whether or not it will receive Touch events
|
77
77
|
@since v0.8.1
|
78
78
|
*/
|
79
|
-
@property(nonatomic,assign) BOOL
|
80
|
-
/**
|
81
|
-
|
79
|
+
@property(nonatomic, assign, getter = isTouchEnabled) BOOL touchEnabled;
|
80
|
+
/** priority of the touch events. Default is 0 */
|
81
|
+
@property(nonatomic, assign) NSInteger touchPriority;
|
82
|
+
/** Touch modes.
|
83
|
+
- kCCTouchesAllAtOnce: Receives all the available touches at once.
|
84
|
+
- kCCTouchesOneByOne: Receives one touch at the time.
|
85
|
+
*/
|
86
|
+
@property(nonatomic, assign) ccTouchesMode touchMode;
|
82
87
|
|
83
|
-
|
88
|
+
/** whether touch events are swallowed (in kCCTouchesOneByOne mode) */
|
89
|
+
@property(nonatomic, assign) BOOL touchSwallow;
|
84
90
|
|
85
|
-
|
91
|
+
/** sets the accelerometer's update frequency. A value of 1/2 means that the callback is going to be called twice per second.
|
92
|
+
@since v2.1
|
86
93
|
*/
|
87
|
-
|
94
|
+
-(void) setAccelerometerInterval:(float)interval;
|
95
|
+
|
88
96
|
|
89
97
|
#elif defined(__CC_PLATFORM_MAC)
|
90
98
|
|
91
99
|
|
92
|
-
@interface CCLayer : CCNode <CCKeyboardEventDelegate, CCMouseEventDelegate, CCTouchEventDelegate>
|
100
|
+
@interface CCLayer : CCNode <CCKeyboardEventDelegate, CCMouseEventDelegate, CCTouchEventDelegate, CCGestureEventDelegate>
|
93
101
|
{
|
94
|
-
BOOL
|
95
|
-
|
96
|
-
|
102
|
+
BOOL _mouseEnabled;
|
103
|
+
NSInteger _mousePriority;
|
104
|
+
|
105
|
+
BOOL _keyboardEnabled;
|
106
|
+
NSInteger _keyboardPriority;
|
107
|
+
|
108
|
+
BOOL _touchEnabled;
|
109
|
+
NSInteger _touchPriority;
|
110
|
+
NSInteger _touchMode;
|
111
|
+
BOOL _touchSwallow;
|
112
|
+
|
113
|
+
BOOL _gestureEnabled;
|
114
|
+
NSInteger _gesturePriority;
|
97
115
|
}
|
98
116
|
|
99
|
-
/** whether or not it will receive
|
117
|
+
/** whether or not it will receive touche events. */
|
118
|
+
@property (nonatomic, readwrite, getter=isTouchEnabled) BOOL touchEnabled;
|
119
|
+
/** priority of the touch events. Default is 0 */
|
120
|
+
@property(nonatomic, assign) NSInteger touchPriority;
|
100
121
|
|
101
|
-
|
102
|
-
|
103
|
-
|
122
|
+
/** whether or not it will receive gesture events. */
|
123
|
+
@property (nonatomic, readwrite, getter=isGestureEnabled) BOOL gestureEnabled;
|
124
|
+
/** priority of the gesture events. Default is 0 */
|
125
|
+
@property(nonatomic, assign) NSInteger gesturePriority;
|
104
126
|
|
105
|
-
/** whether or not it will receive keyboard events.
|
106
127
|
|
107
|
-
|
128
|
+
/** whether or not it will receive mouse events.
|
129
|
+
|
130
|
+
Valid only on OS X. Not valid on iOS
|
108
131
|
*/
|
109
|
-
@property (nonatomic, readwrite) BOOL
|
132
|
+
@property (nonatomic, readwrite, getter=isMouseEnabled) BOOL mouseEnabled;
|
133
|
+
/** priority of the mouse events. Default is 0 */
|
134
|
+
@property (nonatomic, assign) NSInteger mousePriority;
|
110
135
|
|
111
|
-
/** whether or not it will receive
|
136
|
+
/** whether or not it will receive keyboard events.
|
112
137
|
|
113
|
-
Valid on
|
138
|
+
Valid only on OS X. Not valid on iOS
|
114
139
|
*/
|
115
|
-
@property (nonatomic, readwrite) BOOL
|
140
|
+
@property (nonatomic, readwrite, getter = isKeyboardEnabled) BOOL keyboardEnabled;
|
141
|
+
/** Priority of keyboard events. Default is 0 */
|
142
|
+
@property (nonatomic, assign) NSInteger keyboardPriority;
|
116
143
|
|
117
|
-
|
118
|
-
Default 0.
|
119
|
-
Override this method to set another priority.
|
144
|
+
#endif // mac
|
120
145
|
|
121
|
-
|
122
|
-
*/
|
123
|
-
-(NSInteger) mouseDelegatePriority;
|
146
|
+
@end
|
124
147
|
|
125
|
-
/** priority of the keyboard event delegate.
|
126
|
-
Default 0.
|
127
|
-
Override this method to set another priority.
|
128
148
|
|
129
|
-
|
130
|
-
|
131
|
-
-(NSInteger) keyboardDelegatePriority;
|
149
|
+
#pragma mark -
|
150
|
+
#pragma mark CCLayerRGBA
|
132
151
|
|
133
|
-
/**
|
134
|
-
Default 0.
|
135
|
-
Override this method to set another priority.
|
152
|
+
/** CCLayerRGBA is a subclass of CCLayer that implements the CCRGBAProtocol protocol using a solid color as the background.
|
136
153
|
|
137
|
-
|
154
|
+
All features from CCLayer are valid, plus the following new features that propagate into children that conform to the CCRGBAProtocol:
|
155
|
+
- opacity
|
156
|
+
- RGB colors
|
157
|
+
@since 2.1
|
138
158
|
*/
|
139
|
-
|
159
|
+
@interface CCLayerRGBA : CCLayer <CCRGBAProtocol>
|
160
|
+
{
|
161
|
+
GLubyte _displayedOpacity, _realOpacity;
|
162
|
+
ccColor3B _displayedColor, _realColor;
|
163
|
+
BOOL _cascadeOpacityEnabled, _cascadeColorEnabled;
|
164
|
+
}
|
140
165
|
|
141
|
-
|
166
|
+
// XXX: To make BridgeSupport happy
|
167
|
+
-(GLubyte) opacity;
|
168
|
+
@end
|
142
169
|
|
143
170
|
|
144
|
-
@end
|
145
171
|
|
146
172
|
#pragma mark -
|
147
173
|
#pragma mark CCLayerColor
|
@@ -152,14 +178,12 @@
|
|
152
178
|
- opacity
|
153
179
|
- RGB colors
|
154
180
|
*/
|
155
|
-
@interface CCLayerColor :
|
181
|
+
@interface CCLayerColor : CCLayerRGBA <CCBlendProtocol>
|
156
182
|
{
|
157
|
-
|
158
|
-
|
159
|
-
ccVertex2F squareVertices_[4];
|
160
|
-
ccColor4F squareColors_[4];
|
183
|
+
ccVertex2F _squareVertices[4];
|
184
|
+
ccColor4F _squareColors[4];
|
161
185
|
|
162
|
-
ccBlendFunc
|
186
|
+
ccBlendFunc _blendFunc;
|
163
187
|
}
|
164
188
|
|
165
189
|
/** creates a CCLayer with color, width and height in Points*/
|
@@ -183,10 +207,6 @@
|
|
183
207
|
*/
|
184
208
|
-(void) changeWidth:(GLfloat)w height:(GLfloat)h;
|
185
209
|
|
186
|
-
/** Opacity: conforms to CCRGBAProtocol protocol */
|
187
|
-
@property (nonatomic,readonly) GLubyte opacity;
|
188
|
-
/** Opacity: conforms to CCRGBAProtocol protocol */
|
189
|
-
@property (nonatomic,readonly) ccColor3B color;
|
190
210
|
/** BlendFunction. Conforms to CCBlendProtocol protocol */
|
191
211
|
@property (nonatomic,readwrite) ccBlendFunc blendFunc;
|
192
212
|
@end
|
@@ -216,11 +236,11 @@ the background.
|
|
216
236
|
*/
|
217
237
|
@interface CCLayerGradient : CCLayerColor
|
218
238
|
{
|
219
|
-
ccColor3B
|
220
|
-
GLubyte
|
221
|
-
GLubyte
|
222
|
-
CGPoint
|
223
|
-
BOOL
|
239
|
+
ccColor3B _endColor;
|
240
|
+
GLubyte _startOpacity;
|
241
|
+
GLubyte _endOpacity;
|
242
|
+
CGPoint _vector;
|
243
|
+
BOOL _compressedInterpolation;
|
224
244
|
}
|
225
245
|
|
226
246
|
/** Creates a full-screen CCLayer with a gradient between start and end. */
|
@@ -260,12 +280,20 @@ the background.
|
|
260
280
|
*/
|
261
281
|
@interface CCLayerMultiplex : CCLayer
|
262
282
|
{
|
263
|
-
unsigned int
|
264
|
-
NSMutableArray *
|
283
|
+
unsigned int _enabledLayer;
|
284
|
+
NSMutableArray *_layers;
|
265
285
|
}
|
266
286
|
|
287
|
+
/** creates a CCMultiplexLayer with an array of layers.
|
288
|
+
@since v2.1
|
289
|
+
*/
|
290
|
+
+(id) layerWithArray:(NSArray*)arrayOfLayers;
|
267
291
|
/** creates a CCMultiplexLayer with one or more layers using a variable argument list. */
|
268
292
|
+(id) layerWithLayers: (CCLayer*) layer, ... NS_REQUIRES_NIL_TERMINATION;
|
293
|
+
/** initializes a CCMultiplexLayer with an array of layers
|
294
|
+
@since v2.1
|
295
|
+
*/
|
296
|
+
-(id) initWithArray:(NSArray*)arrayOfLayers;
|
269
297
|
/** initializes a MultiplexLayer with one or more layers using a variable argument list. */
|
270
298
|
-(id) initWithLayers: (CCLayer*) layer vaList:(va_list) params;
|
271
299
|
/** switches to a certain layer indexed by n.
|
@@ -44,31 +44,25 @@ enum {
|
|
44
44
|
* - You can add MenuItem objects in runtime using addChild:
|
45
45
|
* - But the only accecpted children are MenuItem objects
|
46
46
|
*/
|
47
|
-
@interface CCMenu :
|
47
|
+
@interface CCMenu : CCLayerRGBA
|
48
48
|
{
|
49
|
-
tCCMenuState
|
50
|
-
CCMenuItem *
|
51
|
-
|
52
|
-
ccColor3B color_;
|
53
|
-
BOOL enabled_;
|
49
|
+
tCCMenuState _state;
|
50
|
+
CCMenuItem *_selectedItem;
|
51
|
+
BOOL _enabled;
|
54
52
|
}
|
55
53
|
|
56
|
-
/** conforms to CCRGBAProtocol protocol */
|
57
|
-
@property (nonatomic,readonly) GLubyte opacity;
|
58
|
-
/** conforms to CCRGBAProtocol protocol */
|
59
|
-
@property (nonatomic,readonly) ccColor3B color;
|
60
54
|
/** whether or not the menu will receive events */
|
61
55
|
@property (nonatomic, readwrite) BOOL enabled;
|
62
56
|
|
63
|
-
/** creates a CCMenu with
|
57
|
+
/** creates a CCMenu with CCMenuItem objects */
|
64
58
|
+ (id) menuWithItems: (CCMenuItem*) item, ... NS_REQUIRES_NIL_TERMINATION;
|
65
59
|
|
60
|
+
/** creates a CCMenu with CCMenuItem objects */
|
61
|
+
+ (id) menuWithItems: (CCMenuItem*) firstItem vaList: (va_list) args;
|
62
|
+
|
66
63
|
/** creates a CCMenu with a NSArray of CCMenuItem objects */
|
67
64
|
+ (id) menuWithArray:(NSArray*)arrayOfItems;
|
68
65
|
|
69
|
-
/** initializes a CCMenu with its items */
|
70
|
-
- (id) initWithItems: (CCMenuItem*) item vaList: (va_list) args;
|
71
|
-
|
72
66
|
/** initializes a CCMenu with a NSArray of CCMenuItem objects */
|
73
67
|
- (id) initWithArray:(NSArray*)arrayOfItems;
|
74
68
|
|
@@ -89,10 +83,12 @@ enum {
|
|
89
83
|
/** align items in rows of columns */
|
90
84
|
-(void) alignItemsInColumns: (NSNumber *) columns, ... NS_REQUIRES_NIL_TERMINATION;
|
91
85
|
-(void) alignItemsInColumns: (NSNumber *) columns vaList: (va_list) args;
|
86
|
+
-(void) alignItemsInColumnsWithArray:(NSArray*) arrayOfNumbers;
|
92
87
|
|
93
88
|
/** align items in columns of rows */
|
94
89
|
-(void) alignItemsInRows: (NSNumber *) rows, ... NS_REQUIRES_NIL_TERMINATION;
|
95
90
|
-(void) alignItemsInRows: (NSNumber *) rows vaList: (va_list) args;
|
91
|
+
-(void) alignItemsInRowsWithArray: (NSArray*) arrayOfNumbers;
|
96
92
|
|
97
93
|
/** set event handler priority. By default it is: kCCMenuTouchPriority */
|
98
94
|
-(void) setHandlerPriority:(NSInteger)newPriority;
|
@@ -38,13 +38,15 @@
|
|
38
38
|
*
|
39
39
|
* Subclass CCMenuItem (or any subclass) to create your custom CCMenuItem objects.
|
40
40
|
*/
|
41
|
-
@interface CCMenuItem :
|
41
|
+
@interface CCMenuItem : CCNodeRGBA
|
42
42
|
{
|
43
43
|
// used for menu items using a block
|
44
|
-
void (^
|
44
|
+
void (^_block)(id sender);
|
45
45
|
|
46
|
-
BOOL
|
47
|
-
BOOL
|
46
|
+
BOOL _isEnabled;
|
47
|
+
BOOL _isSelected;
|
48
|
+
|
49
|
+
BOOL _releaseBlockAtCleanup;
|
48
50
|
}
|
49
51
|
|
50
52
|
/** returns whether or not the item is selected
|
@@ -52,6 +54,14 @@
|
|
52
54
|
*/
|
53
55
|
@property (nonatomic,readonly) BOOL isSelected;
|
54
56
|
|
57
|
+
/** If enabled, it releases the block at cleanup time.
|
58
|
+
@since v2.1
|
59
|
+
*/
|
60
|
+
@property (nonatomic) BOOL releaseBlockAtCleanup;
|
61
|
+
|
62
|
+
/** the active area (relative to the current position) */
|
63
|
+
@property (nonatomic,assign) CGRect activeArea;
|
64
|
+
|
55
65
|
/** Creates a CCMenuItem with a target/selector.
|
56
66
|
target/selector will be implemented using blocks.
|
57
67
|
"target" won't be retained.
|
@@ -71,9 +81,6 @@
|
|
71
81
|
*/
|
72
82
|
-(id) initWithBlock:(void(^)(id sender))block;
|
73
83
|
|
74
|
-
/** Returns the outside box in points */
|
75
|
-
-(CGRect) rect;
|
76
|
-
|
77
84
|
/** Activate the item */
|
78
85
|
-(void) activate;
|
79
86
|
|
@@ -115,12 +122,12 @@
|
|
115
122
|
- CCLabelAtlas
|
116
123
|
- CCLabelTTF
|
117
124
|
*/
|
118
|
-
@interface CCMenuItemLabel : CCMenuItem
|
125
|
+
@interface CCMenuItemLabel : CCMenuItem
|
119
126
|
{
|
120
|
-
CCNode<CCLabelProtocol, CCRGBAProtocol> *
|
121
|
-
ccColor3B
|
122
|
-
ccColor3B
|
123
|
-
float
|
127
|
+
CCNode<CCLabelProtocol, CCRGBAProtocol> *_label;
|
128
|
+
ccColor3B _colorBackup;
|
129
|
+
ccColor3B _disabledColor;
|
130
|
+
float _originalScale;
|
124
131
|
}
|
125
132
|
|
126
133
|
/** the color that will be used to disable the item */
|
@@ -129,7 +136,7 @@
|
|
129
136
|
/** Label that is rendered. It can be any CCNode that implements the CCLabelProtocol */
|
130
137
|
@property (nonatomic,readwrite,assign) CCNode<CCLabelProtocol, CCRGBAProtocol>* label;
|
131
138
|
|
132
|
-
/** creates a CCMenuItemLabel with a Label.
|
139
|
+
/** creates a CCMenuItemLabel with a Label. */
|
133
140
|
+(id) itemWithLabel:(CCNode<CCLabelProtocol,CCRGBAProtocol>*)label;
|
134
141
|
|
135
142
|
/** creates a CCMenuItemLabel with a Label, target and selector.
|
@@ -206,8 +213,8 @@
|
|
206
213
|
*/
|
207
214
|
@interface CCMenuItemFont : CCMenuItemLabel
|
208
215
|
{
|
209
|
-
NSUInteger
|
210
|
-
NSString *
|
216
|
+
NSUInteger _fontSize;
|
217
|
+
NSString *_fontName;
|
211
218
|
}
|
212
219
|
/** set default font size */
|
213
220
|
+(void) setFontSize: (NSUInteger) s;
|
@@ -271,7 +278,7 @@
|
|
271
278
|
*/
|
272
279
|
@interface CCMenuItemSprite : CCMenuItem <CCRGBAProtocol>
|
273
280
|
{
|
274
|
-
CCNode<CCRGBAProtocol> *
|
281
|
+
CCNode<CCRGBAProtocol> *_normalImage, *_selectedImage, *_disabledImage;
|
275
282
|
}
|
276
283
|
|
277
284
|
// weak references
|
@@ -290,7 +297,7 @@
|
|
290
297
|
*/
|
291
298
|
+(id) itemWithNormalSprite:(CCNode<CCRGBAProtocol>*)normalSprite selectedSprite:(CCNode<CCRGBAProtocol>*)selectedSprite target:(id)target selector:(SEL)selector;
|
292
299
|
|
293
|
-
/** creates a menu item with a normal,selected
|
300
|
+
/** creates a menu item with a normal, selected and disabled image with target/selector.
|
294
301
|
The "target" won't be retained.
|
295
302
|
*/
|
296
303
|
+(id) itemWithNormalSprite:(CCNode<CCRGBAProtocol>*)normalSprite selectedSprite:(CCNode<CCRGBAProtocol>*)selectedSprite disabledSprite:(CCNode<CCRGBAProtocol>*)disabledSprite target:(id)target selector:(SEL)selector;
|
@@ -300,7 +307,7 @@
|
|
300
307
|
*/
|
301
308
|
+(id) itemWithNormalSprite:(CCNode<CCRGBAProtocol>*)normalSprite selectedSprite:(CCNode<CCRGBAProtocol>*)selectedSprite block:(void(^)(id sender))block;
|
302
309
|
|
303
|
-
/** creates a menu item with a normal,selected
|
310
|
+
/** creates a menu item with a normal, selected and disabled image with a block.
|
304
311
|
The block will be "copied".
|
305
312
|
*/
|
306
313
|
+(id) itemWithNormalSprite:(CCNode<CCRGBAProtocol>*)normalSprite selectedSprite:(CCNode<CCRGBAProtocol>*)selectedSprite disabledSprite:(CCNode<CCRGBAProtocol>*)disabledSprite block:(void(^)(id sender))block;
|
@@ -335,10 +342,13 @@
|
|
335
342
|
/** creates a menu item with a normal and selected image*/
|
336
343
|
+(id) itemWithNormalImage: (NSString*)value selectedImage:(NSString*) value2;
|
337
344
|
|
345
|
+
/** creates a menu item with a normal, selected and disabled image */
|
346
|
+
+(id) itemWithNormalImage: (NSString*)value selectedImage:(NSString*) value2 disabledImage: (NSString*) value3;
|
347
|
+
|
338
348
|
/** creates a menu item with a normal and selected image with target/selector */
|
339
349
|
+(id) itemWithNormalImage: (NSString*)value selectedImage:(NSString*) value2 target:(id) r selector:(SEL) s;
|
340
350
|
|
341
|
-
/** creates a menu item with a normal,selected
|
351
|
+
/** creates a menu item with a normal, selected and disabled image with target/selector.
|
342
352
|
The "target" won't be retained.
|
343
353
|
*/
|
344
354
|
+(id) itemWithNormalImage: (NSString*)value selectedImage:(NSString*) value2 disabledImage:(NSString*) value3 target:(id) r selector:(SEL) s;
|
@@ -348,7 +358,7 @@
|
|
348
358
|
*/
|
349
359
|
+(id) itemWithNormalImage: (NSString*)value selectedImage:(NSString*) value2 block:(void(^)(id sender))block;
|
350
360
|
|
351
|
-
/** creates a menu item with a normal,selected
|
361
|
+
/** creates a menu item with a normal, selected and disabled image with a block.
|
352
362
|
The block will be "copied".
|
353
363
|
*/
|
354
364
|
+(id) itemWithNormalImage: (NSString*)value selectedImage:(NSString*) value2 disabledImage:(NSString*) value3 block:(void(^)(id sender))block;
|
@@ -383,17 +393,11 @@
|
|
383
393
|
*/
|
384
394
|
@interface CCMenuItemToggle : CCMenuItem <CCRGBAProtocol>
|
385
395
|
{
|
386
|
-
NSUInteger
|
387
|
-
NSMutableArray*
|
388
|
-
|
389
|
-
ccColor3B color_;
|
396
|
+
NSUInteger _selectedIndex;
|
397
|
+
NSMutableArray* _subItems;
|
398
|
+
CCMenuItem* _currentItem;
|
390
399
|
}
|
391
400
|
|
392
|
-
/** conforms with CCRGBAProtocol protocol */
|
393
|
-
@property (nonatomic,readonly) GLubyte opacity;
|
394
|
-
/** conforms with CCRGBAProtocol protocol */
|
395
|
-
@property (nonatomic,readonly) ccColor3B color;
|
396
|
-
|
397
401
|
/** returns the selected item */
|
398
402
|
@property (nonatomic,readwrite) NSUInteger selectedIndex;
|
399
403
|
/** NSMutableArray that contains the subitems. You can add/remove items in runtime, and you can replace the array with a new one.
|
@@ -403,15 +407,16 @@
|
|
403
407
|
|
404
408
|
/** creates a menu item from a list of items with a target/selector */
|
405
409
|
+(id) itemWithTarget:(id)target selector:(SEL)selector items:(CCMenuItem*) item, ... NS_REQUIRES_NIL_TERMINATION;
|
410
|
+
+(id) itemWithTarget:(id)target selector:(SEL)selector items:(CCMenuItem*) item vaList:(va_list)args;
|
411
|
+
|
412
|
+
/** creates a menu item from a list of items. */
|
413
|
+
+(id) itemWithItems:(NSArray*)arrayOfItems;
|
406
414
|
|
407
415
|
/** creates a menu item from a list of items and executes the given block when the item is selected.
|
408
416
|
The block will be "copied".
|
409
417
|
*/
|
410
418
|
+(id) itemWithItems:(NSArray*)arrayOfItems block:(void(^)(id sender))block;
|
411
419
|
|
412
|
-
/** initializes a menu item from a list of items with a target selector */
|
413
|
-
-(id) initWithTarget:(id)target selector:(SEL)selector items:(CCMenuItem*) item vaList:(va_list) args;
|
414
|
-
|
415
420
|
/** initializes a menu item from a list of items with a block.
|
416
421
|
The block will be "copied".
|
417
422
|
*/
|
@@ -32,37 +32,36 @@
|
|
32
32
|
/** MotionStreak.
|
33
33
|
Creates a trailing path.
|
34
34
|
*/
|
35
|
-
@interface CCMotionStreak :
|
35
|
+
@interface CCMotionStreak : CCNodeRGBA <CCTextureProtocol>
|
36
36
|
{
|
37
|
-
CCTexture2D *
|
38
|
-
CGPoint
|
39
|
-
|
40
|
-
|
41
|
-
float
|
42
|
-
float
|
43
|
-
float minSeg_;
|
37
|
+
CCTexture2D *_texture;
|
38
|
+
CGPoint _positionR;
|
39
|
+
ccBlendFunc _blendFunc;
|
40
|
+
float _stroke;
|
41
|
+
float _fadeDelta;
|
42
|
+
float _minSeg;
|
44
43
|
|
45
|
-
NSUInteger
|
46
|
-
NSUInteger
|
47
|
-
NSUInteger
|
44
|
+
NSUInteger _maxPoints;
|
45
|
+
NSUInteger _nuPoints;
|
46
|
+
NSUInteger _previousNuPoints;
|
48
47
|
|
49
48
|
/** Pointers */
|
50
|
-
CGPoint *
|
51
|
-
float *
|
49
|
+
CGPoint *_pointVertexes;
|
50
|
+
float *_pointState;
|
52
51
|
|
53
52
|
// Opengl
|
54
|
-
ccVertex2F *
|
55
|
-
unsigned char *
|
56
|
-
ccTex2F *
|
53
|
+
ccVertex2F *_vertices;
|
54
|
+
unsigned char *_colorPointer;
|
55
|
+
ccTex2F *_texCoords;
|
57
56
|
|
58
|
-
BOOL
|
57
|
+
BOOL _fastMode;
|
59
58
|
|
60
|
-
BOOL
|
59
|
+
BOOL _startingPositionInitialized;
|
61
60
|
}
|
62
61
|
/** blending function */
|
63
62
|
@property (nonatomic, readwrite, assign) ccBlendFunc blendFunc;
|
64
63
|
|
65
|
-
/** When fast mode is
|
64
|
+
/** When fast mode is enabled, new points are added faster but with lower precision */
|
66
65
|
@property (nonatomic, readwrite, assign, getter = isFastMode) BOOL fastMode;
|
67
66
|
|
68
67
|
/** texture used for the motion streak */
|
File without changes
|