joybox 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/LICENSE +1 -1
- data/LICENSE_Box2D +20 -0
- data/LICENSE_Cocos2D +24 -0
- data/README.md +34 -66
- data/Rakefile +2 -3
- data/bin/joybox +49 -0
- data/command/joybox/USAGE +24 -0
- data/command/joybox/templates/layer.erb +11 -0
- data/command/joybox/templates/layer_spec.erb +3 -0
- data/command/joybox/templates/scene.erb +11 -0
- data/command/joybox/templates/scene_spec.erb +3 -0
- data/command/joybox/templates/sprite.erb +11 -0
- data/command/joybox/templates/sprite_spec.erb +3 -0
- data/command/joybox_generate_command.rb +114 -0
- data/joybox.gemspec +44 -0
- data/lib/joybox/joybox-ios.rb +47 -0
- data/lib/joybox/joybox-osx.rb +47 -0
- data/lib/joybox/version.rb +1 -1
- data/lib/joybox.rb +18 -36
- data/{lib/joybox/cocos2d → motion/joybox}/actions/actions.rb +0 -0
- data/motion/joybox/actions/animate.rb +22 -0
- data/motion/joybox/actions/bezier.rb +33 -0
- data/motion/joybox/actions/blink.rb +24 -0
- data/motion/joybox/actions/ease.rb +149 -0
- data/motion/joybox/actions/fade.rb +38 -0
- data/motion/joybox/actions/jump.rb +39 -0
- data/{lib/joybox/cocos2d → motion/joybox}/actions/move.rb +4 -2
- data/motion/joybox/actions/place.rb +22 -0
- data/{lib/joybox/cocos2d → motion/joybox}/actions/repeat.rb +10 -1
- data/{lib/joybox/cocos2d → motion/joybox}/actions/rotate.rb +4 -2
- data/{lib/joybox/cocos2d → motion/joybox}/actions/scale.rb +4 -2
- data/{lib/joybox/cocos2d → motion/joybox}/actions/sequence.rb +3 -3
- data/{lib/joybox/cocos2d → motion/joybox}/actions/skew.rb +0 -0
- data/motion/joybox/actions/spawn.rb +22 -0
- data/motion/joybox/actions/tint.rb +37 -0
- data/motion/joybox/animations/animation.rb +60 -0
- data/{lib/joybox/cocos2d → motion/joybox}/common/color.rb +12 -1
- data/{lib/joybox/cocos2d → motion/joybox}/common/gc_size.rb +4 -4
- data/{lib/joybox/cocos2d → motion/joybox}/common/ns_set.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/common/numeric.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/common/screen.rb +4 -4
- data/motion/joybox/core/layer.rb +51 -0
- data/{lib/joybox/cocos2d → motion/joybox}/core/node.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/core/scene.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/core/sprite.rb +22 -3
- data/{lib/joybox/cocos2d → motion/joybox}/core/sprite_batch.rb +0 -0
- data/motion/joybox/core/sprite_frame_cache.rb +147 -0
- data/{lib/joybox/cocos2d/cocos2d.rb → motion/joybox/joybox.rb} +3 -1
- data/{lib/joybox/cocos2d → motion/joybox}/macros.rb +0 -0
- data/{lib/joybox/box2d → motion/joybox/physics}/body.rb +44 -17
- data/{lib/joybox/cocos2d/core → motion/joybox/physics}/physics_sprite.rb +1 -1
- data/motion/joybox/physics/world.rb +79 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/label.rb +3 -2
- data/{lib/joybox/cocos2d → motion/joybox}/ui/menu.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/menu_image.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/menu_label.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox}/ui/ui.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/common/cg_point.rb +9 -2
- data/{lib/joybox/cocos2d → motion/joybox-ios}/common/ui_touch.rb +1 -1
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/configuration.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/file_utils.rb +0 -3
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/gl_view.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/configuration/texture_2d.rb +0 -0
- data/{lib/joybox/cocos2d → motion/joybox-ios}/core/layer.rb +1 -45
- data/{lib/joybox/cocos2d → motion/joybox-ios}/director.rb +6 -6
- data/motion/joybox-osx/common/ats_point.rb +48 -0
- data/motion/joybox-osx/common/ns_event.rb +8 -0
- data/motion/joybox-osx/configuration/configuration.rb +46 -0
- data/motion/joybox-osx/configuration/gl_view.rb +57 -0
- data/motion/joybox-osx/core/layer.rb +135 -0
- data/motion/joybox-osx/director.rb +42 -0
- data/template/joybox-ios/files/Rakefile.erb +9 -0
- data/{app → template/joybox-ios/files/app}/app_delegate.rb +1 -5
- data/{resources → template/joybox-ios/files/resources}/fps_images-hd.png +0 -0
- data/{resources → template/joybox-ios/files/resources}/fps_images-ipadhd.png +0 -0
- data/{resources → template/joybox-ios/files/resources}/fps_images.png +0 -0
- data/template/joybox-ios/files/spec/main_spec.rb.erb +9 -0
- data/template/joybox-osx/files/Rakefile.erb +9 -0
- data/template/joybox-osx/files/app/app_delegate.rb +23 -0
- data/template/joybox-osx/files/app/layers/default_layer.rb +5 -0
- data/template/joybox-osx/files/app/menu.rb +51 -0
- data/template/joybox-osx/files/resources/Credits.rtf +29 -0
- data/template/joybox-osx/files/resources/fps_images-hd.png +0 -0
- data/template/joybox-osx/files/resources/fps_images-ipadhd.png +0 -0
- data/template/joybox-osx/files/resources/fps_images.png +0 -0
- data/template/joybox-osx/files/spec/main_spec.rb.erb +9 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Box2D +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Box2D.framework.bridgesupport +47 -37
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Box2D +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/B2DContactListener.h +0 -0
- data/vendor/vendor-ios/Box2D.framework/Versions/A/Headers/Collision/Shapes/B2DCircleShape.h +16 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DEdgeShape.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DPolygonShape.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Collision/Shapes/B2DShape.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Dynamics/B2DBody.h +6 -6
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Headers/Dynamics/B2DWorld.h +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Resources/Box2DConfig.cmake +0 -0
- data/vendor/{Box2D.framework → vendor-ios/Box2D.framework}/Versions/A/Resources/CMakeLists.txt +0 -0
- data/vendor/vendor-ios/Box2D.framework/Versions/A/Resources/LICENSE +22 -0
- data/vendor/vendor-ios/cocos_2d/cocos_2d.bridgesupport +9154 -0
- data/vendor/vendor-ios/cocos_2d/cocos_2d_exceptions.bridgesupport +39 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAction.h +23 -23
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionCamera.h +21 -19
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionCatmullRom.h +18 -6
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionEase.h +117 -31
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionGrid.h +19 -17
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionGrid3D.h +45 -42
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionInstant.h +21 -13
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionInterval.h +123 -81
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionManager.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionPageTurn3D.h +2 -1
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionProgressTimer.h +4 -4
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionTiledGrid.h +46 -38
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCActionTween.h +3 -3
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAnimation.h +8 -8
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAnimationCache.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCAtlasNode.h +19 -17
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCCamera.h +12 -12
- data/vendor/vendor-ios/cocos_2d/include/CCClippingNode.h +77 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCConfiguration.h +31 -13
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCDirector.h +51 -42
- data/vendor/vendor-ios/cocos_2d/include/CCDrawNode.h +65 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCDrawingPrimitives.h +42 -8
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGLProgram.h +56 -21
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGrabber.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCGrid.h +29 -29
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelAtlas.h +5 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelBMFont.h +56 -32
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLabelTTF.h +20 -20
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCLayer.h +107 -79
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMenu.h +10 -14
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMenuItem.h +37 -32
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCMotionStreak.h +18 -19
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCNode+Debug.h +0 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCNode.h +87 -37
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParallaxNode.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleBatchNode.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleExamples.h +22 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleSystem.h +51 -40
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCParticleSystemQuad.h +4 -4
- data/vendor/vendor-ios/cocos_2d/include/CCPhysicsDebugNode.h +58 -0
- data/vendor/vendor-ios/cocos_2d/include/CCPhysicsSprite.h +82 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCProgressTimer.h +9 -11
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCProtocols.h +54 -26
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCRenderTexture.h +29 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCScene.h +4 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCScheduler.h +94 -40
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCShaderCache.h +1 -1
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSprite.h +21 -28
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteBatchNode.h +16 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteFrame.h +10 -10
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCSpriteFrameCache.h +6 -6
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXLayer.h +16 -16
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXObjectGroup.h +4 -4
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXTiledMap.h +9 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTMXXMLParser.h +44 -33
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTexture2D.h +17 -25
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTextureAtlas.h +10 -10
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTextureCache.h +4 -4
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTexturePVR.h +25 -8
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTileMapAtlas.h +6 -6
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransition.h +57 -12
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransitionPageTurn.h +2 -2
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/CCTransitionProgress.h +27 -5
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms}/CCGL.h +4 -2
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms}/CCNS.h +0 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCDirectorMac.h +110 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCEventDispatcher.h +343 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCGLView.h +103 -0
- data/vendor/vendor-ios/cocos_2d/include/Platforms/Mac/CCWindow.h +41 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCDirectorIOS.h +12 -5
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCES2Renderer.h +12 -12
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCESRenderer.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCGLView.h +28 -13
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchDelegateProtocol.h +4 -4
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchDispatcher.h +2 -2
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Platforms/iOS}/CCTouchHandler.h +7 -7
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCArray.h +1 -1
- data/vendor/vendor-ios/cocos_2d/include/Support/CCFileUtils.h +394 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCProfiling.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CCVertex.h +1 -1
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/CGPointExtension.h +4 -2
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/NSThread+performBlock.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/OpenGL_Internal.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/TGAlib.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/TransformUtils.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ZipUtils.h +4 -4
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/base64.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ccCArray.h +15 -15
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/ccUtils.h +0 -0
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/uthash.h +129 -184
- data/vendor/{Cocos2D/include → vendor-ios/cocos_2d/include/Support}/utlist.h +298 -55
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccConfig.h +56 -9
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccDeprecated.h +131 -0
- data/vendor/vendor-ios/cocos_2d/include/ccFPSImages.h +39 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccGLStateCache.h +44 -26
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccMacros.h +9 -9
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColorLengthTexture_frag.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColorLengthTexture_vert.h +47 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColor_frag.h +37 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionColor_vert.h +40 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureA8Color_frag.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureA8Color_vert.h +45 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColorAlphaTest_frag.h +47 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColor_frag.h +39 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTextureColor_vert.h +45 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_frag.h +38 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_uColor_frag.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_uColor_vert.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_PositionTexture_vert.h +41 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_Position_uColor_frag.h +37 -0
- data/vendor/vendor-ios/cocos_2d/include/ccShader_Position_uColor_vert.h +43 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/ccShaders.h +11 -0
- data/vendor/vendor-ios/cocos_2d/include/ccTypes.h +392 -0
- data/vendor/vendor-ios/cocos_2d/include/cocos2d-ios-exceptions.bridgesupport +39 -0
- data/vendor/{Cocos2D → vendor-ios/cocos_2d}/include/cocos2d.h +28 -3
- data/vendor/vendor-ios/cocos_2d/include/gen_cocos2d_bridgesupport.sh +17 -0
- data/vendor/vendor-ios/cocos_2d/include/gen_cocos2d_complement.sh +17 -0
- data/vendor/vendor-ios/cocos_2d/libcocos2d.a +0 -0
- data/vendor/vendor-osx/box_2d/box_2d.bridgesupport +176 -0
- data/vendor/vendor-osx/box_2d/include/B2DBody.h +46 -0
- data/vendor/vendor-osx/box_2d/include/B2DCircleShape.h +16 -0
- data/vendor/vendor-osx/box_2d/include/B2DContactListener.h +30 -0
- data/vendor/vendor-osx/box_2d/include/B2DEdgeShape.h +17 -0
- data/vendor/vendor-osx/box_2d/include/B2DPolygonShape.h +16 -0
- data/vendor/vendor-osx/box_2d/include/B2DShape.h +18 -0
- data/vendor/vendor-osx/box_2d/include/B2DWorld.h +44 -0
- data/vendor/vendor-osx/box_2d/libBox2D.a +0 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d.bridgesupport +8292 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAction.h +195 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionCamera.h +75 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionCatmullRom.h +151 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionEase.h +245 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionGrid.h +167 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionGrid3D.h +208 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionInstant.h +235 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionInterval.h +473 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionManager.h +113 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionPageTurn3D.h +43 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionProgressTimer.h +59 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionTiledGrid.h +219 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCActionTween.h +62 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAnimation.h +150 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAnimationCache.h +74 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCAtlasNode.h +98 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCCamera.h +98 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCClippingNode.h +77 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCConfiguration.h +144 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDirector.h +353 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDrawNode.h +65 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCDrawingPrimitives.h +173 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGLProgram.h +185 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGrabber.h +44 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCGrid.h +130 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelAtlas.h +71 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelBMFont.h +240 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLabelTTF.h +132 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCLayer.h +308 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMenu.h +96 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMenuItem.h +428 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCMotionStreak.h +86 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCNode+Debug.h +39 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCNode.h +619 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParallaxNode.h +50 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleBatchNode.h +99 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleExamples.h +117 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleSystem.h +464 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCParticleSystemQuad.h +73 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCPhysicsDebugNode.h +58 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCPhysicsSprite.h +82 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCProgressTimer.h +92 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCProtocols.h +160 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCRenderTexture.h +159 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCScene.h +47 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCScheduler.h +284 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCShaderCache.h +60 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSprite.h +281 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteBatchNode.h +145 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteFrame.h +126 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCSpriteFrameCache.h +121 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXLayer.h +164 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXObjectGroup.h +67 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXTiledMap.h +145 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTMXXMLParser.h +228 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTexture2D.h +349 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTextureAtlas.h +188 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTextureCache.h +146 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTexturePVR.h +146 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTileMapAtlas.h +83 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransition.h +341 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransitionPageTurn.h +60 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/CCTransitionProgress.h +84 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/CCGL.h +74 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/CCNS.h +54 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCDirectorMac.h +110 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCEventDispatcher.h +343 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCGLView.h +103 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Platforms/Mac/CCWindow.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCArray.h +119 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCFileUtils.h +394 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCProfiling.h +89 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CCVertex.h +36 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/CGPointExtension.h +346 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/NSThread+performBlock.h +22 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/OpenGL_Internal.h +86 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/TGAlib.h +55 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/TransformUtils.h +36 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ZipUtils.h +91 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/base64.h +33 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ccCArray.h +229 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/ccUtils.h +36 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/uthash.h +917 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/utlist.h +733 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccConfig.h +292 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccDeprecated.h +431 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccFPSImages.h +39 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccGLStateCache.h +156 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccMacros.h +353 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColorLengthTexture_frag.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColorLengthTexture_vert.h +47 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColor_frag.h +37 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionColor_vert.h +40 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureA8Color_frag.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureA8Color_vert.h +45 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColorAlphaTest_frag.h +47 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColor_frag.h +39 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTextureColor_vert.h +45 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_frag.h +38 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_uColor_frag.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_uColor_vert.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_PositionTexture_vert.h +41 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_Position_uColor_frag.h +37 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShader_Position_uColor_vert.h +43 -0
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/ccShaders.h +56 -0
- data/vendor/{Cocos2D/include → vendor-osx/cocos_2d/cocos_2d_include}/ccTypes.h +39 -35
- data/vendor/vendor-osx/cocos_2d/cocos_2d_include/cocos2d.h +203 -0
- data/vendor/vendor-osx/cocos_2d/libcocos2d.a +0 -0
- metadata +363 -195
- data/app/layers/box2d_layer.rb +0 -109
- data/app/layers/cocos2d_layer.rb +0 -14
- data/app/layers/cocos_motion_layer.rb +0 -145
- data/app/layers/menu_layer.rb +0 -59
- data/lib/joybox/box2d/world.rb +0 -79
- data/resources/box2d/blocks_sprite_sheet.png +0 -0
- data/resources/cocos_motion/dot.png +0 -0
- data/resources/cocos_motion/dot_selected.png +0 -0
- data/resources/cocos_motion/grossini.png +0 -0
- data/resources/cocos_motion/grossinis_sister.png +0 -0
- data/resources/cocos_motion/grossinis_sister_two.png +0 -0
- data/resources/cocos_motion/left_arrow.png +0 -0
- data/resources/cocos_motion/left_arrow_selected.png +0 -0
- data/resources/cocos_motion/right_arrow.png +0 -0
- data/resources/cocos_motion/right_arrow_selected.png +0 -0
- data/vendor/Cocos2D/Cocos2D.bridgesupport +0 -7808
- data/vendor/Cocos2D/include/CCFileUtils.h +0 -188
- data/vendor/Cocos2D/include/CocosDenshion/CDAudioManager.h +0 -243
- data/vendor/Cocos2D/include/CocosDenshion/CDConfig.h +0 -60
- data/vendor/Cocos2D/include/CocosDenshion/CDOpenALSupport.h +0 -77
- data/vendor/Cocos2D/include/CocosDenshion/CDXPropertyModifierAction.h +0 -45
- data/vendor/Cocos2D/include/CocosDenshion/CocosDenshion.h +0 -440
- data/vendor/Cocos2D/include/CocosDenshion/SimpleAudioEngine.h +0 -90
- data/vendor/Cocos2D/include/RubyMotionSchedule.h +0 -7
- data/vendor/Cocos2D/include/ccShader_PositionColor_frag.h +0 -12
- data/vendor/Cocos2D/include/ccShader_PositionColor_vert.h +0 -17
- data/vendor/Cocos2D/include/ccShader_PositionTextureA8Color_frag.h +0 -16
- data/vendor/Cocos2D/include/ccShader_PositionTextureA8Color_vert.h +0 -21
- data/vendor/Cocos2D/include/ccShader_PositionTextureColorAlphaTest_frag.h +0 -23
- data/vendor/Cocos2D/include/ccShader_PositionTextureColor_frag.h +0 -14
- data/vendor/Cocos2D/include/ccShader_PositionTextureColor_vert.h +0 -22
- data/vendor/Cocos2D/include/ccShader_PositionTexture_frag.h +0 -13
- data/vendor/Cocos2D/include/ccShader_PositionTexture_uColor_frag.h +0 -16
- data/vendor/Cocos2D/include/ccShader_PositionTexture_uColor_vert.h +0 -18
- data/vendor/Cocos2D/include/ccShader_PositionTexture_vert.h +0 -17
- data/vendor/Cocos2D/include/ccShader_Position_uColor_frag.h +0 -12
- data/vendor/Cocos2D/include/ccShader_Position_uColor_vert.h +0 -19
- data/vendor/Cocos2D/include/kazmath/GL/mat4stack.h +0 -51
- data/vendor/Cocos2D/include/kazmath/GL/matrix.h +0 -58
- data/vendor/Cocos2D/include/kazmath/aabb.h +0 -53
- data/vendor/Cocos2D/include/kazmath/kazmath.h +0 -39
- data/vendor/Cocos2D/include/kazmath/mat3.h +0 -75
- data/vendor/Cocos2D/include/kazmath/mat4.h +0 -93
- data/vendor/Cocos2D/include/kazmath/neon_matrix_impl.h +0 -41
- data/vendor/Cocos2D/include/kazmath/plane.h +0 -70
- data/vendor/Cocos2D/include/kazmath/quaternion.h +0 -113
- data/vendor/Cocos2D/include/kazmath/ray2.h +0 -50
- data/vendor/Cocos2D/include/kazmath/utility.h +0 -74
- data/vendor/Cocos2D/include/kazmath/vec2.h +0 -64
- data/vendor/Cocos2D/include/kazmath/vec3.h +0 -68
- data/vendor/Cocos2D/include/kazmath/vec4.h +0 -68
- data/vendor/Cocos2D/libCocosDenshion.a +0 -0
- data/vendor/Cocos2D/libcocos2d.a +0 -0
@@ -0,0 +1,473 @@
|
|
1
|
+
/*
|
2
|
+
* cocos2d for iPhone: http://www.cocos2d-iphone.org
|
3
|
+
*
|
4
|
+
* Copyright (c) 2008-2011 Ricardo Quesada
|
5
|
+
* Copyright (c) 2011 Zynga Inc.
|
6
|
+
*
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
12
|
+
* furnished to do so, subject to the following conditions:
|
13
|
+
*
|
14
|
+
* The above copyright notice and this permission notice shall be included in
|
15
|
+
* all copies or substantial portions of the Software.
|
16
|
+
*
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
+
* THE SOFTWARE.
|
24
|
+
*
|
25
|
+
*/
|
26
|
+
|
27
|
+
|
28
|
+
#import "CCNode.h"
|
29
|
+
#import "CCAction.h"
|
30
|
+
#import "CCProtocols.h"
|
31
|
+
|
32
|
+
#include <sys/time.h>
|
33
|
+
|
34
|
+
/** An interval action is an action that takes place within a certain period of time.
|
35
|
+
It has an start time, and a finish time. The finish time is the parameter
|
36
|
+
duration plus the start time.
|
37
|
+
|
38
|
+
These CCActionInterval actions have some interesting properties, like:
|
39
|
+
- They can run normally (default)
|
40
|
+
- They can run reversed with the reverse method
|
41
|
+
- They can run with the time altered with the Accelerate, AccelDeccel and Speed actions.
|
42
|
+
|
43
|
+
For example, you can simulate a Ping Pong effect running the action normally and
|
44
|
+
then running it again in Reverse mode.
|
45
|
+
|
46
|
+
Example:
|
47
|
+
|
48
|
+
CCAction * pingPongAction = [CCSequence actions: action, [action reverse], nil];
|
49
|
+
*/
|
50
|
+
@interface CCActionInterval: CCFiniteTimeAction <NSCopying>
|
51
|
+
{
|
52
|
+
ccTime _elapsed;
|
53
|
+
BOOL _firstTick;
|
54
|
+
}
|
55
|
+
|
56
|
+
/** how many seconds had elapsed since the actions started to run. */
|
57
|
+
@property (nonatomic,readonly) ccTime elapsed;
|
58
|
+
|
59
|
+
/** creates the action */
|
60
|
+
+(id) actionWithDuration: (ccTime) d;
|
61
|
+
/** initializes the action */
|
62
|
+
-(id) initWithDuration: (ccTime) d;
|
63
|
+
/** returns YES if the action has finished */
|
64
|
+
-(BOOL) isDone;
|
65
|
+
/** returns a reversed action */
|
66
|
+
- (CCActionInterval*) reverse;
|
67
|
+
@end
|
68
|
+
|
69
|
+
/** Runs actions sequentially, one after another
|
70
|
+
*/
|
71
|
+
@interface CCSequence : CCActionInterval <NSCopying>
|
72
|
+
{
|
73
|
+
CCFiniteTimeAction *_actions[2];
|
74
|
+
ccTime _split;
|
75
|
+
int _last;
|
76
|
+
}
|
77
|
+
/** helper constructor to create an array of sequence-able actions */
|
78
|
+
+(id) actions: (CCFiniteTimeAction*) action1, ... NS_REQUIRES_NIL_TERMINATION;
|
79
|
+
/** helper constructor to create an array of sequence-able actions */
|
80
|
+
+(id) actions: (CCFiniteTimeAction*) action1 vaList:(va_list) args;
|
81
|
+
/** helper constructor to create an array of sequence-able actions given an array */
|
82
|
+
+(id) actionWithArray: (NSArray*) arrayOfActions;
|
83
|
+
/** creates the action */
|
84
|
+
+(id) actionOne:(CCFiniteTimeAction*)actionOne two:(CCFiniteTimeAction*)actionTwo;
|
85
|
+
/** initializes the action */
|
86
|
+
-(id) initOne:(CCFiniteTimeAction*)actionOne two:(CCFiniteTimeAction*)actionTwo;
|
87
|
+
@end
|
88
|
+
|
89
|
+
|
90
|
+
/** Repeats an action a number of times.
|
91
|
+
* To repeat an action forever use the CCRepeatForever action.
|
92
|
+
*/
|
93
|
+
@interface CCRepeat : CCActionInterval <NSCopying>
|
94
|
+
{
|
95
|
+
NSUInteger _times;
|
96
|
+
NSUInteger _total;
|
97
|
+
ccTime _nextDt;
|
98
|
+
BOOL _isActionInstant;
|
99
|
+
CCFiniteTimeAction *_innerAction;
|
100
|
+
}
|
101
|
+
|
102
|
+
/** Inner action */
|
103
|
+
@property (nonatomic,readwrite,retain) CCFiniteTimeAction *innerAction;
|
104
|
+
|
105
|
+
/** creates a CCRepeat action. Times is an unsigned integer between 1 and MAX_UINT.
|
106
|
+
*/
|
107
|
+
+(id) actionWithAction:(CCFiniteTimeAction*)action times: (NSUInteger)times;
|
108
|
+
/** initializes a CCRepeat action. Times is an unsigned integer between 1 and MAX_UINT */
|
109
|
+
-(id) initWithAction:(CCFiniteTimeAction*)action times: (NSUInteger)times;
|
110
|
+
@end
|
111
|
+
|
112
|
+
/** Spawn a new action immediately
|
113
|
+
*/
|
114
|
+
@interface CCSpawn : CCActionInterval <NSCopying>
|
115
|
+
{
|
116
|
+
CCFiniteTimeAction *_one;
|
117
|
+
CCFiniteTimeAction *_two;
|
118
|
+
}
|
119
|
+
/** helper constructor to create an array of spawned actions */
|
120
|
+
+(id) actions: (CCFiniteTimeAction*) action1, ... NS_REQUIRES_NIL_TERMINATION;
|
121
|
+
/** helper constructor to create an array of spawned actions */
|
122
|
+
+(id) actions: (CCFiniteTimeAction*) action1 vaList:(va_list)args;
|
123
|
+
/** helper constructor to create an array of spawned actions given an array */
|
124
|
+
+(id) actionWithArray: (NSArray*) arrayOfActions;
|
125
|
+
/** creates the Spawn action */
|
126
|
+
+(id) actionOne: (CCFiniteTimeAction*) one two:(CCFiniteTimeAction*) two;
|
127
|
+
/** initializes the Spawn action with the 2 actions to spawn */
|
128
|
+
-(id) initOne: (CCFiniteTimeAction*) one two:(CCFiniteTimeAction*) two;
|
129
|
+
@end
|
130
|
+
|
131
|
+
/** Rotates a CCNode object to a certain angle by modifying it's
|
132
|
+
rotation attribute.
|
133
|
+
The direction will be decided by the shortest angle.
|
134
|
+
*/
|
135
|
+
@interface CCRotateTo : CCActionInterval <NSCopying>
|
136
|
+
{
|
137
|
+
float _dstAngleX;
|
138
|
+
float _startAngleX;
|
139
|
+
float _diffAngleX;
|
140
|
+
|
141
|
+
float _dstAngleY;
|
142
|
+
float _startAngleY;
|
143
|
+
float _diffAngleY;
|
144
|
+
}
|
145
|
+
/** creates the action */
|
146
|
+
+(id) actionWithDuration:(ccTime)duration angle:(float)angle;
|
147
|
+
/** initializes the action */
|
148
|
+
-(id) initWithDuration:(ccTime)duration angle:(float)angle;
|
149
|
+
|
150
|
+
/** creates the action with separate rotation angles */
|
151
|
+
+(id) actionWithDuration: (ccTime) t angleX:(float) aX angleY:(float) aY;
|
152
|
+
-(id) initWithDuration: (ccTime) t angleX:(float) aX angleY:(float) aY;
|
153
|
+
@end
|
154
|
+
|
155
|
+
/** Rotates a CCNode object clockwise a number of degrees by modifying its rotation attribute.
|
156
|
+
*/
|
157
|
+
@interface CCRotateBy : CCActionInterval <NSCopying>
|
158
|
+
{
|
159
|
+
float _angleX;
|
160
|
+
float _startAngleX;
|
161
|
+
float _angleY;
|
162
|
+
float _startAngleY;
|
163
|
+
}
|
164
|
+
/** creates the action */
|
165
|
+
+(id) actionWithDuration:(ccTime)duration angle:(float)deltaAngle;
|
166
|
+
/** initializes the action */
|
167
|
+
-(id) initWithDuration:(ccTime)duration angle:(float)deltaAngle;
|
168
|
+
|
169
|
+
/** creates the action with separate rotation angles */
|
170
|
+
+(id) actionWithDuration: (ccTime) t angleX:(float) aX angleY:(float) aY;
|
171
|
+
-(id) initWithDuration: (ccTime) t angleX:(float) aX angleY:(float) aY;
|
172
|
+
@end
|
173
|
+
|
174
|
+
/** Moves a CCNode object x,y pixels by modifying it's position attribute.
|
175
|
+
x and y are relative to the position of the object.
|
176
|
+
Several CCMoveBy actions can be concurrently called, and the resulting
|
177
|
+
movement will be the sum of individual movements.
|
178
|
+
@since v2.1beta2-custom
|
179
|
+
*/
|
180
|
+
@interface CCMoveBy : CCActionInterval <NSCopying>
|
181
|
+
{
|
182
|
+
CGPoint _positionDelta;
|
183
|
+
CGPoint _startPos;
|
184
|
+
CGPoint _previousPos;
|
185
|
+
}
|
186
|
+
/** creates the action */
|
187
|
+
+(id) actionWithDuration: (ccTime)duration position:(CGPoint)deltaPosition;
|
188
|
+
/** initializes the action */
|
189
|
+
-(id) initWithDuration: (ccTime)duration position:(CGPoint)deltaPosition;
|
190
|
+
@end
|
191
|
+
|
192
|
+
/** Moves a CCNode object to the position x,y. x and y are absolute coordinates by modifying it's position attribute.
|
193
|
+
Several CCMoveTo actions can be concurrently called, and the resulting
|
194
|
+
movement will be the sum of individual movements.
|
195
|
+
@since v2.1beta2-custom
|
196
|
+
*/
|
197
|
+
@interface CCMoveTo : CCMoveBy
|
198
|
+
{
|
199
|
+
CGPoint _endPosition;
|
200
|
+
}
|
201
|
+
/** creates the action */
|
202
|
+
+(id) actionWithDuration:(ccTime)duration position:(CGPoint)position;
|
203
|
+
/** initializes the action */
|
204
|
+
-(id) initWithDuration:(ccTime)duration position:(CGPoint)position;
|
205
|
+
@end
|
206
|
+
|
207
|
+
/** Skews a CCNode object to given angles by modifying its skewX and skewY attributes
|
208
|
+
@since v1.0
|
209
|
+
*/
|
210
|
+
@interface CCSkewTo : CCActionInterval <NSCopying>
|
211
|
+
{
|
212
|
+
float _skewX;
|
213
|
+
float _skewY;
|
214
|
+
float _startSkewX;
|
215
|
+
float _startSkewY;
|
216
|
+
float _endSkewX;
|
217
|
+
float _endSkewY;
|
218
|
+
float _deltaX;
|
219
|
+
float _deltaY;
|
220
|
+
}
|
221
|
+
/** creates the action */
|
222
|
+
+(id) actionWithDuration:(ccTime)t skewX:(float)sx skewY:(float)sy;
|
223
|
+
/** initializes the action with duration, skew X and skew Y */
|
224
|
+
-(id) initWithDuration:(ccTime)t skewX:(float)sx skewY:(float)sy;
|
225
|
+
@end
|
226
|
+
|
227
|
+
/** Skews a CCNode object by skewX and skewY degrees
|
228
|
+
@since v1.0
|
229
|
+
*/
|
230
|
+
@interface CCSkewBy : CCSkewTo <NSCopying>
|
231
|
+
{
|
232
|
+
}
|
233
|
+
/** initializes the action with duration, skew X and skew Y */
|
234
|
+
-(id) initWithDuration:(ccTime)t skewX:(float)sx skewY:(float)sy;
|
235
|
+
@end
|
236
|
+
|
237
|
+
/** Moves a CCNode object simulating a parabolic jump movement by modifying its position attribute.
|
238
|
+
*/
|
239
|
+
@interface CCJumpBy : CCActionInterval <NSCopying>
|
240
|
+
{
|
241
|
+
CGPoint _startPosition;
|
242
|
+
CGPoint _delta;
|
243
|
+
ccTime _height;
|
244
|
+
NSUInteger _jumps;
|
245
|
+
CGPoint _previousPos;
|
246
|
+
}
|
247
|
+
/** creates the action */
|
248
|
+
+(id) actionWithDuration: (ccTime)duration position:(CGPoint)position height:(ccTime)height jumps:(NSUInteger)jumps;
|
249
|
+
/** initializes the action */
|
250
|
+
-(id) initWithDuration: (ccTime)duration position:(CGPoint)position height:(ccTime)height jumps:(NSUInteger)jumps;
|
251
|
+
@end
|
252
|
+
|
253
|
+
/** Moves a CCNode object to a parabolic position simulating a jump movement by modifying its position attribute.
|
254
|
+
*/
|
255
|
+
@interface CCJumpTo : CCJumpBy <NSCopying>
|
256
|
+
{
|
257
|
+
}
|
258
|
+
// XXX: Added to prevent bug on BridgeSupport
|
259
|
+
-(void) startWithTarget:(CCNode *)aTarget;
|
260
|
+
@end
|
261
|
+
|
262
|
+
/** bezier configuration structure
|
263
|
+
*/
|
264
|
+
typedef struct _ccBezierConfig {
|
265
|
+
//! end position of the bezier
|
266
|
+
CGPoint endPosition;
|
267
|
+
//! Bezier control point 1
|
268
|
+
CGPoint controlPoint_1;
|
269
|
+
//! Bezier control point 2
|
270
|
+
CGPoint controlPoint_2;
|
271
|
+
} ccBezierConfig;
|
272
|
+
|
273
|
+
/** An action that moves the target with a cubic Bezier curve by a certain distance.
|
274
|
+
*/
|
275
|
+
@interface CCBezierBy : CCActionInterval <NSCopying>
|
276
|
+
{
|
277
|
+
ccBezierConfig _config;
|
278
|
+
CGPoint _startPosition;
|
279
|
+
CGPoint _previousPosition;
|
280
|
+
}
|
281
|
+
|
282
|
+
/** creates the action with a duration and a bezier configuration */
|
283
|
+
+(id) actionWithDuration: (ccTime) t bezier:(ccBezierConfig) c;
|
284
|
+
|
285
|
+
/** initializes the action with a duration and a bezier configuration */
|
286
|
+
-(id) initWithDuration: (ccTime) t bezier:(ccBezierConfig) c;
|
287
|
+
@end
|
288
|
+
|
289
|
+
/** An action that moves the target with a cubic Bezier curve to a destination point.
|
290
|
+
@since v0.8.2
|
291
|
+
*/
|
292
|
+
@interface CCBezierTo : CCBezierBy
|
293
|
+
{
|
294
|
+
ccBezierConfig _toConfig;
|
295
|
+
}
|
296
|
+
// XXX: Added to prevent bug on BridgeSupport
|
297
|
+
-(void) startWithTarget:(CCNode *)aTarget;
|
298
|
+
@end
|
299
|
+
|
300
|
+
/** Scales a CCNode object to a zoom factor by modifying its scale attribute.
|
301
|
+
@warning This action doesn't support "reverse"
|
302
|
+
*/
|
303
|
+
@interface CCScaleTo : CCActionInterval <NSCopying>
|
304
|
+
{
|
305
|
+
float _scaleX;
|
306
|
+
float _scaleY;
|
307
|
+
float _startScaleX;
|
308
|
+
float _startScaleY;
|
309
|
+
float _endScaleX;
|
310
|
+
float _endScaleY;
|
311
|
+
float _deltaX;
|
312
|
+
float _deltaY;
|
313
|
+
}
|
314
|
+
/** creates the action with the same scale factor for X and Y */
|
315
|
+
+(id) actionWithDuration: (ccTime)duration scale:(float) s;
|
316
|
+
/** initializes the action with the same scale factor for X and Y */
|
317
|
+
-(id) initWithDuration: (ccTime)duration scale:(float) s;
|
318
|
+
/** creates the action with and X factor and a Y factor */
|
319
|
+
+(id) actionWithDuration: (ccTime)duration scaleX:(float) sx scaleY:(float)sy;
|
320
|
+
/** initializes the action with and X factor and a Y factor */
|
321
|
+
-(id) initWithDuration: (ccTime)duration scaleX:(float) sx scaleY:(float)sy;
|
322
|
+
@end
|
323
|
+
|
324
|
+
/** Scales a CCNode object a zoom factor by modifying its scale attribute.
|
325
|
+
*/
|
326
|
+
@interface CCScaleBy : CCScaleTo <NSCopying>
|
327
|
+
{
|
328
|
+
}
|
329
|
+
// XXX: Added to prevent bug on BridgeSupport
|
330
|
+
-(void) startWithTarget:(CCNode *)aTarget;
|
331
|
+
@end
|
332
|
+
|
333
|
+
/** Blinks a CCNode object by modifying its visible attribute
|
334
|
+
*/
|
335
|
+
@interface CCBlink : CCActionInterval <NSCopying>
|
336
|
+
{
|
337
|
+
NSUInteger _times;
|
338
|
+
BOOL _originalState;
|
339
|
+
}
|
340
|
+
/** creates the action */
|
341
|
+
+(id) actionWithDuration: (ccTime)duration blinks:(NSUInteger)blinks;
|
342
|
+
/** initializes the action */
|
343
|
+
-(id) initWithDuration: (ccTime)duration blinks:(NSUInteger)blinks;
|
344
|
+
@end
|
345
|
+
|
346
|
+
/** Fades In an object that implements the CCRGBAProtocol protocol. It modifies the opacity from 0 to 255.
|
347
|
+
The "reverse" of this action is FadeOut
|
348
|
+
*/
|
349
|
+
@interface CCFadeIn : CCActionInterval <NSCopying>
|
350
|
+
{
|
351
|
+
}
|
352
|
+
// XXX: Added to prevent bug on BridgeSupport
|
353
|
+
-(void) update:(ccTime)dt;
|
354
|
+
@end
|
355
|
+
|
356
|
+
/** Fades Out an object that implements the CCRGBAProtocol protocol. It modifies the opacity from 255 to 0.
|
357
|
+
The "reverse" of this action is FadeIn
|
358
|
+
*/
|
359
|
+
@interface CCFadeOut : CCActionInterval <NSCopying>
|
360
|
+
{
|
361
|
+
}
|
362
|
+
// XXX: Added to prevent bug on BridgeSupport
|
363
|
+
-(void) update:(ccTime)dt;
|
364
|
+
@end
|
365
|
+
|
366
|
+
/** Fades an object that implements the CCRGBAProtocol protocol. It modifies the opacity from the current value to a custom one.
|
367
|
+
@warning This action doesn't support "reverse"
|
368
|
+
*/
|
369
|
+
@interface CCFadeTo : CCActionInterval <NSCopying>
|
370
|
+
{
|
371
|
+
GLubyte _toOpacity;
|
372
|
+
GLubyte _fromOpacity;
|
373
|
+
}
|
374
|
+
/** creates an action with duration and opacity */
|
375
|
+
+(id) actionWithDuration:(ccTime)duration opacity:(GLubyte)opactiy;
|
376
|
+
/** initializes the action with duration and opacity */
|
377
|
+
-(id) initWithDuration:(ccTime)duration opacity:(GLubyte)opacity;
|
378
|
+
@end
|
379
|
+
|
380
|
+
/** Tints a CCNode that implements the CCNodeRGB protocol from current tint to a custom one.
|
381
|
+
@warning This action doesn't support "reverse"
|
382
|
+
@since v0.7.2
|
383
|
+
*/
|
384
|
+
@interface CCTintTo : CCActionInterval <NSCopying>
|
385
|
+
{
|
386
|
+
ccColor3B _to;
|
387
|
+
ccColor3B _from;
|
388
|
+
}
|
389
|
+
/** creates an action with duration and color */
|
390
|
+
+(id) actionWithDuration:(ccTime)duration red:(GLubyte)red green:(GLubyte)green blue:(GLubyte)blue;
|
391
|
+
/** initializes the action with duration and color */
|
392
|
+
-(id) initWithDuration:(ccTime)duration red:(GLubyte)red green:(GLubyte)green blue:(GLubyte)blue;
|
393
|
+
@end
|
394
|
+
|
395
|
+
/** Tints a CCNode that implements the CCNodeRGB protocol from current tint to a custom one.
|
396
|
+
@since v0.7.2
|
397
|
+
*/
|
398
|
+
@interface CCTintBy : CCActionInterval <NSCopying>
|
399
|
+
{
|
400
|
+
GLshort _deltaR, _deltaG, _deltaB;
|
401
|
+
GLshort _fromR, _fromG, _fromB;
|
402
|
+
}
|
403
|
+
/** creates an action with duration and color */
|
404
|
+
+(id) actionWithDuration:(ccTime)duration red:(GLshort)deltaRed green:(GLshort)deltaGreen blue:(GLshort)deltaBlue;
|
405
|
+
/** initializes the action with duration and color */
|
406
|
+
-(id) initWithDuration:(ccTime)duration red:(GLshort)deltaRed green:(GLshort)deltaGreen blue:(GLshort)deltaBlue;
|
407
|
+
@end
|
408
|
+
|
409
|
+
/** Delays the action a certain amount of seconds
|
410
|
+
*/
|
411
|
+
@interface CCDelayTime : CCActionInterval <NSCopying>
|
412
|
+
{
|
413
|
+
}
|
414
|
+
// XXX: Added to prevent bug on BridgeSupport
|
415
|
+
-(void) update:(ccTime)dt;
|
416
|
+
@end
|
417
|
+
|
418
|
+
/** Executes an action in reverse order, from time=duration to time=0
|
419
|
+
|
420
|
+
@warning Use this action carefully. This action is not
|
421
|
+
sequence-able. Use it as the default "reversed" method
|
422
|
+
of your own actions, but using it outside the "reversed"
|
423
|
+
scope is not recommended.
|
424
|
+
*/
|
425
|
+
@interface CCReverseTime : CCActionInterval <NSCopying>
|
426
|
+
{
|
427
|
+
CCFiniteTimeAction * _other;
|
428
|
+
}
|
429
|
+
/** creates the action */
|
430
|
+
+(id) actionWithAction: (CCFiniteTimeAction*) action;
|
431
|
+
/** initializes the action */
|
432
|
+
-(id) initWithAction: (CCFiniteTimeAction*) action;
|
433
|
+
@end
|
434
|
+
|
435
|
+
|
436
|
+
@class CCAnimation;
|
437
|
+
@class CCTexture2D;
|
438
|
+
/** Animates a sprite given the name of an Animation */
|
439
|
+
@interface CCAnimate : CCActionInterval <NSCopying>
|
440
|
+
{
|
441
|
+
NSMutableArray *_splitTimes;
|
442
|
+
NSInteger _nextFrame;
|
443
|
+
CCAnimation *_animation;
|
444
|
+
id _origFrame;
|
445
|
+
NSUInteger _executedLoops;
|
446
|
+
}
|
447
|
+
/** animation used for the image */
|
448
|
+
@property (readwrite,nonatomic,retain) CCAnimation * animation;
|
449
|
+
|
450
|
+
/** creates the action with an Animation and will restore the original frame when the animation is over */
|
451
|
+
+(id) actionWithAnimation:(CCAnimation*)animation;
|
452
|
+
/** initializes the action with an Animation and will restore the original frame when the animation is over */
|
453
|
+
-(id) initWithAnimation:(CCAnimation*)animation;
|
454
|
+
@end
|
455
|
+
|
456
|
+
/** Overrides the target of an action so that it always runs on the target
|
457
|
+
* specified at action creation rather than the one specified by runAction.
|
458
|
+
*/
|
459
|
+
@interface CCTargetedAction : CCActionInterval <NSCopying>
|
460
|
+
{
|
461
|
+
id _forcedTarget;
|
462
|
+
CCFiniteTimeAction* _action;
|
463
|
+
}
|
464
|
+
/** This is the target that the action will be forced to run with */
|
465
|
+
@property(readwrite,nonatomic,retain) id forcedTarget;
|
466
|
+
|
467
|
+
/** Create an action with the specified action and forced target */
|
468
|
+
+ (id) actionWithTarget:(id) target action:(CCFiniteTimeAction*) action;
|
469
|
+
|
470
|
+
/** Init an action with the specified action and forced target */
|
471
|
+
- (id) initWithTarget:(id) target action:(CCFiniteTimeAction*) action;
|
472
|
+
|
473
|
+
@end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
/*
|
2
|
+
* cocos2d for iPhone: http://www.cocos2d-iphone.org
|
3
|
+
*
|
4
|
+
* Copyright (c) 2009 Valentin Milea
|
5
|
+
*
|
6
|
+
* Copyright (c) 2008-2010 Ricardo Quesada
|
7
|
+
* Copyright (c) 2011 Zynga Inc.
|
8
|
+
*
|
9
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
10
|
+
* of this software and associated documentation files (the "Software"), to deal
|
11
|
+
* in the Software without restriction, including without limitation the rights
|
12
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
13
|
+
* copies of the Software, and to permit persons to whom the Software is
|
14
|
+
* furnished to do so, subject to the following conditions:
|
15
|
+
*
|
16
|
+
* The above copyright notice and this permission notice shall be included in
|
17
|
+
* all copies or substantial portions of the Software.
|
18
|
+
*
|
19
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
20
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
21
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
22
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
23
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
24
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
25
|
+
* THE SOFTWARE.
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
|
29
|
+
|
30
|
+
#import "CCAction.h"
|
31
|
+
#import "ccMacros.h"
|
32
|
+
#import "Support/ccCArray.h"
|
33
|
+
#import "Support/uthash.h"
|
34
|
+
|
35
|
+
typedef struct _hashElement
|
36
|
+
{
|
37
|
+
struct ccArray *actions;
|
38
|
+
NSUInteger actionIndex;
|
39
|
+
BOOL currentActionSalvaged;
|
40
|
+
BOOL paused;
|
41
|
+
UT_hash_handle hh;
|
42
|
+
|
43
|
+
CC_ARC_UNSAFE_RETAINED id target;
|
44
|
+
CC_ARC_UNSAFE_RETAINED CCAction *currentAction;
|
45
|
+
} tHashElement;
|
46
|
+
|
47
|
+
|
48
|
+
/** CCActionManager the object that manages all the actions.
|
49
|
+
Normally you won't need to use this API directly. 99% of the cases you will use the CCNode interface, which uses this object.
|
50
|
+
But there are some cases where you might need to use this API directly:
|
51
|
+
Examples:
|
52
|
+
- When you want to run an action where the target is different from a CCNode.
|
53
|
+
- When you want to pause / resume the actions
|
54
|
+
|
55
|
+
@since v0.8
|
56
|
+
*/
|
57
|
+
@interface CCActionManager : NSObject
|
58
|
+
{
|
59
|
+
tHashElement *targets;
|
60
|
+
tHashElement *currentTarget;
|
61
|
+
BOOL currentTargetSalvaged;
|
62
|
+
}
|
63
|
+
|
64
|
+
|
65
|
+
// actions
|
66
|
+
|
67
|
+
/** Adds an action with a target.
|
68
|
+
If the target is already present, then the action will be added to the existing target.
|
69
|
+
If the target is not present, a new instance of this target will be created either paused or paused, and the action will be added to the newly created target.
|
70
|
+
When the target is paused, the queued actions won't be 'ticked'.
|
71
|
+
*/
|
72
|
+
-(void) addAction: (CCAction*) action target:(id)target paused:(BOOL)paused;
|
73
|
+
/** Removes all actions from all the targets.
|
74
|
+
*/
|
75
|
+
-(void) removeAllActions;
|
76
|
+
|
77
|
+
/** Removes all actions from a certain target.
|
78
|
+
All the actions that belongs to the target will be removed.
|
79
|
+
*/
|
80
|
+
-(void) removeAllActionsFromTarget:(id)target;
|
81
|
+
/** Removes an action given an action reference.
|
82
|
+
*/
|
83
|
+
-(void) removeAction: (CCAction*) action;
|
84
|
+
/** Removes an action given its tag and the target */
|
85
|
+
-(void) removeActionByTag:(NSInteger)tag target:(id)target;
|
86
|
+
/** Gets an action given its tag an a target
|
87
|
+
@return the Action the with the given tag
|
88
|
+
*/
|
89
|
+
-(CCAction*) getActionByTag:(NSInteger) tag target:(id)target;
|
90
|
+
/** Returns the numbers of actions that are running in a certain target
|
91
|
+
* Composable actions are counted as 1 action. Example:
|
92
|
+
* If you are running 1 Sequence of 7 actions, it will return 1.
|
93
|
+
* If you are running 7 Sequences of 2 actions, it will return 7.
|
94
|
+
*/
|
95
|
+
-(NSUInteger) numberOfRunningActionsInTarget:(id)target;
|
96
|
+
|
97
|
+
/** Pauses the target: all running actions and newly added actions will be paused.
|
98
|
+
*/
|
99
|
+
-(void) pauseTarget:(id)target;
|
100
|
+
/** Resumes the target. All queued actions will be resumed.
|
101
|
+
*/
|
102
|
+
-(void) resumeTarget:(id)target;
|
103
|
+
|
104
|
+
/** Pauses all running actions, returning a list of targets whose actions were paused.
|
105
|
+
*/
|
106
|
+
-(NSSet *) pauseAllRunningActions;
|
107
|
+
|
108
|
+
/** Resume a set of targets (convenience function to reverse a pauseAllRunningActions call)
|
109
|
+
*/
|
110
|
+
-(void) resumeTargets:(NSSet *)targetsToResume;
|
111
|
+
|
112
|
+
@end
|
113
|
+
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/*
|
2
|
+
* cocos2d for iPhone: http://www.cocos2d-iphone.org
|
3
|
+
*
|
4
|
+
* Copyright (c) 2009 Sindesso Pty Ltd http://www.sindesso.com/
|
5
|
+
*
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
11
|
+
* furnished to do so, subject to the following conditions:
|
12
|
+
*
|
13
|
+
* The above copyright notice and this permission notice shall be included in
|
14
|
+
* all copies or substantial portions of the Software.
|
15
|
+
*
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
* THE SOFTWARE.
|
23
|
+
*
|
24
|
+
*/
|
25
|
+
|
26
|
+
|
27
|
+
#import "CCActionGrid3D.h"
|
28
|
+
|
29
|
+
/**
|
30
|
+
* This action simulates a page turn from the bottom right hand corner of the screen
|
31
|
+
* It's not much use by itself but is used by the PageTurnTransition.
|
32
|
+
*
|
33
|
+
* Based on an original paper by L Hong et al.
|
34
|
+
* http://www.parc.com/publication/1638/turning-pages-of-3d-electronic-books.html
|
35
|
+
*
|
36
|
+
* @since v0.8.2
|
37
|
+
*/
|
38
|
+
@interface CCPageTurn3D : CCGrid3DAction
|
39
|
+
{
|
40
|
+
}
|
41
|
+
// XXX: To make BridgeSupport happy
|
42
|
+
-(void)update:(ccTime)time;
|
43
|
+
@end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/*
|
2
|
+
* cocos2d for iPhone: http://www.cocos2d-iphone.org
|
3
|
+
*
|
4
|
+
* Copyright (C) 2010 Lam Pham
|
5
|
+
*
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
11
|
+
* furnished to do so, subject to the following conditions:
|
12
|
+
*
|
13
|
+
* The above copyright notice and this permission notice shall be included in
|
14
|
+
* all copies or substantial portions of the Software.
|
15
|
+
*
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
+
* THE SOFTWARE.
|
23
|
+
*
|
24
|
+
*/
|
25
|
+
|
26
|
+
|
27
|
+
#import <Foundation/Foundation.h>
|
28
|
+
#import "CCProgressTimer.h"
|
29
|
+
#import "CCActionInterval.h"
|
30
|
+
|
31
|
+
/**
|
32
|
+
Progress to percentage
|
33
|
+
@since v0.99.1
|
34
|
+
*/
|
35
|
+
@interface CCProgressTo : CCActionInterval <NSCopying>
|
36
|
+
{
|
37
|
+
float _to;
|
38
|
+
float _from;
|
39
|
+
}
|
40
|
+
/** Creates and initializes with a duration and a percent */
|
41
|
+
+(id) actionWithDuration:(ccTime)duration percent:(float)percent;
|
42
|
+
/** Initializes with a duration and a percent */
|
43
|
+
-(id) initWithDuration:(ccTime)duration percent:(float)percent;
|
44
|
+
@end
|
45
|
+
|
46
|
+
/**
|
47
|
+
Progress from a percentage to another percentage
|
48
|
+
@since v0.99.1
|
49
|
+
*/
|
50
|
+
@interface CCProgressFromTo : CCActionInterval <NSCopying>
|
51
|
+
{
|
52
|
+
float _to;
|
53
|
+
float _from;
|
54
|
+
}
|
55
|
+
/** Creates and initializes the action with a duration, a "from" percentage and a "to" percentage */
|
56
|
+
+(id) actionWithDuration:(ccTime)duration from:(float)fromPercentage to:(float) toPercentage;
|
57
|
+
/** Initializes the action with a duration, a "from" percentage and a "to" percentage */
|
58
|
+
-(id) initWithDuration:(ccTime)duration from:(float)fromPercentage to:(float) toPercentage;
|
59
|
+
@end
|