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
@@ -90,7 +90,7 @@ enum {
|
|
90
90
|
|
91
91
|
Order in transformations with grid enabled
|
92
92
|
-# The node will be translated (position)
|
93
|
-
-# The node will be rotated (rotation)
|
93
|
+
-# The node will be rotated (rotation, rotationX, rotationY)
|
94
94
|
-# The node will be skewed (skewX, skewY)
|
95
95
|
-# The node will be scaled (scale, scaleX, scaleY)
|
96
96
|
-# The grid will capture the screen
|
@@ -103,81 +103,80 @@ enum {
|
|
103
103
|
@interface CCNode : NSObject
|
104
104
|
{
|
105
105
|
// rotation angle
|
106
|
-
float
|
106
|
+
float _rotationX, _rotationY;
|
107
107
|
|
108
108
|
// scaling factors
|
109
|
-
float
|
109
|
+
float _scaleX, _scaleY;
|
110
110
|
|
111
111
|
// openGL real Z vertex
|
112
|
-
float
|
112
|
+
float _vertexZ;
|
113
113
|
|
114
114
|
// position of the node
|
115
|
-
CGPoint
|
115
|
+
CGPoint _position;
|
116
116
|
|
117
117
|
// skew angles
|
118
|
-
float
|
118
|
+
float _skewX, _skewY;
|
119
119
|
|
120
120
|
// anchor point in points
|
121
|
-
CGPoint
|
121
|
+
CGPoint _anchorPointInPoints;
|
122
122
|
// anchor point normalized (NOT in points)
|
123
|
-
CGPoint
|
123
|
+
CGPoint _anchorPoint;
|
124
124
|
|
125
125
|
// untransformed size of the node
|
126
|
-
CGSize
|
126
|
+
CGSize _contentSize;
|
127
127
|
|
128
128
|
// transform
|
129
|
-
CGAffineTransform
|
129
|
+
CGAffineTransform _transform, _inverse;
|
130
|
+
BOOL _isTransformDirty;
|
131
|
+
BOOL _isInverseDirty;
|
130
132
|
|
131
133
|
// a Camera
|
132
|
-
CCCamera *
|
134
|
+
CCCamera *_camera;
|
133
135
|
|
134
136
|
// a Grid
|
135
|
-
CCGridBase *
|
137
|
+
CCGridBase *_grid;
|
136
138
|
|
137
139
|
// z-order value
|
138
|
-
NSInteger
|
140
|
+
NSInteger _zOrder;
|
139
141
|
|
140
142
|
// array of children
|
141
|
-
CCArray *
|
143
|
+
CCArray *_children;
|
142
144
|
|
143
|
-
//
|
144
|
-
CCNode *
|
145
|
+
// weak ref to parent
|
146
|
+
CCNode *_parent;
|
145
147
|
|
146
148
|
// a tag. any number you want to assign to the node
|
147
|
-
NSInteger
|
149
|
+
NSInteger _tag;
|
148
150
|
|
149
151
|
// user data field
|
150
|
-
void *
|
151
|
-
id
|
152
|
+
void *_userData;
|
153
|
+
id _userObject;
|
152
154
|
|
153
155
|
// Shader
|
154
|
-
CCGLProgram *
|
156
|
+
CCGLProgram *_shaderProgram;
|
155
157
|
|
156
158
|
// Server side state
|
157
|
-
ccGLServerState
|
159
|
+
ccGLServerState _glServerState;
|
158
160
|
|
159
161
|
// used to preserve sequence while sorting children with the same zOrder
|
160
|
-
NSUInteger
|
162
|
+
NSUInteger _orderOfArrival;
|
161
163
|
|
162
164
|
// scheduler used to schedule timers and updates
|
163
|
-
CCScheduler *
|
165
|
+
CCScheduler *_scheduler;
|
164
166
|
|
165
167
|
// ActionManager used to handle all the actions
|
166
|
-
CCActionManager *
|
168
|
+
CCActionManager *_actionManager;
|
167
169
|
|
168
170
|
// Is running
|
169
|
-
BOOL
|
170
|
-
|
171
|
-
BOOL isTransformDirty_;
|
172
|
-
BOOL isInverseDirty_;
|
171
|
+
BOOL _isRunning;
|
173
172
|
|
174
173
|
// is visible
|
175
|
-
BOOL
|
174
|
+
BOOL _visible;
|
176
175
|
// If YES, the Anchor Point will be (0,0) when you position the CCNode.
|
177
176
|
// Used by CCLayer and CCScene
|
178
|
-
BOOL
|
177
|
+
BOOL _ignoreAnchorPointForPosition;
|
179
178
|
|
180
|
-
BOOL
|
179
|
+
BOOL _isReorderChildDirty;
|
181
180
|
}
|
182
181
|
|
183
182
|
/** The z order of the node relative to its "siblings": children of the same parent */
|
@@ -207,6 +206,11 @@ enum {
|
|
207
206
|
@property(nonatomic,readwrite,assign) float skewY;
|
208
207
|
/** The rotation (angle) of the node in degrees. 0 is the default rotation angle. Positive values rotate node CW. */
|
209
208
|
@property(nonatomic,readwrite,assign) float rotation;
|
209
|
+
/** The rotation (angle) of the node in degrees. 0 is the default rotation angle. Positive values rotate node CW. It only modifies the X rotation performing a horizontal rotational skew . */
|
210
|
+
@property(nonatomic,readwrite,assign) float rotationX;
|
211
|
+
/** The rotation (angle) of the node in degrees. 0 is the default rotation angle. Positive values rotate node CW. It only modifies the Y rotation performing a vertical rotational skew . */
|
212
|
+
@property(nonatomic,readwrite,assign) float rotationY;
|
213
|
+
|
210
214
|
/** The scale factor of the node. 1.0 is the default scale factor. It modifies the X and Y scale at the same time. */
|
211
215
|
@property(nonatomic,readwrite,assign) float scale;
|
212
216
|
/** The scale factor of the node. 1.0 is the default scale factor. It only modifies the X scale factor. */
|
@@ -291,8 +295,7 @@ enum {
|
|
291
295
|
/** initializes the node */
|
292
296
|
-(id) init;
|
293
297
|
|
294
|
-
|
295
|
-
// scene managment
|
298
|
+
// scene management
|
296
299
|
|
297
300
|
/** Event that is called every time the CCNode enters the 'stage'.
|
298
301
|
If the CCNode enters the 'stage' with a transition, this event is called when the transition starts.
|
@@ -342,22 +345,43 @@ enum {
|
|
342
345
|
|
343
346
|
// composition: REMOVE
|
344
347
|
|
348
|
+
/** Remove itself from its parent node forcing a cleanup.
|
349
|
+
If the node orphan, then nothing happens.
|
350
|
+
@since v2.1
|
351
|
+
*/
|
352
|
+
-(void) removeFromParent;
|
353
|
+
|
345
354
|
/** Remove itself from its parent node. If cleanup is YES, then also remove all actions and callbacks.
|
346
355
|
If the node orphan, then nothing happens.
|
347
356
|
@since v0.99.3
|
348
357
|
*/
|
349
358
|
-(void) removeFromParentAndCleanup:(BOOL)cleanup;
|
350
359
|
|
360
|
+
/** Removes a child from the container forcing a cleanup
|
361
|
+
@since v2.1
|
362
|
+
*/
|
363
|
+
-(void) removeChild:(CCNode*)child;
|
364
|
+
|
351
365
|
/** Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter.
|
352
366
|
@since v0.7.1
|
353
367
|
*/
|
354
368
|
-(void) removeChild: (CCNode*)node cleanup:(BOOL)cleanup;
|
355
369
|
|
370
|
+
/** Removes a child from the container by tag value forcing a cleanup.
|
371
|
+
@since v2.1
|
372
|
+
*/
|
373
|
+
-(void) removeChildByTag:(NSInteger) tag;
|
374
|
+
|
356
375
|
/** Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter
|
357
376
|
@since v0.7.1
|
358
377
|
*/
|
359
378
|
-(void) removeChildByTag:(NSInteger) tag cleanup:(BOOL)cleanup;
|
360
379
|
|
380
|
+
/** Removes all children from the container forcing a cleanup.
|
381
|
+
@since v2.1
|
382
|
+
*/
|
383
|
+
-(void) removeAllChildren;
|
384
|
+
|
361
385
|
/** Removes all children from the container and do a cleanup all running actions depending on the cleanup parameter.
|
362
386
|
@since v0.7.1
|
363
387
|
*/
|
@@ -454,7 +478,7 @@ enum {
|
|
454
478
|
|
455
479
|
/** schedules the "update" method. It will use the order number 0. This method will be called every frame.
|
456
480
|
Scheduled methods with a lower order value will be called before the ones that have a higher order value.
|
457
|
-
Only one "
|
481
|
+
Only one "update" method could be scheduled per node.
|
458
482
|
|
459
483
|
@since v0.99.3
|
460
484
|
*/
|
@@ -462,7 +486,7 @@ enum {
|
|
462
486
|
|
463
487
|
/** schedules the "update" selector with a custom priority. This selector will be called every frame.
|
464
488
|
Scheduled selectors with a lower priority will be called before the ones that have a higher value.
|
465
|
-
Only one "
|
489
|
+
Only one "update" selector could be scheduled per node (You can't have 2 'update' selectors).
|
466
490
|
|
467
491
|
@since v0.99.3
|
468
492
|
*/
|
@@ -474,7 +498,6 @@ enum {
|
|
474
498
|
*/
|
475
499
|
-(void) unscheduleUpdate;
|
476
500
|
|
477
|
-
|
478
501
|
/** schedules a selector.
|
479
502
|
The scheduled selector will be ticked every frame
|
480
503
|
*/
|
@@ -515,6 +538,9 @@ enum {
|
|
515
538
|
*/
|
516
539
|
-(void) pauseSchedulerAndActions;
|
517
540
|
|
541
|
+
/* Update will be called automatically every frame if "scheduleUpdate" is called, and the node is "live"
|
542
|
+
*/
|
543
|
+
-(void) update:(ccTime)delta;
|
518
544
|
|
519
545
|
// transformation methods
|
520
546
|
|
@@ -528,7 +554,7 @@ enum {
|
|
528
554
|
@since v0.7.1
|
529
555
|
*/
|
530
556
|
- (CGAffineTransform)parentToNodeTransform;
|
531
|
-
/**
|
557
|
+
/** Returns the world affine transform matrix. The matrix is in Pixels.
|
532
558
|
@since v0.7.1
|
533
559
|
*/
|
534
560
|
- (CGAffineTransform)nodeToWorldTransform;
|
@@ -567,3 +593,27 @@ enum {
|
|
567
593
|
- (CGPoint)convertTouchToNodeSpaceAR:(UITouch *)touch;
|
568
594
|
#endif // __CC_PLATFORM_IOS
|
569
595
|
@end
|
596
|
+
|
597
|
+
|
598
|
+
#pragma mark - CCNodeRGBA
|
599
|
+
|
600
|
+
/** CCNodeRGBA is a subclass of CCNode that implements the CCRGBAProtocol protocol.
|
601
|
+
|
602
|
+
All features from CCNode are valid, plus the following new features:
|
603
|
+
- opacity
|
604
|
+
- RGB colors
|
605
|
+
|
606
|
+
Opacity/Color propagates into children that conform to the CCRGBAProtocol if cascadeOpacity/cascadeColor is enabled.
|
607
|
+
@since v2.1
|
608
|
+
*/
|
609
|
+
@interface CCNodeRGBA : CCNode <CCRGBAProtocol>
|
610
|
+
{
|
611
|
+
GLubyte _displayedOpacity, _realOpacity;
|
612
|
+
ccColor3B _displayedColor, _realColor;
|
613
|
+
BOOL _cascadeColorEnabled, _cascadeOpacityEnabled;
|
614
|
+
}
|
615
|
+
|
616
|
+
// XXX To make BridgeSupport happy
|
617
|
+
-(GLubyte) opacity;
|
618
|
+
|
619
|
+
@end
|
@@ -32,64 +32,86 @@
|
|
32
32
|
@interface CCParticleFire: CCParticleSystemQuad
|
33
33
|
{
|
34
34
|
}
|
35
|
+
// needed for BridgeSupport
|
36
|
+
-(id) init;
|
35
37
|
@end
|
36
38
|
|
37
39
|
//! A fireworks particle system
|
38
40
|
@interface CCParticleFireworks : CCParticleSystemQuad
|
39
41
|
{
|
40
42
|
}
|
43
|
+
// needed for BridgeSupport
|
44
|
+
-(id) init;
|
41
45
|
@end
|
42
46
|
|
43
47
|
//! A sun particle system
|
44
48
|
@interface CCParticleSun : CCParticleSystemQuad
|
45
49
|
{
|
46
50
|
}
|
51
|
+
// needed for BridgeSupport
|
52
|
+
-(id) init;
|
47
53
|
@end
|
48
54
|
|
49
55
|
//! A galaxy particle system
|
50
56
|
@interface CCParticleGalaxy : CCParticleSystemQuad
|
51
57
|
{
|
52
58
|
}
|
59
|
+
// needed for BridgeSupport
|
60
|
+
-(id) init;
|
53
61
|
@end
|
54
62
|
|
55
63
|
//! A flower particle system
|
56
64
|
@interface CCParticleFlower : CCParticleSystemQuad
|
57
65
|
{
|
58
66
|
}
|
67
|
+
// needed for BridgeSupport
|
68
|
+
-(id) init;
|
59
69
|
@end
|
60
70
|
|
61
71
|
//! A meteor particle system
|
62
72
|
@interface CCParticleMeteor : CCParticleSystemQuad
|
63
73
|
{
|
64
74
|
}
|
75
|
+
// needed for BridgeSupport
|
76
|
+
-(id) init;
|
65
77
|
@end
|
66
78
|
|
67
79
|
//! An spiral particle system
|
68
80
|
@interface CCParticleSpiral : CCParticleSystemQuad
|
69
81
|
{
|
70
82
|
}
|
83
|
+
// needed for BridgeSupport
|
84
|
+
-(id) init;
|
71
85
|
@end
|
72
86
|
|
73
87
|
//! An explosion particle system
|
74
88
|
@interface CCParticleExplosion : CCParticleSystemQuad
|
75
89
|
{
|
76
90
|
}
|
91
|
+
// needed for BridgeSupport
|
92
|
+
-(id) init;
|
77
93
|
@end
|
78
94
|
|
79
95
|
//! An smoke particle system
|
80
96
|
@interface CCParticleSmoke : CCParticleSystemQuad
|
81
97
|
{
|
82
98
|
}
|
99
|
+
// needed for BridgeSupport
|
100
|
+
-(id) init;
|
83
101
|
@end
|
84
102
|
|
85
103
|
//! An snow particle system
|
86
104
|
@interface CCParticleSnow : CCParticleSystemQuad
|
87
105
|
{
|
88
106
|
}
|
107
|
+
// needed for BridgeSupport
|
108
|
+
-(id) init;
|
89
109
|
@end
|
90
110
|
|
91
111
|
//! A rain particle system
|
92
112
|
@interface CCParticleRain : CCParticleSystemQuad
|
93
113
|
{
|
94
114
|
}
|
115
|
+
// needed for BridgeSupport
|
116
|
+
-(id) init;
|
95
117
|
@end
|
@@ -169,25 +169,25 @@ typedef void (*CC_UPDATE_PARTICLE_IMP)(id, SEL, tCCParticle*, CGPoint);
|
|
169
169
|
@interface CCParticleSystem : CCNode <CCTextureProtocol>
|
170
170
|
{
|
171
171
|
// is the particle system active ?
|
172
|
-
BOOL
|
172
|
+
BOOL _active;
|
173
173
|
// duration in seconds of the system. -1 is infinity
|
174
|
-
float
|
174
|
+
float _duration;
|
175
175
|
// time elapsed since the start of the system (in seconds)
|
176
|
-
float
|
176
|
+
float _elapsed;
|
177
177
|
|
178
178
|
// position is from "superclass" CocosNode
|
179
|
-
CGPoint
|
179
|
+
CGPoint _sourcePosition;
|
180
180
|
// Position variance
|
181
|
-
CGPoint
|
181
|
+
CGPoint _posVar;
|
182
182
|
|
183
183
|
// The angle (direction) of the particles measured in degrees
|
184
|
-
float
|
184
|
+
float _angle;
|
185
185
|
// Angle variance measured in degrees;
|
186
|
-
float
|
186
|
+
float _angleVar;
|
187
187
|
|
188
188
|
// Different modes
|
189
189
|
|
190
|
-
NSInteger
|
190
|
+
NSInteger _emitterMode;
|
191
191
|
union {
|
192
192
|
// Mode A:Gravity + Tangential Accel + Radial Accel
|
193
193
|
struct {
|
@@ -226,81 +226,81 @@ typedef void (*CC_UPDATE_PARTICLE_IMP)(id, SEL, tCCParticle*, CGPoint);
|
|
226
226
|
// Variance in degrees for rotatePerSecond
|
227
227
|
float rotatePerSecondVar;
|
228
228
|
} B;
|
229
|
-
}
|
229
|
+
} _mode;
|
230
230
|
|
231
231
|
// start ize of the particles
|
232
|
-
float
|
232
|
+
float _startSize;
|
233
233
|
// start Size variance
|
234
|
-
float
|
234
|
+
float _startSizeVar;
|
235
235
|
// End size of the particle
|
236
|
-
float
|
236
|
+
float _endSize;
|
237
237
|
// end size of variance
|
238
|
-
float
|
238
|
+
float _endSizeVar;
|
239
239
|
|
240
240
|
// How many seconds will the particle live
|
241
|
-
float
|
241
|
+
float _life;
|
242
242
|
// Life variance
|
243
|
-
float
|
243
|
+
float _lifeVar;
|
244
244
|
|
245
245
|
// Start color of the particles
|
246
|
-
ccColor4F
|
246
|
+
ccColor4F _startColor;
|
247
247
|
// Start color variance
|
248
|
-
ccColor4F
|
248
|
+
ccColor4F _startColorVar;
|
249
249
|
// End color of the particles
|
250
|
-
ccColor4F
|
250
|
+
ccColor4F _endColor;
|
251
251
|
// End color variance
|
252
|
-
ccColor4F
|
252
|
+
ccColor4F _endColorVar;
|
253
253
|
|
254
254
|
// start angle of the particles
|
255
|
-
float
|
255
|
+
float _startSpin;
|
256
256
|
// start angle variance
|
257
|
-
float
|
257
|
+
float _startSpinVar;
|
258
258
|
// End angle of the particle
|
259
|
-
float
|
259
|
+
float _endSpin;
|
260
260
|
// end angle ariance
|
261
|
-
float
|
261
|
+
float _endSpinVar;
|
262
262
|
|
263
263
|
// Array of particles
|
264
|
-
tCCParticle *
|
264
|
+
tCCParticle *_particles;
|
265
265
|
// Maximum particles
|
266
|
-
NSUInteger
|
266
|
+
NSUInteger _totalParticles;
|
267
267
|
// Count of active particles
|
268
|
-
NSUInteger
|
268
|
+
NSUInteger _particleCount;
|
269
269
|
// Number of allocated particles
|
270
|
-
NSUInteger
|
270
|
+
NSUInteger _allocatedParticles;
|
271
271
|
|
272
272
|
// How many particles can be emitted per second
|
273
|
-
float
|
274
|
-
float
|
273
|
+
float _emissionRate;
|
274
|
+
float _emitCounter;
|
275
275
|
|
276
276
|
// Texture of the particles
|
277
|
-
CCTexture2D *
|
277
|
+
CCTexture2D *_texture;
|
278
278
|
// blend function
|
279
|
-
ccBlendFunc
|
279
|
+
ccBlendFunc _blendFunc;
|
280
280
|
// Texture alpha behavior
|
281
|
-
BOOL
|
281
|
+
BOOL _opacityModifyRGB;
|
282
282
|
|
283
283
|
// movment type: free or grouped
|
284
|
-
tCCPositionType
|
284
|
+
tCCPositionType _positionType;
|
285
285
|
|
286
286
|
// Whether or not the node will be auto-removed when there are not particles
|
287
|
-
BOOL
|
287
|
+
BOOL _autoRemoveOnFinish;
|
288
288
|
|
289
289
|
// particle idx
|
290
|
-
NSUInteger
|
290
|
+
NSUInteger _particleIdx;
|
291
291
|
|
292
292
|
// Optimization
|
293
|
-
CC_UPDATE_PARTICLE_IMP
|
294
|
-
SEL
|
293
|
+
CC_UPDATE_PARTICLE_IMP _updateParticleImp;
|
294
|
+
SEL _updateParticleSel;
|
295
295
|
|
296
296
|
// for batching. If nil, then it won't be batched
|
297
|
-
CCParticleBatchNode *
|
297
|
+
CCParticleBatchNode *_batchNode;
|
298
298
|
|
299
299
|
// index of system in batch node array
|
300
|
-
NSUInteger
|
300
|
+
NSUInteger _atlasIndex;
|
301
301
|
|
302
302
|
//YES if scaled or rotated
|
303
|
-
BOOL
|
303
|
+
BOOL _transformSystemDirty;
|
304
304
|
}
|
305
305
|
|
306
306
|
/** Is the emitter active */
|
@@ -419,6 +419,12 @@ typedef void (*CC_UPDATE_PARTICLE_IMP)(id, SEL, tCCParticle*, CGPoint);
|
|
419
419
|
*/
|
420
420
|
+(id) particleWithFile:(NSString*)plistFile;
|
421
421
|
|
422
|
+
/* creates an void particle emitter with a maximun number of particles.
|
423
|
+
@since v2.1
|
424
|
+
*/
|
425
|
+
+(id) particleWithTotalParticles:(NSUInteger) numberOfParticles;
|
426
|
+
|
427
|
+
|
422
428
|
/** initializes a CCParticleSystem from a plist file.
|
423
429
|
This plist files can be creted manually or with Particle Designer:
|
424
430
|
http://particledesigner.71squared.com/
|
@@ -431,6 +437,11 @@ typedef void (*CC_UPDATE_PARTICLE_IMP)(id, SEL, tCCParticle*, CGPoint);
|
|
431
437
|
*/
|
432
438
|
-(id) initWithDictionary:(NSDictionary*)dictionary;
|
433
439
|
|
440
|
+
/** initializes a particle system from a NSDictionary and the path from where to load the png
|
441
|
+
@since v2.1
|
442
|
+
*/
|
443
|
+
-(id) initWithDictionary:(NSDictionary *)dictionary path:(NSString*)dirname;
|
444
|
+
|
434
445
|
//! Initializes a system with a fixed number of particles
|
435
446
|
-(id) initWithTotalParticles:(NSUInteger) numberOfParticles;
|
436
447
|
//! stop emitting particles. Running particles will continue to run until they die
|
@@ -46,10 +46,10 @@
|
|
46
46
|
*/
|
47
47
|
@interface CCParticleSystemQuad : CCParticleSystem
|
48
48
|
{
|
49
|
-
ccV3F_C4B_T2F_Quad *
|
50
|
-
GLushort *
|
51
|
-
GLuint
|
52
|
-
GLuint
|
49
|
+
ccV3F_C4B_T2F_Quad *_quads; // quads to be rendered
|
50
|
+
GLushort *_indices; // indices
|
51
|
+
GLuint _VAOname;
|
52
|
+
GLuint _buffersVBO[2]; //0: vertex 1: indices
|
53
53
|
}
|
54
54
|
|
55
55
|
/** initialices the indices for the vertices */
|
@@ -0,0 +1,58 @@
|
|
1
|
+
/* Copyright (c) 2012 Scott Lembcke and Howling Moon Software
|
2
|
+
*
|
3
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
* of this software and associated documentation files (the "Software"), to deal
|
5
|
+
* in the Software without restriction, including without limitation the rights
|
6
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
* copies of the Software, and to permit persons to whom the Software is
|
8
|
+
* furnished to do so, subject to the following conditions:
|
9
|
+
*
|
10
|
+
* The above copyright notice and this permission notice shall be included in
|
11
|
+
* all copies or substantial portions of the Software.
|
12
|
+
*
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
+
* SOFTWARE.
|
20
|
+
*/
|
21
|
+
|
22
|
+
#import "ccConfig.h"
|
23
|
+
|
24
|
+
#if CC_ENABLE_CHIPMUNK_INTEGRATION
|
25
|
+
|
26
|
+
#import "chipmunk.h"
|
27
|
+
|
28
|
+
#import "CCDrawNode.h"
|
29
|
+
|
30
|
+
@class ChipmunkSpace;
|
31
|
+
|
32
|
+
/**
|
33
|
+
A Node that draws the components of a physics engine.
|
34
|
+
|
35
|
+
Supported physics engines:
|
36
|
+
- Chipmunk
|
37
|
+
- Objective-Chipmunk
|
38
|
+
|
39
|
+
@since v2.1
|
40
|
+
*/
|
41
|
+
@interface CCPhysicsDebugNode : CCDrawNode
|
42
|
+
{
|
43
|
+
ChipmunkSpace *_spaceObj;
|
44
|
+
cpSpace *_spacePtr;
|
45
|
+
}
|
46
|
+
|
47
|
+
// property for the cpSpace
|
48
|
+
@property (nonatomic, readwrite, assign) cpSpace *space;
|
49
|
+
|
50
|
+
/** Create a debug node for an Objective-Chipmunk space. */
|
51
|
+
+ (id) debugNodeForChipmunkSpace:(ChipmunkSpace *)space;
|
52
|
+
|
53
|
+
/** Create a debug node for a regular Chipmunk space. */
|
54
|
+
+ (id) debugNodeForCPSpace:(cpSpace *)space;
|
55
|
+
|
56
|
+
@end
|
57
|
+
|
58
|
+
#endif // CC_ENABLE_CHIPMUNK_INTEGRATION
|
@@ -0,0 +1,82 @@
|
|
1
|
+
/* Copyright (c) 2012 Scott Lembcke and Howling Moon Software
|
2
|
+
*
|
3
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
* of this software and associated documentation files (the "Software"), to deal
|
5
|
+
* in the Software without restriction, including without limitation the rights
|
6
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
* copies of the Software, and to permit persons to whom the Software is
|
8
|
+
* furnished to do so, subject to the following conditions:
|
9
|
+
*
|
10
|
+
* The above copyright notice and this permission notice shall be included in
|
11
|
+
* all copies or substantial portions of the Software.
|
12
|
+
*
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
+
* SOFTWARE.
|
20
|
+
*/
|
21
|
+
|
22
|
+
#import "ccConfig.h"
|
23
|
+
#import "CCSprite.h"
|
24
|
+
|
25
|
+
|
26
|
+
#if CC_ENABLE_CHIPMUNK_INTEGRATION
|
27
|
+
#import "chipmunk.h"
|
28
|
+
@class ChipmunkBody;
|
29
|
+
|
30
|
+
#elif CC_ENABLE_BOX2D_INTEGRATION
|
31
|
+
class b2Body;
|
32
|
+
#endif // CC_ENABLE_BOX2D_INTEGRATION
|
33
|
+
|
34
|
+
/** A CCSprite subclass that is bound to a physics body.
|
35
|
+
It works with:
|
36
|
+
- Chipmunk: Preprocessor macro CC_ENABLE_CHIPMUNK_INTEGRATION should be defined
|
37
|
+
- Objective-Chipmunk: Preprocessor macro CC_ENABLE_CHIPMUNK_INTEGRATION should be defined
|
38
|
+
- Box2d: Preprocessor macro CC_ENABLE_BOX2D_INTEGRATION should be defined
|
39
|
+
|
40
|
+
Features and Limitations:
|
41
|
+
- Scale and Skew properties are ignored.
|
42
|
+
- Position and rotation are going to updated from the physics body
|
43
|
+
- If you update the rotation or position manually, the physics body will be updated
|
44
|
+
- You can't eble both Chipmunk support and Box2d support at the same time. Only one can be enabled at compile time
|
45
|
+
*/
|
46
|
+
@interface CCPhysicsSprite : CCSprite
|
47
|
+
{
|
48
|
+
BOOL _ignoreBodyRotation;
|
49
|
+
|
50
|
+
#if CC_ENABLE_CHIPMUNK_INTEGRATION
|
51
|
+
cpBody *_cpBody;
|
52
|
+
|
53
|
+
#elif CC_ENABLE_BOX2D_INTEGRATION
|
54
|
+
b2Body *_b2Body;
|
55
|
+
|
56
|
+
// Pixels to Meters ratio
|
57
|
+
float _PTMRatio;
|
58
|
+
#endif // CC_ENABLE_BOX2D_INTEGRATION
|
59
|
+
}
|
60
|
+
|
61
|
+
/** Keep the sprite's rotation separate from the body. */
|
62
|
+
@property(nonatomic, assign) BOOL ignoreBodyRotation;
|
63
|
+
|
64
|
+
#if CC_ENABLE_CHIPMUNK_INTEGRATION
|
65
|
+
|
66
|
+
/** Body accessor when using regular Chipmunk */
|
67
|
+
@property(nonatomic, assign) cpBody *CPBody;
|
68
|
+
|
69
|
+
/** Body accessor when using Objective-Chipmunk */
|
70
|
+
@property(nonatomic, assign) ChipmunkBody *chipmunkBody;
|
71
|
+
|
72
|
+
|
73
|
+
#elif CC_ENABLE_BOX2D_INTEGRATION
|
74
|
+
|
75
|
+
/** Body accessor when using box2d */
|
76
|
+
@property(nonatomic, assign) b2Body *b2Body;
|
77
|
+
|
78
|
+
@property(nonatomic, assign) float PTMRatio;
|
79
|
+
|
80
|
+
#endif // CC_ENABLE_BOX2D_INTEGRATION
|
81
|
+
|
82
|
+
@end
|