├── development ├── FDT │ └── ComingSoon.txt ├── FB3 │ └── PBEngine │ │ ├── .settings │ │ └── org.eclipse.core.resources.prefs │ │ ├── .project │ │ └── .actionScriptProperties ├── FB4 │ └── PBEngine │ │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ └── org.eclipse.ltk.core.refactoring.prefs │ │ ├── .flexLibProperties │ │ ├── .project │ │ └── .actionScriptProperties └── FlashDevelop │ └── PBEngine │ ├── Readme.txt │ └── src │ └── Hello.as ├── docs ├── js │ ├── pageToc.readme.txt │ └── sh │ │ ├── styles │ │ ├── help.png │ │ ├── magnifier.png │ │ ├── printer.png │ │ ├── wrapping.png │ │ ├── page_white_code.png │ │ └── page_white_copy.png │ │ ├── SyntaxHighlighter.readme.txt │ │ └── scripts │ │ ├── clipboard.swf │ │ └── shBrushPlain.js ├── downloads │ ├── bg.png │ ├── fanship.png │ ├── Lesson2Base.zip │ ├── Lesson2Final.swf │ ├── Lesson2Final.zip │ ├── Lesson3Base.zip │ ├── Lesson3Final.swf │ ├── Lesson3Final.zip │ ├── Lesson4Base.zip │ ├── Lesson4Final.swf │ ├── Lesson4Final.zip │ ├── Lesson5Base.zip │ ├── Lesson5Final.swf │ ├── Lesson5Final.zip │ ├── Lesson1FlashCS4.zip │ ├── Lesson1FlashDevelop.zip │ └── Lesson1FlexBuilder.zip ├── images │ ├── Lesson2_1.png │ ├── Lesson3_1.png │ ├── Lesson4_1.png │ ├── Lesson5_1.png │ ├── Lesson5_2.png │ ├── Lesson1FlashCS4_1.png │ ├── Lesson1FlashCS4_2.png │ ├── Lesson1FlashCS4_3.png │ ├── Lesson1FlashCS4_4.png │ ├── Lesson1FlashCS4_5.png │ ├── Lesson1FlashCS4_6.png │ ├── Lesson4_KeyTerms.png │ ├── Lesson1FlashCS4_3A.png │ ├── Lesson1FlashCS4_3B.png │ ├── Lesson1FlashCS4_4A.png │ ├── Lesson1FlexBuilder_1.png │ ├── Lesson1FlexBuilder_2.png │ ├── Lesson1FlexBuilder_3.png │ ├── Lesson1FlexBuilder_4.png │ ├── Lesson1FlexBuilder_5.png │ ├── Lesson1FlexBuilder_6.png │ ├── Lesson1FlexBuilder_7.png │ ├── Lesson1FlexBuilder_8.png │ ├── Lesson3_Coordinates.png │ ├── small_pbe_logo_black.png │ ├── Lesson1FlashDevelop_1.png │ ├── Lesson1FlashDevelop_10.png │ ├── Lesson1FlashDevelop_2.png │ ├── Lesson1FlashDevelop_3.png │ ├── Lesson1FlashDevelop_4.png │ ├── Lesson1FlashDevelop_5.png │ ├── Lesson1FlashDevelop_6.png │ ├── Lesson1FlashDevelop_7.png │ ├── Lesson1FlashDevelop_8.png │ ├── Lesson1FlashDevelop_9.png │ ├── LevelOverview-chassis.png │ ├── LevelOverview-Structure.png │ ├── LevelOverview-building_blocks.png │ ├── LevelOverview-cookie_cutters.png │ └── 04-ComponentSystem_SimpleExample.png ├── stylesheet.css └── template.html ├── Readme.html ├── src ├── assets │ ├── mini.png │ ├── touch_marker.png │ ├── MiniTextureAsset.as │ ├── TouchMarkerAsset.as │ └── MiniTextureFontAsset.as ├── com │ └── pblabs │ │ ├── sharedRendering │ │ └── ISWFSpriteRenderer.as │ │ ├── engine │ │ ├── version │ │ │ ├── BuildVersion.as.templ │ │ │ ├── BuildVersion.as │ │ │ ├── VersionType.as │ │ │ ├── VersionDetails.as │ │ │ ├── mx_internal.as │ │ │ └── FlexSDKVersion.as │ │ ├── entity │ │ │ ├── EntityEvent.as │ │ │ └── allocateEntity.as │ │ ├── util │ │ │ ├── ImageFrameData.as │ │ │ └── OrderedArrayUtils.as │ │ ├── debug │ │ │ ├── ILogAppender.as │ │ │ ├── TraceAppender.as │ │ │ ├── ExceptionAppender.as │ │ │ ├── JavascriptLogListener.as │ │ │ └── LogEvent.as │ │ ├── serialization │ │ │ └── TestForMetadata.as │ │ ├── components │ │ │ └── DataComponent.as │ │ ├── core │ │ │ ├── InputState.as │ │ │ ├── IPrioritizable.as │ │ │ ├── IQueuedObject.as │ │ │ ├── ScheduleObject.as │ │ │ └── TemplateEvent.as │ │ └── resource │ │ │ └── MP3Resource.as │ │ ├── tweaker │ │ ├── web │ │ │ ├── script_crossdomain.xml │ │ │ └── root_crossdomain.xml │ │ ├── TweakerMapGroup.as │ │ └── TweakerMapEntry.as │ │ ├── rendering2D │ │ ├── IBitmapRenderer.as │ │ ├── spritesheet │ │ │ ├── FrameNote.as │ │ │ ├── IImageSpriteSheet.as │ │ │ ├── CachedFramesDataMC.as │ │ │ ├── CachedFramesData.as │ │ │ └── ISpriteSheetNamedFramesDivider.as │ │ ├── IDisplayObjectSceneLayer.as │ │ ├── ISpriteSheetRenderer.as │ │ ├── ITextRenderer.as │ │ ├── RenderCacheKeyManager.as │ │ ├── ILayerMouseHandler.as │ │ ├── ICachingLayer.as │ │ └── modifier │ │ │ ├── BlurModifier.as │ │ │ └── BorderModifier.as │ │ ├── triggers │ │ ├── actions │ │ │ ├── ConstrainProperty.as │ │ │ ├── ActionType.as │ │ │ ├── UnPauseGameAction.as │ │ │ ├── SimulateInputAction.as │ │ │ ├── PauseGameAction.as │ │ │ ├── TimeShiftAction.as │ │ │ └── BaseAction.as │ │ └── ITriggerComponent.as │ │ ├── nape │ │ ├── INape2DSpatialComponent.as │ │ ├── constraints │ │ │ └── INape2DConstraintComponent.as │ │ ├── NapeUtils.as │ │ ├── BodyTypeEnum.as │ │ ├── MaterialVO.as │ │ ├── CircleCollisionShape.as │ │ └── CollisionEvent.as │ │ ├── physics │ │ ├── IPhysicsShape.as │ │ ├── IPhysics2DManager.as │ │ └── IPhysics2DSpatial.as │ │ ├── starling2D │ │ ├── spritesheet │ │ │ ├── CachedFramesDataMCG2D.as │ │ │ ├── CachedFramesDataG2D.as │ │ │ └── ISpriteSheetG2D.as │ │ ├── SceneViewG2DSprite.as │ │ ├── InitializationUtilG2D.as │ │ ├── IGPURenderer.as │ │ └── ISceneG2D.as │ │ ├── components │ │ └── stateMachine │ │ │ ├── IThinkingState.as │ │ │ ├── DeathState.as │ │ │ ├── ITransition.as │ │ │ ├── PropertyTransition.as │ │ │ ├── TransitionEvent.as │ │ │ ├── Transition.as │ │ │ ├── BasicThinkingState.as │ │ │ └── IState.as │ │ ├── screens │ │ ├── BaseScreen.as │ │ └── BaseScreenG2D.as │ │ └── animation │ │ └── PointAnimator.as ├── starling │ ├── display │ │ ├── IGraphicsData.as │ │ ├── IGraphicsFill.as │ │ ├── GraphicsEndFill.as │ │ ├── shaders │ │ │ ├── IShader.as │ │ │ ├── fragment │ │ │ │ ├── VertexColorFragmentShader.as │ │ │ │ ├── TextureFragmentShader.as │ │ │ │ └── TextureVertexColorFragmentShader.as │ │ │ ├── vertex │ │ │ │ ├── StandardVertexShader.as │ │ │ │ ├── AnimateUVVertexShader.as │ │ │ │ └── RippleVertexShader.as │ │ │ └── AbstractShader.as │ │ ├── materials │ │ │ ├── FlatColorMaterial.as │ │ │ ├── TextureMaterial.as │ │ │ └── IMaterial.as │ │ ├── graphicsEx │ │ │ ├── ShapeEx.as │ │ │ ├── GraphicsExThicknessData.as │ │ │ └── GraphicsNaturalSpline.as │ │ ├── Shape.as │ │ ├── GraphicsPathCommands.as │ │ ├── GraphicsSolidFill.as │ │ ├── GraphicsTextureFill.as │ │ ├── GraphicsMaterialFill.as │ │ ├── GraphicsLine.as │ │ ├── graphics │ │ │ ├── TriangleFan.as │ │ │ └── TriangleStrip.as │ │ └── ButtonState.as │ ├── events │ │ └── ProxyEventDispatcher.as │ ├── utils │ │ ├── deg2rad.as │ │ ├── rad2deg.as │ │ ├── formatString.as │ │ ├── getNextPowerOfTwo.as │ │ ├── cleanMasterString.as │ │ ├── execute.as │ │ ├── VAlign.as │ │ ├── HAlign.as │ │ └── ScaleMode.as │ ├── textures │ │ └── GradientTexture.as │ ├── core │ │ └── starling_internal.as │ ├── errors │ │ ├── AbstractMethodError.as │ │ ├── AbstractClassError.as │ │ └── MissingContextError.as │ └── filters │ │ └── FragmentFilterMode.as ├── pxBitmapFont │ └── PxTextAlign.as └── org │ └── as3wavsound │ └── sazameki │ └── format │ └── riff │ ├── RIFF.as │ └── Chunk.as ├── test ├── libs │ ├── FlexUnit4.swc │ ├── Hamcrest.swc │ ├── FlexUnit1Lib.swc │ └── FlexUnit4UIRunner.swc └── src │ ├── TestResources.as │ └── com │ └── pblabs │ └── engine │ └── tests │ ├── TestComponentB.as │ ├── TestComponentA.as │ └── ResourceTests.as ├── bin └── PBEngine_GitFork.swc ├── libs ├── as3-signals-v0.7.swc └── nape-release_2.0.13.swc ├── .gitignore ├── examples ├── PBFlashCS4Demo │ ├── main.fla │ ├── platform.png │ ├── mannequin.png │ ├── testSound.mp3 │ ├── spriteSheets.pbelevel │ ├── level1.pbelevel │ ├── level2.pbelevel │ └── level3.pbelevel ├── RollyBallGame │ ├── assets │ │ ├── Images │ │ │ ├── ui.pdn │ │ │ ├── ball.png │ │ │ ├── coin.png │ │ │ ├── intro.png │ │ │ ├── welcome.pdn │ │ │ ├── welcome.png │ │ │ ├── level1_diffuse.png │ │ │ ├── level1_height.png │ │ │ ├── level1_normal.png │ │ │ ├── level2_diffuse.png │ │ │ ├── level2_height.png │ │ │ ├── level2_normal.png │ │ │ ├── level3_diffuse.png │ │ │ ├── level3_height.png │ │ │ ├── level3_normal.png │ │ │ ├── level4_diffuse.png │ │ │ ├── level4_height.png │ │ │ ├── level4_normal.png │ │ │ ├── level5_diffuse.png │ │ │ ├── level5_height.png │ │ │ └── level5_normal.png │ │ ├── Preloader.swf │ │ └── Sounds │ │ │ ├── pickup.mp3 │ │ │ └── scorechunk.mp3 │ ├── LICENSE.txt │ └── build.xml ├── StarlingTest │ ├── src │ │ └── assets │ │ │ ├── skypng.png │ │ │ ├── PigsSheet.png │ │ │ └── background.png │ ├── .settings │ │ └── org.eclipse.core.resources.prefs │ ├── bin-release │ │ └── assets │ │ │ └── skypng.png │ └── .project ├── PBEngineDemo │ ├── assets │ │ ├── Images │ │ │ ├── platform.png │ │ │ └── mannequin.png │ │ ├── Sounds │ │ │ └── testSound.mp3 │ │ ├── Levels │ │ │ ├── spriteSheets.pbelevel │ │ │ ├── level1.pbelevel │ │ │ ├── level2.pbelevel │ │ │ └── level3.pbelevel │ │ └── levelDescriptions.xml │ ├── build.xml │ ├── bin │ │ └── logConfiguration.xml │ └── src │ │ └── com │ │ └── pblabs │ │ └── pbEngineDemo │ │ └── UI │ │ ├── MainMenu.mxml │ │ └── GameUI.mxml ├── StarlingMobileTest │ ├── .settings │ │ └── org.eclipse.core.resources.prefs │ ├── src │ │ └── assets │ │ │ ├── skypng.png │ │ │ ├── PigsSheet.png │ │ │ └── background.png │ └── .project └── PBFlexlessEngineDemo │ ├── assets │ ├── Images │ │ ├── platform.png │ │ └── mannequin.png │ ├── Sounds │ │ └── testSound.mp3 │ └── Levels │ │ ├── spriteSheets.pbelevel │ │ ├── level1.pbelevel │ │ ├── level2.pbelevel │ │ └── level3.pbelevel │ └── build.xml ├── lessons ├── Lesson5Base │ ├── assets │ │ ├── bg.jpg │ │ └── fanship.png │ └── build.xml ├── Lesson5Final │ ├── assets │ │ ├── bg.jpg │ │ └── fanship.png │ ├── build.xml │ └── src │ │ └── MyResources.as ├── Lesson1FlashCS4 │ ├── Lesson1FlashCS4.fla │ ├── Lesson1FlashCS4.swf │ └── Lesson1FlashCS4.as ├── Lesson1FlashDevelop │ ├── lib │ │ └── PBEngine.swc │ ├── bin │ │ ├── expressInstall.swf │ │ ├── Lesson1FlashDevelop.swf │ │ └── index.html │ └── src │ │ └── Lesson1FlashDevelop.as ├── Lesson1FlexBuilder │ ├── bin-debug │ │ ├── Lesson1FlexBuilder.swf │ │ ├── playerProductInstall.swf │ │ ├── com │ │ │ └── pblabs │ │ │ │ ├── engine │ │ │ │ └── version │ │ │ │ │ └── BuildVersion.as.templ │ │ │ │ └── tweaker │ │ │ │ └── web │ │ │ │ ├── script_crossdomain.xml │ │ │ │ └── root_crossdomain.xml │ │ └── history │ │ │ ├── history.css │ │ │ └── historyFrame.html │ ├── html-template │ │ ├── playerProductInstall.swf │ │ └── history │ │ │ ├── history.css │ │ │ └── historyFrame.html │ ├── src │ │ └── Lesson1FlexBuilder.as │ └── .project ├── Lesson2Base │ ├── build.xml │ └── src │ │ └── Lesson2Base.as ├── Lesson3Base │ └── build.xml ├── Lesson4Base │ ├── build.xml │ └── src │ │ └── HeroControllerComponent.as ├── Lesson2Final │ └── build.xml ├── Lesson3Final │ └── build.xml └── Lesson4Final │ └── build.xml ├── .settings └── org.eclipse.core.resources.prefs ├── OptimizationTipsNotes.txt ├── .flexLibProperties ├── StarlingChanges.txt ├── .project ├── script ├── licenseCheck │ └── config.yml └── lessons │ └── package_release.sh ├── license.txt ├── .actionScriptProperties └── README.md /development/FDT/ComingSoon.txt: -------------------------------------------------------------------------------- 1 | Support for this IDE is coming soon. -------------------------------------------------------------------------------- /docs/js/pageToc.readme.txt: -------------------------------------------------------------------------------- 1 | From http://www.webtech101.com/Javascript/toc-generator -------------------------------------------------------------------------------- /Readme.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/Readme.html -------------------------------------------------------------------------------- /docs/downloads/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/bg.png -------------------------------------------------------------------------------- /src/assets/mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/src/assets/mini.png -------------------------------------------------------------------------------- /test/libs/FlexUnit4.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/test/libs/FlexUnit4.swc -------------------------------------------------------------------------------- /test/libs/Hamcrest.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/test/libs/Hamcrest.swc -------------------------------------------------------------------------------- /bin/PBEngine_GitFork.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/bin/PBEngine_GitFork.swc -------------------------------------------------------------------------------- /docs/downloads/fanship.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/fanship.png -------------------------------------------------------------------------------- /docs/images/Lesson2_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson2_1.png -------------------------------------------------------------------------------- /docs/images/Lesson3_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson3_1.png -------------------------------------------------------------------------------- /docs/images/Lesson4_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson4_1.png -------------------------------------------------------------------------------- /docs/images/Lesson5_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson5_1.png -------------------------------------------------------------------------------- /docs/images/Lesson5_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson5_2.png -------------------------------------------------------------------------------- /docs/js/sh/styles/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/js/sh/styles/help.png -------------------------------------------------------------------------------- /libs/as3-signals-v0.7.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/libs/as3-signals-v0.7.swc -------------------------------------------------------------------------------- /test/libs/FlexUnit1Lib.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/test/libs/FlexUnit1Lib.swc -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | examples/StarlingMobileTest/bin-debug/ 2 | examples/StarlingTest/bin-debug/ 3 | examples/StarlingTest/html-template/ -------------------------------------------------------------------------------- /libs/nape-release_2.0.13.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/libs/nape-release_2.0.13.swc -------------------------------------------------------------------------------- /src/assets/touch_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/src/assets/touch_marker.png -------------------------------------------------------------------------------- /docs/downloads/Lesson2Base.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson2Base.zip -------------------------------------------------------------------------------- /docs/downloads/Lesson2Final.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson2Final.swf -------------------------------------------------------------------------------- /docs/downloads/Lesson2Final.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson2Final.zip -------------------------------------------------------------------------------- /docs/downloads/Lesson3Base.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson3Base.zip -------------------------------------------------------------------------------- /docs/downloads/Lesson3Final.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson3Final.swf -------------------------------------------------------------------------------- /docs/downloads/Lesson3Final.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson3Final.zip -------------------------------------------------------------------------------- /docs/downloads/Lesson4Base.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson4Base.zip -------------------------------------------------------------------------------- /docs/downloads/Lesson4Final.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson4Final.swf -------------------------------------------------------------------------------- /docs/downloads/Lesson4Final.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson4Final.zip -------------------------------------------------------------------------------- /docs/downloads/Lesson5Base.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson5Base.zip -------------------------------------------------------------------------------- /docs/downloads/Lesson5Final.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson5Final.swf -------------------------------------------------------------------------------- /docs/downloads/Lesson5Final.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson5Final.zip -------------------------------------------------------------------------------- /docs/js/sh/styles/magnifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/js/sh/styles/magnifier.png -------------------------------------------------------------------------------- /docs/js/sh/styles/printer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/js/sh/styles/printer.png -------------------------------------------------------------------------------- /docs/js/sh/styles/wrapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/js/sh/styles/wrapping.png -------------------------------------------------------------------------------- /test/libs/FlexUnit4UIRunner.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/test/libs/FlexUnit4UIRunner.swc -------------------------------------------------------------------------------- /docs/images/Lesson1FlashCS4_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashCS4_1.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashCS4_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashCS4_2.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashCS4_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashCS4_3.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashCS4_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashCS4_4.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashCS4_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashCS4_5.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashCS4_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashCS4_6.png -------------------------------------------------------------------------------- /docs/images/Lesson4_KeyTerms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson4_KeyTerms.png -------------------------------------------------------------------------------- /docs/js/sh/SyntaxHighlighter.readme.txt: -------------------------------------------------------------------------------- 1 | SyntaxHighlighter written by Alex Gorbatchev 2 | http://alexgorbatchev.com/wiki/SyntaxHighlighter -------------------------------------------------------------------------------- /docs/js/sh/scripts/clipboard.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/js/sh/scripts/clipboard.swf -------------------------------------------------------------------------------- /examples/PBFlashCS4Demo/main.fla: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/PBFlashCS4Demo/main.fla -------------------------------------------------------------------------------- /lessons/Lesson5Base/assets/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/lessons/Lesson5Base/assets/bg.jpg -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Thu Dec 02 20:24:36 PST 2010 2 | eclipse.preferences.version=1 3 | encoding/=utf-8 4 | -------------------------------------------------------------------------------- /docs/downloads/Lesson1FlashCS4.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson1FlashCS4.zip -------------------------------------------------------------------------------- /docs/images/Lesson1FlashCS4_3A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashCS4_3A.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashCS4_3B.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashCS4_3B.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashCS4_4A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashCS4_4A.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlexBuilder_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlexBuilder_1.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlexBuilder_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlexBuilder_2.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlexBuilder_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlexBuilder_3.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlexBuilder_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlexBuilder_4.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlexBuilder_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlexBuilder_5.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlexBuilder_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlexBuilder_6.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlexBuilder_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlexBuilder_7.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlexBuilder_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlexBuilder_8.png -------------------------------------------------------------------------------- /docs/images/Lesson3_Coordinates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson3_Coordinates.png -------------------------------------------------------------------------------- /docs/images/small_pbe_logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/small_pbe_logo_black.png -------------------------------------------------------------------------------- /examples/PBFlashCS4Demo/platform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/PBFlashCS4Demo/platform.png -------------------------------------------------------------------------------- /lessons/Lesson5Final/assets/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/lessons/Lesson5Final/assets/bg.jpg -------------------------------------------------------------------------------- /docs/downloads/Lesson1FlashDevelop.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson1FlashDevelop.zip -------------------------------------------------------------------------------- /docs/downloads/Lesson1FlexBuilder.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/downloads/Lesson1FlexBuilder.zip -------------------------------------------------------------------------------- /docs/images/Lesson1FlashDevelop_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashDevelop_1.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashDevelop_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashDevelop_10.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashDevelop_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashDevelop_2.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashDevelop_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashDevelop_3.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashDevelop_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashDevelop_4.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashDevelop_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashDevelop_5.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashDevelop_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashDevelop_6.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashDevelop_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashDevelop_7.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashDevelop_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashDevelop_8.png -------------------------------------------------------------------------------- /docs/images/Lesson1FlashDevelop_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/Lesson1FlashDevelop_9.png -------------------------------------------------------------------------------- /docs/images/LevelOverview-chassis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/LevelOverview-chassis.png -------------------------------------------------------------------------------- /docs/js/sh/styles/page_white_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/js/sh/styles/page_white_code.png -------------------------------------------------------------------------------- /docs/js/sh/styles/page_white_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/js/sh/styles/page_white_copy.png -------------------------------------------------------------------------------- /examples/PBFlashCS4Demo/mannequin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/PBFlashCS4Demo/mannequin.png -------------------------------------------------------------------------------- /examples/PBFlashCS4Demo/testSound.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/PBFlashCS4Demo/testSound.mp3 -------------------------------------------------------------------------------- /lessons/Lesson5Base/assets/fanship.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/lessons/Lesson5Base/assets/fanship.png -------------------------------------------------------------------------------- /docs/images/LevelOverview-Structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/LevelOverview-Structure.png -------------------------------------------------------------------------------- /lessons/Lesson5Final/assets/fanship.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/lessons/Lesson5Final/assets/fanship.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/ui.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/ui.pdn -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Preloader.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Preloader.swf -------------------------------------------------------------------------------- /examples/StarlingTest/src/assets/skypng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/StarlingTest/src/assets/skypng.png -------------------------------------------------------------------------------- /lessons/Lesson1FlashCS4/Lesson1FlashCS4.fla: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/lessons/Lesson1FlashCS4/Lesson1FlashCS4.fla -------------------------------------------------------------------------------- /lessons/Lesson1FlashCS4/Lesson1FlashCS4.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/lessons/Lesson1FlashCS4/Lesson1FlashCS4.swf -------------------------------------------------------------------------------- /docs/images/LevelOverview-building_blocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/LevelOverview-building_blocks.png -------------------------------------------------------------------------------- /docs/images/LevelOverview-cookie_cutters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/LevelOverview-cookie_cutters.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/ball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/ball.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/coin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/coin.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/intro.png -------------------------------------------------------------------------------- /examples/StarlingTest/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Sat Aug 11 15:27:00 CDT 2012 2 | eclipse.preferences.version=1 3 | encoding/=utf-8 4 | -------------------------------------------------------------------------------- /examples/StarlingTest/src/assets/PigsSheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/StarlingTest/src/assets/PigsSheet.png -------------------------------------------------------------------------------- /lessons/Lesson1FlashDevelop/lib/PBEngine.swc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/lessons/Lesson1FlashDevelop/lib/PBEngine.swc -------------------------------------------------------------------------------- /src/com/pblabs/sharedRendering/ISWFSpriteRenderer.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.sharedRendering 2 | { 3 | public interface ISWFSpriteRenderer 4 | { 5 | 6 | } 7 | } -------------------------------------------------------------------------------- /development/FB3/PBEngine/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Mon Oct 26 18:46:00 PDT 2009 2 | eclipse.preferences.version=1 3 | encoding/=utf-8 4 | -------------------------------------------------------------------------------- /development/FB4/PBEngine/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Mon Oct 26 18:25:11 PDT 2009 2 | eclipse.preferences.version=1 3 | encoding/=utf-8 4 | -------------------------------------------------------------------------------- /docs/images/04-ComponentSystem_SimpleExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/docs/images/04-ComponentSystem_SimpleExample.png -------------------------------------------------------------------------------- /examples/PBEngineDemo/assets/Images/platform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/PBEngineDemo/assets/Images/platform.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/welcome.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/welcome.pdn -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/welcome.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Sounds/pickup.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Sounds/pickup.mp3 -------------------------------------------------------------------------------- /examples/StarlingMobileTest/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | #Sat Aug 18 15:19:52 CDT 2012 2 | eclipse.preferences.version=1 3 | encoding/=utf-8 4 | -------------------------------------------------------------------------------- /examples/StarlingTest/src/assets/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/StarlingTest/src/assets/background.png -------------------------------------------------------------------------------- /examples/PBEngineDemo/assets/Images/mannequin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/PBEngineDemo/assets/Images/mannequin.png -------------------------------------------------------------------------------- /examples/PBEngineDemo/assets/Sounds/testSound.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/PBEngineDemo/assets/Sounds/testSound.mp3 -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Sounds/scorechunk.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Sounds/scorechunk.mp3 -------------------------------------------------------------------------------- /examples/StarlingMobileTest/src/assets/skypng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/StarlingMobileTest/src/assets/skypng.png -------------------------------------------------------------------------------- /examples/StarlingTest/bin-release/assets/skypng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/StarlingTest/bin-release/assets/skypng.png -------------------------------------------------------------------------------- /lessons/Lesson1FlashDevelop/bin/expressInstall.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/lessons/Lesson1FlashDevelop/bin/expressInstall.swf -------------------------------------------------------------------------------- /examples/StarlingMobileTest/src/assets/PigsSheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/StarlingMobileTest/src/assets/PigsSheet.png -------------------------------------------------------------------------------- /examples/StarlingMobileTest/src/assets/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/StarlingMobileTest/src/assets/background.png -------------------------------------------------------------------------------- /examples/PBFlexlessEngineDemo/assets/Images/platform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/PBFlexlessEngineDemo/assets/Images/platform.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level1_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level1_diffuse.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level1_height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level1_height.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level1_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level1_normal.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level2_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level2_diffuse.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level2_height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level2_height.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level2_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level2_normal.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level3_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level3_diffuse.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level3_height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level3_height.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level3_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level3_normal.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level4_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level4_diffuse.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level4_height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level4_height.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level4_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level4_normal.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level5_diffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level5_diffuse.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level5_height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level5_height.png -------------------------------------------------------------------------------- /examples/RollyBallGame/assets/Images/level5_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/RollyBallGame/assets/Images/level5_normal.png -------------------------------------------------------------------------------- /lessons/Lesson1FlashDevelop/bin/Lesson1FlashDevelop.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/lessons/Lesson1FlashDevelop/bin/Lesson1FlashDevelop.swf -------------------------------------------------------------------------------- /examples/PBFlexlessEngineDemo/assets/Images/mannequin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/PBFlexlessEngineDemo/assets/Images/mannequin.png -------------------------------------------------------------------------------- /examples/PBFlexlessEngineDemo/assets/Sounds/testSound.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/examples/PBFlexlessEngineDemo/assets/Sounds/testSound.mp3 -------------------------------------------------------------------------------- /lessons/Lesson1FlexBuilder/bin-debug/Lesson1FlexBuilder.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/lessons/Lesson1FlexBuilder/bin-debug/Lesson1FlexBuilder.swf -------------------------------------------------------------------------------- /lessons/Lesson1FlexBuilder/bin-debug/playerProductInstall.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/lessons/Lesson1FlexBuilder/bin-debug/playerProductInstall.swf -------------------------------------------------------------------------------- /lessons/Lesson1FlexBuilder/html-template/playerProductInstall.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gamebuilderstudio/gamebuilderengine/HEAD/lessons/Lesson1FlexBuilder/html-template/playerProductInstall.swf -------------------------------------------------------------------------------- /src/assets/MiniTextureAsset.as: -------------------------------------------------------------------------------- 1 | package assets 2 | { 3 | import flash.display.Bitmap; 4 | 5 | [Embed(source = "/assets/mini.png")] 6 | public final class MiniTextureAsset extends Bitmap 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /src/starling/display/IGraphicsData.as: -------------------------------------------------------------------------------- 1 | package starling.display 2 | { 3 | 4 | /** 5 | * ... 6 | * 7 | */ 8 | public interface IGraphicsData 9 | { 10 | 11 | 12 | 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /src/assets/TouchMarkerAsset.as: -------------------------------------------------------------------------------- 1 | package assets 2 | { 3 | import flash.display.Bitmap; 4 | 5 | [Embed(source="/assets/touch_marker.png")] 6 | public final class TouchMarkerAsset extends Bitmap 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /development/FB4/PBEngine/.settings/org.eclipse.ltk.core.refactoring.prefs: -------------------------------------------------------------------------------- 1 | #Mon Oct 26 18:27:36 PDT 2009 2 | eclipse.preferences.version=1 3 | org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false 4 | -------------------------------------------------------------------------------- /src/starling/display/IGraphicsFill.as: -------------------------------------------------------------------------------- 1 | package starling.display 2 | { 3 | 4 | /** 5 | * ... 6 | * Rudimentary IGraphicsFill 7 | */ 8 | public interface IGraphicsFill 9 | { 10 | 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /OptimizationTipsNotes.txt: -------------------------------------------------------------------------------- 1 | Engine Optimization Tips: 2 | 3 | -Set blendmode to "none" whenever using assets with no transperancy 4 | -Put as many image in a large sprite sheet map as possible and render via spritesheets 5 | - -------------------------------------------------------------------------------- /development/FB4/PBEngine/.flexLibProperties: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/assets/MiniTextureFontAsset.as: -------------------------------------------------------------------------------- 1 | package assets 2 | { 3 | import flash.utils.ByteArray; 4 | 5 | [Embed(source="/assets/mini.fnt", mimeType="application/octet-stream")] 6 | public final class MiniTextureFontAsset extends ByteArray 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /.flexLibProperties: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/com/pblabs/engine/version/BuildVersion.as.templ: -------------------------------------------------------------------------------- 1 | package com.pblabs.engine.version 2 | { 3 | public class BuildVersion 4 | { 5 | // This will be populated from the BuildVersion.as.templ 6 | public static const BUILD_NUMBER:String = "@buildNumber@"; 7 | } 8 | } -------------------------------------------------------------------------------- /src/com/pblabs/tweaker/web/script_crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/com/pblabs/rendering2D/IBitmapRenderer.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.rendering2D 2 | { 3 | import flash.display.BitmapData; 4 | 5 | public interface IBitmapRenderer 6 | { 7 | function get bitmapData():BitmapData; 8 | function set bitmapData(data : BitmapData):void; 9 | } 10 | } -------------------------------------------------------------------------------- /examples/RollyBallGame/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The RollyBallGame demo game code and art are included with this SDK for 2 | educational use only. Please contact us if you would like to use any art 3 | or code for other purposes (including use in your own projects). 4 | 5 | (c) 2009 PushButton Labs, LLC -------------------------------------------------------------------------------- /lessons/Lesson1FlexBuilder/bin-debug/com/pblabs/engine/version/BuildVersion.as.templ: -------------------------------------------------------------------------------- 1 | package com.pblabs.engine.version 2 | { 3 | public class BuildVersion 4 | { 5 | // This will be populated from the BuildVersion.as.templ 6 | public static const BUILD_NUMBER:String = "@buildNumber@"; 7 | } 8 | } -------------------------------------------------------------------------------- /src/com/pblabs/triggers/actions/ConstrainProperty.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.triggers.actions 2 | { 3 | public final class ConstrainProperty extends PropertySetter 4 | { 5 | public function ConstrainProperty() 6 | { 7 | super(); 8 | _type = ActionType.PERSISTANT; 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /src/com/pblabs/rendering2D/spritesheet/FrameNote.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.rendering2D.spritesheet 2 | { 3 | public final class FrameNote 4 | { 5 | public var Frame:int; 6 | public var Direction:Number; 7 | public var RawFrame:int; 8 | 9 | public function FrameNote() 10 | { 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /lessons/Lesson1FlexBuilder/bin-debug/com/pblabs/tweaker/web/script_crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/starling/display/GraphicsEndFill.as: -------------------------------------------------------------------------------- 1 | package starling.display 2 | { 3 | /** 4 | * ... 5 | * Implementation of GraphicsEndFill 6 | */ 7 | public class GraphicsEndFill implements IGraphicsData 8 | { 9 | 10 | public function GraphicsEndFill() 11 | { 12 | 13 | } 14 | 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /src/starling/display/shaders/IShader.as: -------------------------------------------------------------------------------- 1 | package starling.display.shaders 2 | { 3 | import flash.display3D.Context3D; 4 | import flash.utils.ByteArray; 5 | 6 | public interface IShader 7 | { 8 | function get opCode():ByteArray 9 | function setConstants( context:Context3D, firstRegister:int ):void 10 | } 11 | } -------------------------------------------------------------------------------- /test/src/TestResources.as: -------------------------------------------------------------------------------- 1 | package 2 | { 3 | import com.pblabs.engine.resource.ResourceBundle; 4 | 5 | public class TestResources extends ResourceBundle 6 | { 7 | [Embed(source="../assets/testLevel.xml",mimeType='application/octet-stream')] 8 | public var _levelFile:Class; 9 | } 10 | } -------------------------------------------------------------------------------- /src/starling/display/materials/FlatColorMaterial.as: -------------------------------------------------------------------------------- 1 | package starling.display.materials 2 | { 3 | import starling.display.shaders.IShader; 4 | 5 | public class FlatColorMaterial extends StandardMaterial 6 | { 7 | public function FlatColorMaterial(color:uint = 0xFFFFFF) 8 | { 9 | this.color = color; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /src/pxBitmapFont/PxTextAlign.as: -------------------------------------------------------------------------------- 1 | package pxBitmapFont 2 | { 3 | /** 4 | * Omnipotent class that can be used to take various short cuts. Also holds various useful things. 5 | */ 6 | public class PxTextAlign 7 | { 8 | public static const LEFT:int = 1; 9 | public static const RIGHT:int = 2; 10 | public static const CENTER:int = 3; 11 | } 12 | } -------------------------------------------------------------------------------- /src/com/pblabs/nape/INape2DSpatialComponent.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.nape 2 | { 3 | import com.pblabs.engine.entity.IEntityComponent; 4 | import com.pblabs.physics.IPhysics2DSpatial; 5 | 6 | import nape.phys.Body; 7 | 8 | public interface INape2DSpatialComponent extends IPhysics2DSpatial, IEntityComponent 9 | { 10 | function get body():Body 11 | } 12 | } -------------------------------------------------------------------------------- /StarlingChanges.txt: -------------------------------------------------------------------------------- 1 | - Changed Texture.as Added a disposed signal property 2 | - CurveUtil.as Was Added for Graphics package 3 | - Starling 4 | - Commented out Juggler 5 | - Added SharedOverride to Starling constructor 6 | - Added disposed getter 7 | 8 | -Added getObjectsUnderPoint method to DisplayObjectContainer.as 9 | -Add implements IEventDispatcher to EventDispatcher -------------------------------------------------------------------------------- /src/org/as3wavsound/sazameki/format/riff/RIFF.as: -------------------------------------------------------------------------------- 1 | package org.as3wavsound.sazameki.format.riff { 2 | 3 | /** 4 | * ... 5 | * @author Takaaki Yamazaki(zk design), modified by b.bottema [Codemonkey] 6 | */ 7 | public class RIFF extends LIST { 8 | public function RIFF(type:String) { 9 | super(type); 10 | id = 'RIFF'; 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /src/com/pblabs/tweaker/web/root_crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lessons/Lesson1FlashCS4/Lesson1FlashCS4.as: -------------------------------------------------------------------------------- 1 | package 2 | { 3 | import flash.display.Sprite; 4 | 5 | import com.pblabs.engine.PBE; 6 | import com.pblabs.engine.debug.Logger; 7 | 8 | public class Lesson1FlashCS4 extends Sprite 9 | { 10 | public function Lesson1FlashCS4():void 11 | { 12 | PBE.startup(this); 13 | Logger.print(this, "Hello, World!"); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/entity/EntityEvent.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.engine.entity 2 | { 3 | import flash.events.Event; 4 | 5 | public final class EntityEvent extends Event 6 | { 7 | public static const ON_RESET : String = "ON_RESET"; 8 | 9 | public function EntityEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) 10 | { 11 | super(type, bubbles, cancelable); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /lessons/Lesson1FlexBuilder/bin-debug/com/pblabs/tweaker/web/root_crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lessons/Lesson1FlexBuilder/bin-debug/history/history.css: -------------------------------------------------------------------------------- 1 | /* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */ 2 | 3 | #ie_historyFrame { width: 0px; height: 0px; display:none } 4 | #firefox_anchorDiv { width: 0px; height: 0px; display:none } 5 | #safari_formDiv { width: 0px; height: 0px; display:none } 6 | #safari_rememberDiv { width: 0px; height: 0px; display:none } 7 | -------------------------------------------------------------------------------- /lessons/Lesson1FlexBuilder/html-template/history/history.css: -------------------------------------------------------------------------------- 1 | /* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */ 2 | 3 | #ie_historyFrame { width: 0px; height: 0px; display:none } 4 | #firefox_anchorDiv { width: 0px; height: 0px; display:none } 5 | #safari_formDiv { width: 0px; height: 0px; display:none } 6 | #safari_rememberDiv { width: 0px; height: 0px; display:none } 7 | -------------------------------------------------------------------------------- /src/com/pblabs/engine/util/ImageFrameData.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.engine.util 2 | { 3 | import flash.display.BitmapData; 4 | import flash.geom.Rectangle; 5 | 6 | public final class ImageFrameData 7 | { 8 | public function ImageFrameData(data:BitmapData, bounds:Rectangle) 9 | { 10 | this.bitmapData = data; 11 | this.bounds = bounds; 12 | } 13 | public var bitmapData:BitmapData; 14 | public var bounds:flash.geom.Rectangle; 15 | } 16 | } -------------------------------------------------------------------------------- /lessons/Lesson1FlexBuilder/src/Lesson1FlexBuilder.as: -------------------------------------------------------------------------------- 1 | package { 2 | // Flash Imports 3 | import flash.display.Sprite; 4 | 5 | // PushButton Engine Imports 6 | import com.pblabs.engine.PBE; 7 | import com.pblabs.engine.debug.Logger; 8 | 9 | public class Lesson1FlexBuilder extends Sprite 10 | { 11 | public function Lesson1FlexBuilder() 12 | { 13 | PBE.startup(this); 14 | Logger.print(this, "Hello, World!"); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/com/pblabs/rendering2D/IDisplayObjectSceneLayer.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.rendering2D 2 | { 3 | public interface IDisplayObjectSceneLayer 4 | { 5 | function get drawOrderFunction():Function; 6 | function set drawOrderFunction(value:Function):void; 7 | function markDirty():void; 8 | function onRender():void; 9 | function updateOrder():void; 10 | function add(dor:DisplayObjectRenderer):void; 11 | function remove(dor:DisplayObjectRenderer):void; 12 | } 13 | } -------------------------------------------------------------------------------- /lessons/Lesson2Base/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /lessons/Lesson3Base/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /lessons/Lesson4Base/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/PBEngineDemo/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /lessons/Lesson1FlashDevelop/src/Lesson1FlashDevelop.as: -------------------------------------------------------------------------------- 1 | package 2 | { 3 | // Flash Imports 4 | import flash.display.Sprite; 5 | 6 | // PushButton Engine Imports 7 | import com.pblabs.engine.PBE; 8 | import com.pblabs.engine.debug.Logger; 9 | 10 | public class Lesson1FlashDevelop extends Sprite 11 | { 12 | public function Lesson1FlashDevelop():void 13 | { 14 | PBE.startup(this); 15 | Logger.print(this, "Hello, World!"); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /lessons/Lesson2Final/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /lessons/Lesson3Final/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /lessons/Lesson4Final/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /lessons/Lesson5Base/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/starling/events/ProxyEventDispatcher.as: -------------------------------------------------------------------------------- 1 | package starling.events 2 | { 3 | /** 4 | * ... 5 | * @author pautay 6 | */ 7 | public class ProxyEventDispatcher extends EventDispatcher 8 | { 9 | private var _proxy : EventDispatcher; 10 | 11 | public function ProxyEventDispatcher(proxy : EventDispatcher) 12 | { 13 | _proxy = proxy; 14 | } 15 | 16 | public function get proxy():EventDispatcher 17 | { 18 | return _proxy; 19 | } 20 | 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /lessons/Lesson5Final/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/RollyBallGame/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/StarlingTest/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | StarlingTest 4 | 5 | 6 | 7 | 8 | 9 | com.adobe.flexbuilder.project.flexbuilder 10 | 11 | 12 | 13 | 14 | 15 | com.adobe.flexbuilder.project.actionscriptnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/com/pblabs/triggers/actions/ActionType.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.triggers.actions 2 | { 3 | public final class ActionType 4 | { 5 | public static const PERSISTANT : ActionType = new ActionType("PERSISTANT"); 6 | public static const ONETIME : ActionType = new ActionType("ONETIME"); 7 | 8 | private var _name : String = ""; 9 | public function ActionType(name : String) 10 | { 11 | _name = name; 12 | } 13 | 14 | public function get name():String{ return _name; } 15 | } 16 | } -------------------------------------------------------------------------------- /src/starling/display/graphicsEx/ShapeEx.as: -------------------------------------------------------------------------------- 1 | package starling.display.graphicsEx 2 | { 3 | import starling.display.Graphics; 4 | import starling.display.DisplayObjectContainer; 5 | 6 | public class ShapeEx extends DisplayObjectContainer 7 | { 8 | private var _graphics :GraphicsEx; 9 | 10 | public function ShapeEx() 11 | { 12 | _graphics = new GraphicsEx(this); 13 | } 14 | 15 | public function get graphics():GraphicsEx 16 | { 17 | return _graphics; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /examples/PBEngineDemo/bin/logConfiguration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Info 7 | Trace 8 | Exception 9 | UI 10 | 11 | -------------------------------------------------------------------------------- /examples/PBFlexlessEngineDemo/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/com/pblabs/rendering2D/ISpriteSheetRenderer.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.rendering2D 2 | { 3 | import com.pblabs.rendering2D.spritesheet.ISpriteSheet; 4 | 5 | public interface ISpriteSheetRenderer 6 | { 7 | function get overrideSizePerFrame():Boolean; 8 | function set overrideSizePerFrame(val : Boolean):void; 9 | function get spriteSheet():ISpriteSheet; 10 | function set spriteSheet(sheet : ISpriteSheet):void; 11 | function get spriteIndex():int; 12 | function set spriteIndex(val : int):void; 13 | } 14 | } -------------------------------------------------------------------------------- /src/com/pblabs/rendering2D/spritesheet/IImageSpriteSheet.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.rendering2D.spritesheet 2 | { 3 | import com.pblabs.engine.resource.ImageResource; 4 | 5 | /** 6 | * Marker interface to denote a sprite sheet generated from an ImageResource 7 | */ 8 | public interface IImageSpriteSheet extends ISpriteSheet 9 | { 10 | /** 11 | * The image resource to use for this sprite sheet. 12 | */ 13 | function set image(value:ImageResource):void 14 | function get image():ImageResource 15 | } 16 | } -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | PBEngine_GitFork 4 | 5 | 6 | 7 | 8 | 9 | com.adobe.flexbuilder.project.flexbuilder 10 | 11 | 12 | 13 | 14 | 15 | com.adobe.flexbuilder.project.flexlibnature 16 | com.adobe.flexbuilder.project.actionscriptnature 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/com/pblabs/engine/util/OrderedArrayUtils.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.engine.util 2 | { 3 | import com.pblabs.engine.core.OrderedArray; 4 | 5 | public final class OrderedArrayUtils 6 | { 7 | public function OrderedArrayUtils() 8 | { 9 | } 10 | 11 | public static function insertItemInArray(src : OrderedArray, item : Object, index : int = 0):void 12 | { 13 | var len : int = src.length; 14 | for (var i : int = src.length; i > index; i--) 15 | { 16 | src[i+1] = src[i]; 17 | } 18 | src[index] = item; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /development/FlashDevelop/PBEngine/Readme.txt: -------------------------------------------------------------------------------- 1 | This FlashDevelop project allows you to build PBE from the src directory, but 2 | you'll still need to set the path to your Flex SDK. If you've used FlashDevelop 3 | before, this is probably already done. See PBE Lesson 1 for more information. 4 | 5 | If you'd like to build a SWC instead of a SWF you can do so with the ANT build 6 | script in the build directory, or by using the ExportSWC plugin for FlashDevelop. 7 | The plugin is located at: 8 | http://www.flashdevelop.org/community/viewtopic.php?t=2987&start=0 -------------------------------------------------------------------------------- /src/starling/display/shaders/fragment/VertexColorFragmentShader.as: -------------------------------------------------------------------------------- 1 | package starling.display.shaders.fragment 2 | { 3 | import flash.display3D.Context3DProgramType; 4 | 5 | import starling.display.shaders.AbstractShader; 6 | 7 | /* 8 | * A pixel shader that multiplies the vertex color by the material color transform. 9 | */ 10 | public class VertexColorFragmentShader extends AbstractShader 11 | { 12 | public function VertexColorFragmentShader() 13 | { 14 | var agal:String = "mul oc, v0, fc0"; 15 | compileAGAL( Context3DProgramType.FRAGMENT, agal ); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/starling/display/shaders/vertex/StandardVertexShader.as: -------------------------------------------------------------------------------- 1 | package starling.display.shaders.vertex 2 | { 3 | import flash.display3D.Context3DProgramType; 4 | import starling.display.shaders.AbstractShader; 5 | 6 | public class StandardVertexShader extends AbstractShader 7 | { 8 | public function StandardVertexShader() 9 | { 10 | var agal:String = 11 | "m44 op, va0, vc0 \n" + // Apply matrix 12 | "mov v0, va1 \n" + // Copy color to v0 13 | "mov v1, va2 \n" // Copy UV to v1 14 | 15 | compileAGAL( Context3DProgramType.VERTEX, agal ); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/com/pblabs/triggers/actions/UnPauseGameAction.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.triggers.actions 2 | { 3 | import com.pblabs.engine.PBE; 4 | 5 | public class UnPauseGameAction extends BaseAction 6 | { 7 | /** 8 | * A toggle to pause all sound that is playing in the engine currently. 9 | **/ 10 | public var unPauseSound:Boolean = false; 11 | 12 | override public function execute():* 13 | { 14 | PBE.processManager.timeScale = PauseGameAction.previousTimeScale; 15 | if(unPauseSound) 16 | PBE.soundManager.volume = PauseGameAction.previousVolume; 17 | return; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /docs/stylesheet.css: -------------------------------------------------------------------------------- 1 | .rootHeader 2 | { 3 | background-image:url('Images/logo.gif'); 4 | width: 558px; 5 | height: 212px; 6 | } 7 | 8 | .projectHeader 9 | { 10 | } 11 | 12 | .sectionTitle 13 | { 14 | } 15 | 16 | .projectLink 17 | { 18 | } 19 | 20 | .projectSummary 21 | { 22 | } 23 | 24 | .documentLink 25 | { 26 | } 27 | 28 | .documentSummary 29 | { 30 | } 31 | 32 | .pageTitle 33 | { 34 | } 35 | 36 | .section 37 | { 38 | } 39 | 40 | .summary 41 | { 42 | } 43 | 44 | .label 45 | { 46 | } 47 | 48 | .description 49 | { 50 | } 51 | 52 | .definitionList 53 | { 54 | } 55 | 56 | .definition 57 | { 58 | } -------------------------------------------------------------------------------- /src/com/pblabs/physics/IPhysicsShape.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.physics 2 | { 3 | import flash.geom.Point; 4 | 5 | public interface IPhysicsShape 6 | { 7 | function get density():Number; 8 | function set density(value:Number):void; 9 | function get friction():Number; 10 | function set friction(value:Number):void; 11 | function get restitution():Number; 12 | function set restitution(value:Number):void; 13 | function get isTrigger():Boolean; 14 | function set isTrigger(value:Boolean):void; 15 | function get shapeScale():Point; 16 | function set shapeScale(value:Point):void; 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /src/starling/display/Shape.as: -------------------------------------------------------------------------------- 1 | package starling.display 2 | { 3 | import starling.display.Graphics; 4 | 5 | public class Shape extends DisplayObjectContainer 6 | { 7 | private var _graphics :Graphics; 8 | 9 | public function Shape() 10 | { 11 | _graphics = new Graphics(this); 12 | } 13 | 14 | public function get graphics():Graphics 15 | { 16 | return _graphics; 17 | } 18 | 19 | /* override public function dispose() : void 20 | { 21 | if ( _graphics != null ) 22 | { 23 | _graphics.dispose(); 24 | _graphics = null; 25 | } 26 | super.dispose(); 27 | } */ 28 | } 29 | } -------------------------------------------------------------------------------- /src/com/pblabs/starling2D/spritesheet/CachedFramesDataMCG2D.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.starling2D.spritesheet 2 | { 3 | import com.pblabs.rendering2D.spritesheet.CachedFramesDataMC; 4 | 5 | import flash.display.MovieClip; 6 | import flash.geom.Point; 7 | import flash.geom.Rectangle; 8 | 9 | import starling.textures.Texture; 10 | 11 | public class CachedFramesDataMCG2D extends CachedFramesDataMC 12 | { 13 | 14 | public function CachedFramesDataMCG2D(frames:Array, bounds:Rectangle, clip:MovieClip, frameCenters:Array, scale : Point) 15 | { 16 | super(frames, bounds, clip, frameCenters, scale); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/com/pblabs/rendering2D/ITextRenderer.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.rendering2D 2 | { 3 | import com.pblabs.engine.resource.DataResource; 4 | import com.pblabs.engine.resource.ImageResource; 5 | 6 | public interface ITextRenderer 7 | { 8 | function get fontImage():ImageResource; 9 | function set fontImage(img : ImageResource):void; 10 | 11 | function get fontData():DataResource; 12 | function set fontData(data : DataResource):void; 13 | 14 | function get fontColor():uint; 15 | function set fontColor(val : uint):void 16 | 17 | function get fontSize():Number; 18 | function set fontSize(val : Number):void; 19 | } 20 | } -------------------------------------------------------------------------------- /src/starling/display/GraphicsPathCommands.as: -------------------------------------------------------------------------------- 1 | package starling.display 2 | { 3 | /** 4 | * ... 5 | * Porting the GraphicsPathCommands to Starling Extension Graphics 6 | */ 7 | public class GraphicsPathCommands 8 | { 9 | public static const NO_OP:int = 0; 10 | public static const MOVE_TO:int = 1; 11 | public static const LINE_TO:int = 2; 12 | public static const CURVE_TO:int = 3; 13 | public static const WIDE_MOVE_TO:int = 4; 14 | public static const WIDE_LINE_TO:int = 5; 15 | public static const CUBIC_CURVE_TO:int = 6; 16 | 17 | public function GraphicsPathCommands() 18 | { 19 | 20 | } 21 | 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/debug/ILogAppender.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.debug 10 | { 11 | public interface ILogAppender 12 | { 13 | function addLogMessage(level:String, loggerName:String, message:String):void; 14 | } 15 | } -------------------------------------------------------------------------------- /examples/PBEngineDemo/src/com/pblabs/pbEngineDemo/UI/MainMenu.mxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 14 | 15 | -------------------------------------------------------------------------------- /src/starling/display/GraphicsSolidFill.as: -------------------------------------------------------------------------------- 1 | package starling.display 2 | { 3 | import starling.display.IGraphicsData; 4 | import starling.display.materials.IMaterial; 5 | import flash.geom.Matrix; 6 | 7 | 8 | public class GraphicsSolidFill implements IGraphicsData 9 | { 10 | protected var mColor:uint; 11 | protected var mAlpha:Number; 12 | 13 | public function GraphicsSolidFill(color:uint, alpha:Number ) 14 | { 15 | mColor = color; 16 | mAlpha = alpha; 17 | } 18 | 19 | public function get color() : uint 20 | { 21 | return mColor; 22 | } 23 | 24 | public function get alpha() : Number 25 | { 26 | return mAlpha; 27 | } 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /src/com/pblabs/components/stateMachine/IThinkingState.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.components.stateMachine 10 | { 11 | public interface IThinkingState extends IState 12 | { 13 | function getTimeForNextTick(fsm:IMachine):int; 14 | } 15 | } -------------------------------------------------------------------------------- /src/starling/utils/deg2rad.as: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // 3 | // Starling Framework 4 | // Copyright 2011 Gamua OG. All Rights Reserved. 5 | // 6 | // This program is free software. You can redistribute and/or modify it 7 | // in accordance with the terms of the accompanying license agreement. 8 | // 9 | // ================================================================================================= 10 | 11 | package starling.utils 12 | { 13 | /** Converts an angle from degrees into radians. */ 14 | public function deg2rad(deg:Number):Number 15 | { 16 | return deg / 180.0 * Math.PI; 17 | } 18 | } -------------------------------------------------------------------------------- /examples/PBEngineDemo/src/com/pblabs/pbEngineDemo/UI/GameUI.mxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 14 | 15 | -------------------------------------------------------------------------------- /src/com/pblabs/triggers/actions/SimulateInputAction.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.triggers.actions 2 | { 3 | import com.pblabs.engine.PBE; 4 | 5 | public class SimulateInputAction extends BaseAction 6 | { 7 | /** 8 | * The keycode to simulate 9 | **/ 10 | public var keyCode:int; 11 | /** 12 | * Wether to auto simulate the key up on stopping this action 13 | **/ 14 | public var autoKeyUp : Boolean = false; 15 | 16 | override public function execute():* 17 | { 18 | PBE.inputManager.simulateKeyDown(keyCode); 19 | return; 20 | } 21 | 22 | override public function stop():void 23 | { 24 | if(autoKeyUp) 25 | PBE.inputManager.simulateKeyUp(keyCode); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/starling/utils/rad2deg.as: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // 3 | // Starling Framework 4 | // Copyright 2011 Gamua OG. All Rights Reserved. 5 | // 6 | // This program is free software. You can redistribute and/or modify it 7 | // in accordance with the terms of the accompanying license agreement. 8 | // 9 | // ================================================================================================= 10 | 11 | package starling.utils 12 | { 13 | /** Converts an angle from radions into degrees. */ 14 | public function rad2deg(rad:Number):Number 15 | { 16 | return rad / Math.PI * 180.0; 17 | } 18 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/version/BuildVersion.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.version 10 | { 11 | public class BuildVersion 12 | { 13 | // This will be populated from the BuildVersion.as.templ 14 | public static const BUILD_NUMBER:String = "source"; 15 | } 16 | } -------------------------------------------------------------------------------- /src/starling/display/GraphicsTextureFill.as: -------------------------------------------------------------------------------- 1 | package starling.display 2 | { 3 | import starling.textures.Texture; 4 | import flash.geom.Matrix; 5 | 6 | /** 7 | * ... 8 | * @author Henrik Jonsson 9 | */ 10 | public class GraphicsTextureFill implements IGraphicsData 11 | { 12 | protected var mTexture:Texture; 13 | protected var mMatrix:Matrix; 14 | 15 | public function GraphicsTextureFill(texture:Texture, matrix:Matrix = null ) 16 | { 17 | mTexture = texture; 18 | mMatrix = matrix; 19 | } 20 | 21 | public function get texture() : Texture 22 | { 23 | return mTexture; 24 | } 25 | 26 | public function get matrix() : Matrix 27 | { 28 | return mMatrix; 29 | } 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /lessons/Lesson1FlexBuilder/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Lesson1FlexBuilder 4 | 5 | 6 | 7 | 8 | 9 | com.adobe.flexbuilder.project.flexbuilder 10 | 11 | 12 | 13 | 14 | 15 | com.adobe.flexbuilder.project.actionscriptnature 16 | 17 | 18 | 19 | [source path] src 20 | 2 21 | D:/workspace/pushbuttonengine/src 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/com/pblabs/starling2D/SceneViewG2DSprite.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * GameBuilder Studio 3 | * Copyright (C) 2012 GameBuilder Inc. 4 | * For more information see http://www.gamebuilderstudio.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.starling2D 10 | { 11 | import flash.display.Sprite; 12 | 13 | public class SceneViewG2DSprite extends Sprite 14 | { 15 | public function SceneViewG2DSprite() 16 | { 17 | super(); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/starling/display/shaders/fragment/TextureFragmentShader.as: -------------------------------------------------------------------------------- 1 | package starling.display.shaders.fragment 2 | { 3 | import flash.display3D.Context3D; 4 | import flash.display3D.Context3DProgramType; 5 | import flash.display3D.textures.Texture; 6 | 7 | import starling.display.shaders.AbstractShader; 8 | 9 | /* 10 | * A pixel shader that multiplies a single texture with constants (the color transform). 11 | */ 12 | public class TextureFragmentShader extends AbstractShader 13 | { 14 | public function TextureFragmentShader() 15 | { 16 | var agal:String = 17 | "tex ft1, v1, fs0 <2d, repeat, linear> \n" + 18 | "mul oc, ft1, fc0"; 19 | 20 | compileAGAL( Context3DProgramType.FRAGMENT, agal ); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /development/FB3/PBEngine/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | PBEngine 4 | 5 | 6 | 7 | 8 | 9 | com.adobe.flexbuilder.project.flexbuilder 10 | 11 | 12 | 13 | 14 | 15 | com.adobe.flexbuilder.project.flexlibnature 16 | com.adobe.flexbuilder.project.actionscriptnature 17 | 18 | 19 | 20 | [source path] src 21 | 2 22 | PBE/src 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /development/FB4/PBEngine/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | PBEngine 4 | 5 | 6 | 7 | 8 | 9 | com.adobe.flexbuilder.project.flexbuilder 10 | 11 | 12 | 13 | 14 | 15 | com.adobe.flexbuilder.project.flexlibnature 16 | com.adobe.flexbuilder.project.actionscriptnature 17 | 18 | 19 | 20 | [source path] src 21 | 2 22 | PBE/src 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/starling/display/materials/TextureMaterial.as: -------------------------------------------------------------------------------- 1 | package starling.display.materials 2 | { 3 | import starling.display.shaders.IShader; 4 | import starling.display.shaders.fragment.TextureFragmentShader; 5 | import starling.display.shaders.fragment.TextureVertexColorFragmentShader; 6 | import starling.display.shaders.fragment.VertexColorFragmentShader; 7 | import starling.display.shaders.vertex.StandardVertexShader; 8 | import starling.textures.Texture; 9 | 10 | public class TextureMaterial extends StandardMaterial 11 | { 12 | public function TextureMaterial(texture:Texture, color:uint = 0xFFFFFF) 13 | { 14 | super(new StandardVertexShader(), new TextureVertexColorFragmentShader()); 15 | textures[0] = texture; 16 | this.color = color; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /script/licenseCheck/config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | srcPath: "/pbe/trunk/src/com/pblabs" 3 | fileTypes: 4 | - type: ".as" 5 | regex: "\/\*+.+\*\/" 6 | license: "/*******************************************************************************\n * PushButton Engine\n * Copyright (C) 2009 PushButton Labs, LLC\n * For more information see http://www.pushbuttonengine.com\n * \n * This file is licensed under the terms of the MIT license, which is included\n * in the License.html file at the root directory of this SDK.\n ******************************************************************************/" 7 | 8 | # - type: ".mxml" 9 | # regex: "" 10 | # license: "" 11 | 12 | # - type: ".php" 13 | # regex: "" 14 | # license: "" -------------------------------------------------------------------------------- /src/starling/display/GraphicsMaterialFill.as: -------------------------------------------------------------------------------- 1 | package starling.display 2 | { 3 | import starling.display.IGraphicsData; 4 | import starling.display.materials.IMaterial; 5 | import flash.geom.Matrix; 6 | 7 | /** 8 | * ... 9 | * @author Henrik Jonsson 10 | */ 11 | public class GraphicsMaterialFill implements IGraphicsData 12 | { 13 | protected var mMaterial:IMaterial; 14 | protected var mMatrix:Matrix; 15 | 16 | public function GraphicsMaterialFill(material:IMaterial, uvMatrix:Matrix = null ) 17 | { 18 | mMaterial = material; 19 | mMatrix = uvMatrix; 20 | } 21 | 22 | public function get material() : IMaterial 23 | { 24 | return mMaterial; 25 | } 26 | 27 | public function get matrix() : Matrix 28 | { 29 | return mMatrix; 30 | } 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/serialization/TestForMetadata.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.serialization 10 | { 11 | /** 12 | * Helper class to make sure metadata is being included. 13 | */ 14 | public class TestForMetadata 15 | { 16 | [TypeHint(type="Number")] 17 | public var someArray:Array; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/com/pblabs/engine/version/VersionType.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.version 10 | { 11 | /** 12 | * Enumeration of different runtime types. 13 | */ 14 | public class VersionType 15 | { 16 | public static const FLEX:String = "flex"; 17 | public static const FLASH:String = "flash"; 18 | public static const AIR:String = "air"; 19 | } 20 | } -------------------------------------------------------------------------------- /src/starling/display/shaders/fragment/TextureVertexColorFragmentShader.as: -------------------------------------------------------------------------------- 1 | package starling.display.shaders.fragment 2 | { 3 | import flash.display3D.Context3D; 4 | import flash.display3D.Context3DProgramType; 5 | import flash.display3D.textures.Texture; 6 | 7 | import starling.display.shaders.AbstractShader; 8 | 9 | /* 10 | * A pixel shader that multiplies a single texture with constants (the color transform) and vertex color 11 | */ 12 | public class TextureVertexColorFragmentShader extends AbstractShader 13 | { 14 | public function TextureVertexColorFragmentShader() 15 | { 16 | var agal:String = 17 | "tex ft1, v1, fs0 <2d, repeat, linear> \n" + 18 | "mul ft2, v0, fc0 \n" + 19 | "mul oc, ft1, ft2" 20 | 21 | compileAGAL( Context3DProgramType.FRAGMENT, agal ); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /lessons/Lesson5Final/src/MyResources.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | 10 | package 11 | { 12 | import com.pblabs.engine.resource.*; 13 | 14 | public class MyResources extends ResourceBundle 15 | { 16 | [Embed(source="../assets/bg.jpg")] 17 | public var resBg:Class; 18 | 19 | [Embed(source="../assets/fanship.png")] 20 | public var resShip:Class; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/com/pblabs/triggers/actions/PauseGameAction.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.triggers.actions 2 | { 3 | import com.pblabs.engine.PBE; 4 | 5 | public class PauseGameAction extends BaseAction 6 | { 7 | public static var previousTimeScale : Number = 1; 8 | public static var previousVolume : Number = 1; 9 | /** 10 | * A toggle to pause all sound that is playing in the engine currently. 11 | **/ 12 | public var pauseSound:Boolean = false; 13 | 14 | override public function execute():* 15 | { 16 | var curTimeScale : Number = PBE.processManager.timeScale; 17 | if(curTimeScale > 0) 18 | previousTimeScale = curTimeScale; 19 | PBE.processManager.timeScale = 0; 20 | if(pauseSound){ 21 | previousVolume = PBE.soundManager.volume; 22 | PBE.soundManager.volume = 0; 23 | } 24 | return; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/com/pblabs/triggers/actions/TimeShiftAction.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.triggers.actions 2 | { 3 | import com.pblabs.engine.PBE; 4 | import com.pblabs.engine.scripting.ExpressionReference; 5 | 6 | public class TimeShiftAction extends BaseAction 7 | { 8 | public function TimeShiftAction(){ 9 | super(); 10 | _type = ActionType.PERSISTANT; 11 | } 12 | /** 13 | * The time scale of the game. If you throttle this value the game will either speed up or slow down. 14 | **/ 15 | public var timeScaleExpression : ExpressionReference = new ExpressionReference("1"); 16 | 17 | private var _timeScale : Number = 1; 18 | 19 | override public function execute():* 20 | { 21 | _timeScale = Number(getExpressionValue(timeScaleExpression)); 22 | PBE.processManager.timeScale = _timeScale; 23 | return; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /src/com/pblabs/rendering2D/spritesheet/CachedFramesDataMC.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.rendering2D.spritesheet 2 | { 3 | import flash.display.MovieClip; 4 | import flash.geom.Point; 5 | import flash.geom.Rectangle; 6 | 7 | public class CachedFramesDataMC extends CachedFramesData 8 | { 9 | public var frameCenters:Array; 10 | public var clip:MovieClip; 11 | public var scale : Point; 12 | 13 | public function CachedFramesDataMC(frames:Array, bounds:Rectangle, clip:MovieClip, frameCenters : Array, scale : Point) 14 | { 15 | super(frames, null, null, bounds); 16 | this.frameCenters = frameCenters; 17 | this.clip = clip; 18 | this.scale = scale; 19 | } 20 | override public function destroy():void 21 | { 22 | super.destroy(); 23 | frameCenters = null; 24 | clip = null; 25 | referenceCount = -1; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/com/pblabs/starling2D/InitializationUtilG2D.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * GameBuilder Studio 3 | * Copyright (C) 2012 GameBuilder Inc. 4 | * For more information see http://www.gamebuilderstudio.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.starling2D 10 | { 11 | import org.osflash.signals.Signal; 12 | 13 | public class InitializationUtilG2D 14 | { 15 | public static const disposed : Signal = new Signal(); 16 | public static const initializeRenderers : Signal = new Signal(); 17 | 18 | public function InitializationUtilG2D() 19 | { 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /examples/PBFlashCS4Demo/spriteSheets.pbelevel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 8 11 | 8 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/starling/display/graphicsEx/GraphicsExThicknessData.as: -------------------------------------------------------------------------------- 1 | package starling.display.graphicsEx 2 | { 3 | 4 | public class GraphicsExThicknessData 5 | { 6 | 7 | // Parameters to control thickness along the segment 8 | public var startThickness:Number = -1; 9 | public var endThickness:Number = -1; 10 | public var thicknessCallback:Function = null; // Callback function not yet supported 11 | 12 | public function GraphicsExThicknessData(sThick:int, eThick:int, callback:Function = null ) 13 | { 14 | startThickness = sThick; 15 | endThickness = eThick; 16 | thicknessCallback = callback; 17 | } 18 | 19 | public function clone() : GraphicsExThicknessData 20 | { 21 | var c:GraphicsExThicknessData = new GraphicsExThicknessData(startThickness, endThickness, thicknessCallback); 22 | 23 | return c; 24 | } 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /src/com/pblabs/tweaker/TweakerMapGroup.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.tweaker 10 | { 11 | /** 12 | */ 13 | public class TweakerMapGroup 14 | { 15 | [TypeHint(type="com.pblabs.tweaker.TweakerMapEntry")] 16 | public var entries:Array = new Array(); 17 | 18 | [TypeHint(type="com.pblabs.tweaker.TweakerMapEntry")] 19 | public var offsets:Array = new Array(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /examples/StarlingMobileTest/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | StarlingMobileTest 4 | 5 | 6 | 7 | 8 | 9 | com.adobe.flexbuilder.project.flexbuilder 10 | 11 | 12 | 13 | 14 | com.adobe.flexbuilder.project.apollobuilder 15 | 16 | 17 | 18 | 19 | 20 | com.adobe.flexide.project.multiplatform.multiplatformasnature 21 | com.adobe.flexide.project.multiplatform.multiplatformnature 22 | com.adobe.flexbuilder.project.apollonature 23 | com.adobe.flexbuilder.project.actionscriptnature 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/starling/display/GraphicsLine.as: -------------------------------------------------------------------------------- 1 | package starling.display 2 | { 3 | 4 | /** 5 | * ... 6 | * API-breaking class GraphicsLine, allowing for line thickness, color, alpha on line segments. 7 | */ 8 | public class GraphicsLine implements IGraphicsData 9 | { 10 | protected var mThickness:Number = NaN; 11 | protected var mColor:int = 0; 12 | protected var mAlpha:Number = 1.0; 13 | 14 | public function GraphicsLine(thickness:Number = NaN, color:int = 0, alpha:Number = 1.0 ) 15 | { 16 | mThickness = thickness; 17 | mColor = color; 18 | mAlpha = alpha; 19 | } 20 | 21 | public function get thickness() : Number 22 | { 23 | return mThickness; 24 | } 25 | 26 | public function get color() : int 27 | { 28 | return mColor; 29 | } 30 | 31 | public function get alpha() : Number 32 | { 33 | return mAlpha; 34 | } 35 | 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /src/com/pblabs/nape/constraints/INape2DConstraintComponent.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.nape.constraints 2 | { 3 | import com.pblabs.engine.entity.IEntityComponent; 4 | import com.pblabs.nape.INape2DSpatialComponent; 5 | import com.pblabs.physics.IPhysics2DConstraint; 6 | 7 | import nape.constraint.Constraint; 8 | 9 | public interface INape2DConstraintComponent extends IPhysics2DConstraint, IEntityComponent 10 | { 11 | /** 12 | * The 1st physics spatial used in the constraint setup 13 | */ 14 | function get spatial1():INape2DSpatialComponent; 15 | function set spatial1(value:INape2DSpatialComponent):void; 16 | 17 | /** 18 | * The 2nd physics spatial used in the constraint setup 19 | */ 20 | function get spatial2():INape2DSpatialComponent; 21 | function set spatial2(value:INape2DSpatialComponent):void; 22 | 23 | function get constraint():Constraint 24 | } 25 | } -------------------------------------------------------------------------------- /examples/PBEngineDemo/assets/Levels/spriteSheets.pbelevel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 8 11 | 8 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/com/pblabs/engine/debug/TraceAppender.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.debug 10 | { 11 | 12 | /** 13 | * Simply dump log activity via trace(). 14 | */ 15 | public class TraceAppender implements ILogAppender 16 | { 17 | public function addLogMessage(level:String, loggerName:String, message:String):void 18 | { 19 | trace(level + ": " + loggerName + " - " + message); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /examples/PBFlexlessEngineDemo/assets/Levels/spriteSheets.pbelevel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 8 11 | 8 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /development/FlashDevelop/PBEngine/src/Hello.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package 10 | { 11 | import com.pblabs.engine.debug.Logger; 12 | import com.pblabs.engine.PBE; 13 | import flash.display.Sprite; 14 | /** 15 | * ... 16 | * @author JD 17 | */ 18 | public class Hello extends Sprite 19 | { 20 | 21 | public function Hello() 22 | { 23 | PBE.startup(this); 24 | Logger.print(this, "Hello, World!"); 25 | } 26 | 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /src/com/pblabs/starling2D/spritesheet/CachedFramesDataG2D.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.starling2D.spritesheet 2 | { 3 | import com.pblabs.rendering2D.spritesheet.CachedFramesData; 4 | import com.pblabs.rendering2D.spritesheet.ISpriteSheetDivider; 5 | 6 | import flash.geom.Rectangle; 7 | 8 | import starling.textures.Texture; 9 | import starling.textures.TextureAtlas; 10 | 11 | public class CachedFramesDataG2D extends CachedFramesData 12 | { 13 | public var atlas : TextureAtlas; 14 | public function CachedFramesDataG2D(frames:Array, fileName:String, divider:ISpriteSheetDivider, bounds:Rectangle, atlas : TextureAtlas) 15 | { 16 | super(frames, fileName, divider, bounds); 17 | this.atlas = atlas; 18 | } 19 | 20 | override public function destroy():void 21 | { 22 | super.destroy(); 23 | if(this.atlas){ 24 | this.atlas.dispose(); 25 | this.atlas = null; 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/starling/textures/GradientTexture.as: -------------------------------------------------------------------------------- 1 | package starling.textures 2 | { 3 | import flash.display.BitmapData; 4 | import flash.display.Shape; 5 | import flash.geom.Matrix; 6 | import starling.textures.Texture; 7 | 8 | public class GradientTexture 9 | { 10 | static public function create(width:Number, height:Number, type:String, colors:Array, alphas:Array, ratios:Array, matrix:Matrix=null, spreadMethod:String="pad", interpolationMethod:String="rgb", focalPointRatio:Number=0):Texture 11 | { 12 | var shape:Shape = new Shape(); 13 | shape.graphics.beginGradientFill( type, colors, alphas, ratios, matrix, spreadMethod, interpolationMethod, focalPointRatio ); 14 | shape.graphics.drawRect(0, 0, width, height); 15 | 16 | var bitmapData:BitmapData = new BitmapData(width, height, true); 17 | bitmapData.draw( shape ); 18 | 19 | return Texture.fromBitmapData(bitmapData); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /src/starling/core/starling_internal.as: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // 3 | // Starling Framework 4 | // Copyright 2012 Gamua OG. All Rights Reserved. 5 | // 6 | // This program is free software. You can redistribute and/or modify it 7 | // in accordance with the terms of the accompanying license agreement. 8 | // 9 | // ================================================================================================= 10 | 11 | package starling.core 12 | { 13 | /** 14 | * This namespace is used for undocumented APIs -- usually implementation 15 | * details -- which can't be private because they need to visible 16 | * to other classes. 17 | * 18 | * APIs in this namespace are completely unsupported and are likely to 19 | * change in future versions of Starling. 20 | */ 21 | public namespace starling_internal; 22 | } -------------------------------------------------------------------------------- /script/lessons/package_release.sh: -------------------------------------------------------------------------------- 1 | # Build a release. 2 | 3 | # Pull down the latest lesson source 4 | svn export --force http://pushbuttonengine.googlecode.com/svn/trunk/lessons/ . 5 | 6 | # Zip each folder up into individual folders 7 | zip -mr9 Lesson1FlashCS4.zip Lesson1FlashCS4 8 | zip -mr9 Lesson1FlashDevelop.zip Lesson1FlashDevelop 9 | zip -mr9 Lesson1FlexBuilder.zip Lesson1FlexBuilder 10 | zip -mr9 Lesson2Base.zip Lesson2Base 11 | zip -mr9 Lesson2Final.zip Lesson2Final 12 | zip -mr9 Lesson3Base.zip Lesson3Base 13 | zip -mr9 Lesson3Final.zip Lesson3Final 14 | zip -mr9 Lesson4Base.zip Lesson4Base 15 | zip -mr9 Lesson4Final.zip Lesson4Final 16 | zip -mr9 Lesson5Base.zip Lesson5Base 17 | zip -mr9 Lesson5Final.zip Lesson5Final 18 | 19 | mv *.zip ../../docs/downloads/ 20 | 21 | # Check it in 22 | svn commit ../../docs/downloads/*.zip -m "Automated packaging of Lesson Zips" -------------------------------------------------------------------------------- /src/starling/errors/AbstractMethodError.as: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // 3 | // Starling Framework 4 | // Copyright 2011 Gamua OG. All Rights Reserved. 5 | // 6 | // This program is free software. You can redistribute and/or modify it 7 | // in accordance with the terms of the accompanying license agreement. 8 | // 9 | // ================================================================================================= 10 | 11 | package starling.errors 12 | { 13 | /** An AbstractMethodError is thrown when you attempt to call an abstract method. */ 14 | public class AbstractMethodError extends Error 15 | { 16 | /** Creates a new AbstractMethodError object. */ 17 | public function AbstractMethodError(message:*="Method needs to be implemented in subclass", id:*=0) 18 | { 19 | super(message, id); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /examples/PBFlashCS4Demo/level1.pbelevel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 94 6 | 450 7 | 8 | 9 | 10 | 11 | 12 | 13 | 400 14 | 500 15 | 16 | 17 | 18 | 19 | 20 | 21 | 706 22 | 450 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/PBFlashCS4Demo/level2.pbelevel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 94 6 | 550 7 | 8 | 9 | 10 | 11 | 12 | 13 | 400 14 | 500 15 | 16 | 17 | 18 | 19 | 20 | 21 | 706 22 | 450 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/PBFlashCS4Demo/level3.pbelevel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 94 6 | 450 7 | 8 | 9 | 10 | 11 | 12 | 13 | 400 14 | 500 15 | 16 | 17 | 18 | 19 | 20 | 21 | 706 22 | 550 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/com/pblabs/rendering2D/RenderCacheKeyManager.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.rendering2D 10 | { 11 | [EditorData(ignore="true")] 12 | 13 | /** 14 | * Helper class to manage RenderCacheKey values; basically just a global int 15 | * that we can increment to get new values to trigger cache invalidation. 16 | * 17 | * @see IDrawManager2D 18 | * 19 | */ 20 | public final class RenderCacheKeyManager 21 | { 22 | public static var Token:int = 0; 23 | } 24 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/components/DataComponent.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.components 10 | { 11 | import com.pblabs.engine.entity.EntityComponent; 12 | 13 | /** 14 | * Container for arbitrary data. As it is dynamic, you can set whatever 15 | * fields you want. Useful for storing general purpose data. 16 | */ 17 | 18 | [EditorData(editAs="flash.utils.Dictionary")] 19 | public dynamic class DataComponent extends EntityComponent 20 | { 21 | } 22 | } -------------------------------------------------------------------------------- /src/starling/errors/AbstractClassError.as: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // 3 | // Starling Framework 4 | // Copyright 2011 Gamua OG. All Rights Reserved. 5 | // 6 | // This program is free software. You can redistribute and/or modify it 7 | // in accordance with the terms of the accompanying license agreement. 8 | // 9 | // ================================================================================================= 10 | 11 | package starling.errors 12 | { 13 | /** An AbstractClassError is thrown when you attempt to create an instance of an abstract 14 | * class. */ 15 | public class AbstractClassError extends Error 16 | { 17 | /** Creates a new AbstractClassError object. */ 18 | public function AbstractClassError(message:*="Cannot instantiate abstract class", id:*=0) 19 | { 20 | super(message, id); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/starling/errors/MissingContextError.as: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // 3 | // Starling Framework 4 | // Copyright 2011 Gamua OG. All Rights Reserved. 5 | // 6 | // This program is free software. You can redistribute and/or modify it 7 | // in accordance with the terms of the accompanying license agreement. 8 | // 9 | // ================================================================================================= 10 | 11 | package starling.errors 12 | { 13 | /** A MissingContextError is thrown when a Context3D object is required but not (yet) 14 | * available. */ 15 | public class MissingContextError extends Error 16 | { 17 | /** Creates a new MissingContextError object. */ 18 | public function MissingContextError(message:*="Starling context is missing", id:*=0) 19 | { 20 | super(message, id); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /examples/PBFlexlessEngineDemo/assets/Levels/level1.pbelevel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 94 6 | 450 7 | 8 | 9 | 10 | 11 | 12 | 13 | 400 14 | 500 15 | 16 | 17 | 18 | 19 | 20 | 21 | 706 22 | 450 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/PBFlexlessEngineDemo/assets/Levels/level2.pbelevel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 94 6 | 550 7 | 8 | 9 | 10 | 11 | 12 | 13 | 400 14 | 500 15 | 16 | 17 | 18 | 19 | 20 | 21 | 706 22 | 450 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/PBFlexlessEngineDemo/assets/Levels/level3.pbelevel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 94 6 | 450 7 | 8 | 9 | 10 | 11 | 12 | 13 | 400 14 | 500 15 | 16 | 17 | 18 | 19 | 20 | 21 | 706 22 | 550 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/PBEngineDemo/assets/Levels/level1.pbelevel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 94 6 | 450 7 | 8 | 9 | 10 | 11 | 12 | 13 | 400 14 | 500 15 | 16 | 17 | 18 | 19 | 20 | 21 | 706 22 | 450 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/PBEngineDemo/assets/Levels/level2.pbelevel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 94 6 | 550 7 | 8 | 9 | 10 | 11 | 12 | 13 | 400 14 | 500 15 | 16 | 17 | 18 | 19 | 20 | 21 | 706 22 | 450 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /examples/PBEngineDemo/assets/Levels/level3.pbelevel: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 94 6 | 450 7 | 8 | 9 | 10 | 11 | 12 | 13 | 400 14 | 500 15 | 16 | 17 | 18 | 19 | 20 | 21 | 706 22 | 550 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/com/pblabs/physics/IPhysics2DManager.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.physics 2 | { 3 | import com.pblabs.rendering2D.ISpatialManager2D; 4 | 5 | import flash.display.DisplayObject; 6 | import flash.geom.Point; 7 | import flash.geom.Rectangle; 8 | 9 | public interface IPhysics2DManager extends ISpatialManager2D 10 | { 11 | function get inverseScale():Number; 12 | function get scale():Number; 13 | function set scale(value:Number):void; 14 | function get allowSleep():Boolean; 15 | function set allowSleep(value:Boolean):void; 16 | function get gravity():Point; 17 | function set gravity(value:Point):void; 18 | function get worldBounds():Rectangle; 19 | function set worldBounds(value:Rectangle):void; 20 | function get visualDebugging():Boolean; 21 | function set visualDebugging(value:Boolean):void; 22 | function get debugDrawer() : DisplayObject; 23 | function get debugLayerPosition():Point; 24 | function set debugLayerPosition(value:Point):void; 25 | } 26 | } -------------------------------------------------------------------------------- /development/FB3/PBEngine/.actionScriptProperties: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/com/pblabs/rendering2D/ILayerMouseHandler.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.rendering2D 10 | { 11 | import flash.geom.Point; 12 | import com.pblabs.engine.core.ObjectType; 13 | 14 | /** 15 | * Implemented by layers which do their own entities-under-point logic. 16 | */ 17 | public interface ILayerMouseHandler 18 | { 19 | /** 20 | * @see IScene2D.getRenderersUnderPoint 21 | */ 22 | function getRenderersUnderPoint(scenePosition:Point, mask:ObjectType, results:Array):void; 23 | } 24 | } -------------------------------------------------------------------------------- /src/starling/utils/formatString.as: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // 3 | // Starling Framework 4 | // Copyright 2011 Gamua OG. All Rights Reserved. 5 | // 6 | // This program is free software. You can redistribute and/or modify it 7 | // in accordance with the terms of the accompanying license agreement. 8 | // 9 | // ================================================================================================= 10 | 11 | package starling.utils 12 | { 13 | // TODO: add number formatting options 14 | 15 | /** Formats a String in .Net-style, with curly braces ("{0}"). Does not support any 16 | * number formatting options yet. */ 17 | public function formatString(format:String, ...args):String 18 | { 19 | for (var i:int=0; i 2 | 3 | 4 | 5 | 6 | 7 | 27 | Hidden frame for Browser History support. 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/starling/display/shaders/AbstractShader.as: -------------------------------------------------------------------------------- 1 | package starling.display.shaders 2 | { 3 | import com.adobe.utils.AGALMiniAssembler; 4 | 5 | import flash.display3D.Context3D; 6 | import flash.display3D.Context3DProgramType; 7 | import flash.utils.ByteArray; 8 | 9 | public class AbstractShader implements IShader 10 | { 11 | private static var assembler:AGALMiniAssembler; 12 | 13 | protected var _opCode :ByteArray; 14 | 15 | public function AbstractShader() 16 | { 17 | 18 | } 19 | 20 | protected function compileAGAL( shaderType:String, agal:String ):void 21 | { 22 | if ( assembler == null ) 23 | { 24 | assembler = new AGALMiniAssembler(); 25 | } 26 | assembler.assemble( shaderType, agal ); 27 | _opCode = assembler.agalcode; 28 | } 29 | 30 | public function get opCode():ByteArray 31 | { 32 | return _opCode; 33 | } 34 | 35 | public function setConstants( context:Context3D, firstRegister:int ):void 36 | { 37 | 38 | } 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /lessons/Lesson1FlexBuilder/html-template/history/historyFrame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 27 | Hidden frame for Browser History support. 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/com/pblabs/screens/BaseScreen.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.screens 10 | { 11 | import flash.display.Sprite; 12 | 13 | /** 14 | * Most basic implementation of IScreen. You will probably want to use a 15 | * subclass. 16 | */ 17 | public class BaseScreen extends Sprite implements IScreen 18 | { 19 | public function onShow():void 20 | { 21 | } 22 | 23 | public function onHide():void 24 | { 25 | } 26 | 27 | public function onFrame(delta:Number):void 28 | { 29 | } 30 | 31 | public function onTick(delta:Number):void 32 | { 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/version/VersionDetails.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.version 10 | { 11 | import flash.system.Security; 12 | 13 | /** 14 | * Utility class to store version information. 15 | */ 16 | public class VersionDetails 17 | { 18 | public var type:String; 19 | public var flexVersion:FlexSDKVersion; 20 | 21 | public function toString():String 22 | { 23 | return "GameBuilder Studio (PBE Fork) - " + BuildVersion.BUILD_NUMBER +" - " 24 | + type + (flexVersion ? " ("+flexVersion+")" : "") 25 | + " - " + Security.sandboxType; 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/com/pblabs/rendering2D/spritesheet/CachedFramesData.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.rendering2D.spritesheet 2 | { 3 | import flash.geom.Rectangle; 4 | 5 | import org.osflash.signals.Signal; 6 | 7 | public class CachedFramesData 8 | { 9 | public function CachedFramesData(frames:Array, fileName : String, divider : ISpriteSheetDivider, bounds : Rectangle ) 10 | { 11 | this.frames = frames; 12 | this.fileName = fileName; 13 | this.divider = divider; 14 | this.bounds = bounds; 15 | } 16 | public var released : Signal = new Signal(CachedFramesData); 17 | public var frames:Array; 18 | public var fileName:String; 19 | public var divider:ISpriteSheetDivider; 20 | public var referenceCount : int = 0; 21 | public var bounds:Rectangle; 22 | 23 | public function destroy():void 24 | { 25 | released.dispatch(this); 26 | if(frames){ 27 | while(frames.length > 0) 28 | { 29 | frames[0].dispose(); 30 | frames.splice(0,1); 31 | } 32 | } 33 | frames = null; 34 | bounds = null; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/com/pblabs/screens/BaseScreenG2D.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.screens 10 | { 11 | import starling.display.Sprite; 12 | 13 | /** 14 | * Most basic implementation of IScreen. You will probably want to use a 15 | * subclass. 16 | */ 17 | public class BaseScreenG2D extends Sprite implements IScreen 18 | { 19 | public function onShow():void 20 | { 21 | } 22 | 23 | public function onHide():void 24 | { 25 | } 26 | 27 | public function onFrame(delta:Number):void 28 | { 29 | } 30 | 31 | public function onTick(delta:Number):void 32 | { 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/com/pblabs/triggers/ITriggerComponent.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.triggers 2 | { 3 | import com.pblabs.engine.entity.IEntityComponent; 4 | 5 | /** 6 | * The main purpose of a trigger is to execute a set group of actions. 7 | * It is up to the implementer as to how these actions are exected. 8 | * 9 | * @author Jeremy Saenz 10 | * 11 | */ 12 | public interface ITriggerComponent extends IEntityComponent 13 | { 14 | /** 15 | * Contains all of the actions that are to be executed 16 | * 17 | * see com.pblabs.triggers.actions.IAction 18 | */ 19 | function get actions():Array; 20 | function set actions(value:Array):void; 21 | 22 | /** 23 | * The return object of the last action executed, can be 24 | * used tostring actions together via property references. 25 | */ 26 | function get lastReturn():*; 27 | 28 | /** 29 | * The return object of the last action executed, can be 30 | * used tostring actions together via property references. 31 | */ 32 | function execute():void; 33 | } 34 | } -------------------------------------------------------------------------------- /lessons/Lesson2Base/src/Lesson2Base.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package 10 | { 11 | import com.pblabs.engine.PBE; 12 | import com.pblabs.engine.entity.*; 13 | import com.pblabs.rendering2D.*; 14 | import com.pblabs.rendering2D.ui.*; 15 | 16 | import flash.display.Sprite; 17 | import flash.geom.Point; 18 | 19 | [SWF(width="800", height="600", frameRate="60")] 20 | public class Lesson2Base extends Sprite 21 | { 22 | public function Lesson2Base() 23 | { 24 | PBE.startup(this); // Start up PBE 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/starling/display/materials/IMaterial.as: -------------------------------------------------------------------------------- 1 | package starling.display.materials 2 | { 3 | import flash.display3D.Context3D; 4 | import flash.display3D.IndexBuffer3D; 5 | import flash.display3D.VertexBuffer3D; 6 | import flash.geom.Matrix3D; 7 | 8 | import starling.display.shaders.IShader; 9 | import starling.textures.Texture; 10 | 11 | public interface IMaterial 12 | { 13 | function dispose():void 14 | function set alpha(value:Number):void; 15 | function get alpha():Number; 16 | function set color(value:uint):void; 17 | function get color():uint; 18 | function set vertexShader( value:IShader ):void; 19 | function get vertexShader():IShader; 20 | function set fragmentShader( value:IShader ):void 21 | function get fragmentShader():IShader; 22 | function get textures():Vector.; 23 | function set textures(value:Vector.):void; 24 | function drawTriangles( context:Context3D, matrix:Matrix3D, vertexBuffer:VertexBuffer3D, indexBuffer:IndexBuffer3D, alpha:Number = 1 ):void; 25 | function restoreOnLostContext():void; 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/core/InputState.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.engine.core 2 | { 3 | public final class InputState 4 | { 5 | public var value : Boolean = false; 6 | public var keyCode : int = -1; 7 | public var stageX : Number; 8 | public var stageY : Number; 9 | public var pressure : Number; 10 | public var touchCount : int = 0; 11 | public var phase : String = ""; 12 | public var id : int = -1; 13 | 14 | private static var _pool : Vector. = new Vector.(); 15 | 16 | public function InputState(keyCode : int):void 17 | { 18 | this.keyCode = keyCode; 19 | } 20 | public static function getInstance(keyCode : int):InputState 21 | { 22 | if(_pool.length < 1) 23 | return new InputState(keyCode); 24 | return _pool.shift(); 25 | } 26 | 27 | public function dispose():void 28 | { 29 | value = false; 30 | keyCode = -1; 31 | touchCount = 0; 32 | stageX = stageY = 0; 33 | pressure = 0; 34 | phase = ""; 35 | id = -1; 36 | if(_pool.indexOf(this) == -1) 37 | _pool.push(this); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/starling/display/graphicsEx/GraphicsNaturalSpline.as: -------------------------------------------------------------------------------- 1 | package starling.display.graphicsEx 2 | { 3 | import starling.display.GraphicsPathCommands; 4 | import starling.display.IGraphicsData; 5 | 6 | /** 7 | * ... 8 | * Making the spline usable for GraphicsPath as well 9 | */ 10 | 11 | public class GraphicsNaturalSpline implements IGraphicsData 12 | { 13 | protected var mControlPoints:Array; 14 | protected var mClosed:Boolean; 15 | protected var mSteps:int; 16 | 17 | public function GraphicsNaturalSpline(controlPoints:Array = null, closed:Boolean = false, steps:int = 4) 18 | { 19 | mControlPoints = controlPoints; 20 | mClosed = closed ; 21 | mSteps = steps; 22 | if ( mControlPoints == null ) 23 | mControlPoints = []; 24 | } 25 | 26 | public function get controlPoints() : Array 27 | { 28 | return mControlPoints; 29 | } 30 | 31 | public function get closed() :Boolean 32 | { 33 | return mClosed; 34 | } 35 | 36 | public function get steps() : int 37 | { 38 | return mSteps; 39 | } 40 | 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /src/com/pblabs/rendering2D/spritesheet/ISpriteSheetNamedFramesDivider.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.rendering2D.spritesheet 10 | { 11 | import flash.geom.Rectangle; 12 | 13 | /** 14 | * A sprite sheet interface marker used to expose additional methods for retrieving frames by name instead of index only for dividers with frame names 15 | */ 16 | public interface ISpriteSheetNamedFramesDivider extends ISpriteSheetDivider 17 | { 18 | function getFrameNameByIndex(index:int):String; 19 | function getFrameByName(name:String):Rectangle; 20 | function getFrameIndexByName(name:String):int; 21 | function isLoaded():Boolean; 22 | } 23 | } -------------------------------------------------------------------------------- /src/starling/display/graphics/TriangleFan.as: -------------------------------------------------------------------------------- 1 | package starling.display.graphics 2 | { 3 | import starling.core.RenderSupport; 4 | import starling.core.Starling; 5 | import starling.textures.Texture; 6 | 7 | public class TriangleFan extends Graphic 8 | { 9 | private var numVertices :int; 10 | 11 | public function TriangleFan() 12 | { 13 | vertices.push(0,0,0,1,1,1,1,0,0); 14 | numVertices++; 15 | } 16 | 17 | public function addVertex( x:Number, y:Number, u:Number = 0, v:Number = 0 ):void 18 | { 19 | vertices.push( x, y, 0, 1, 1, 1, 1, u, v ); 20 | numVertices++; 21 | 22 | minBounds.x = x < minBounds.x ? x : minBounds.x; 23 | minBounds.y = y < minBounds.y ? y : minBounds.y; 24 | maxBounds.x = x > maxBounds.x ? x : maxBounds.x; 25 | maxBounds.y = y > maxBounds.y ? y : maxBounds.y; 26 | 27 | if ( numVertices > 2 ) 28 | { 29 | indices.push( 0, numVertices-2, numVertices-1 ); 30 | } 31 | 32 | setGeometryInvalid(); 33 | } 34 | 35 | override protected function buildGeometry():void 36 | { 37 | 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /src/starling/utils/getNextPowerOfTwo.as: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // 3 | // Starling Framework 4 | // Copyright 2011 Gamua OG. All Rights Reserved. 5 | // 6 | // This program is free software. You can redistribute and/or modify it 7 | // in accordance with the terms of the accompanying license agreement. 8 | // 9 | // ================================================================================================= 10 | 11 | package starling.utils 12 | { 13 | /** Returns the next power of two that is equal to or bigger than the specified number. */ 14 | public function getNextPowerOfTwo(number:Number):int 15 | { 16 | if (number is int && number > 0 && (number & (number - 1)) == 0) // see: http://goo.gl/D9kPj 17 | return number; 18 | else 19 | { 20 | var result:int = 1; 21 | number -= 0.000000001; // avoid floating point rounding errors 22 | 23 | while (result < number) result <<= 1; 24 | return result; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/version/mx_internal.as: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // ADOBE SYSTEMS INCORPORATED 4 | // Copyright 2005-2006 Adobe Systems Incorporated 5 | // All Rights Reserved. 6 | // 7 | // NOTICE: Adobe permits you to use, modify, and distribute this file 8 | // in accordance with the terms of the license agreement accompanying it. 9 | // 10 | //////////////////////////////////////////////////////////////////////////////// 11 | 12 | package com.pblabs.engine.version 13 | { 14 | 15 | /** 16 | * This namespace is used for undocumented APIs -- usually implementation 17 | * details -- which can't be private because they need to visible 18 | * to other classes. 19 | * APIs in this namespace are completely unsupported and are likely to 20 | * change in future versions of Flex. 21 | * 22 | * @langversion 3.0 23 | * @playerversion Flash 9 24 | * @playerversion AIR 1.1 25 | * @productversion Flex 3 26 | */ 27 | public namespace mx_internal = 28 | "http://www.adobe.com/2006/flex/mx/internal"; 29 | } 30 | -------------------------------------------------------------------------------- /src/com/pblabs/components/stateMachine/DeathState.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.components.stateMachine 10 | { 11 | import com.pblabs.engine.entity.IEntity; 12 | 13 | /** 14 | * State which destroys its owning container when it is entered. 15 | */ 16 | public class DeathState extends BasicState 17 | { 18 | override public function enter(fsm:IMachine):void 19 | { 20 | // Kill ourselves! 21 | var entity:IEntity = fsm.propertyBag as IEntity; 22 | if(!entity) 23 | throw new Error("Cannot call Destroy on a non-entity!"); 24 | entity.destroy(); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/entity/allocateEntity.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.entity 10 | { 11 | /** 12 | * Allocates an instance of the hidden Entity class. This should be 13 | * used anytime an IEntity object needs to be created. Encapsulating 14 | * the Entity class forces code to use IEntity rather than Entity when 15 | * dealing with entity references. This will ensure that code is future 16 | * proof as well as allow the Entity class to be pooled in the future. 17 | * 18 | * @return A new IEntity. 19 | */ 20 | public function allocateEntity():IEntity 21 | { 22 | return new Entity(); 23 | } 24 | } -------------------------------------------------------------------------------- /test/src/com/pblabs/engine/tests/TestComponentB.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.tests 10 | { 11 | import com.pblabs.engine.entity.EntityComponent; 12 | import com.pblabs.engine.entity.PropertyReference; 13 | 14 | import flash.geom.Point; 15 | 16 | /** 17 | * @private 18 | */ 19 | public class TestComponentB extends EntityComponent 20 | { 21 | public var testComplex:Point = null; 22 | public var aTestValueReference:PropertyReference = new PropertyReference(); 23 | 24 | public function getTestValueFromA():int 25 | { 26 | return owner.getProperty(aTestValueReference); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /src/starling/utils/cleanMasterString.as: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // 3 | // Starling Framework 4 | // Copyright 2014 Gamua GmbH. All Rights Reserved. 5 | // 6 | // This program is free software. You can redistribute and/or modify it 7 | // in accordance with the terms of the accompanying license agreement. 8 | // 9 | // ================================================================================================= 10 | 11 | package starling.utils 12 | { 13 | /** Replaces a string's "master string" — the string it was built from — 14 | * with a single character to save memory. Find more information about this AS3 oddity 15 | * here. 16 | * 17 | * @param str String to clean 18 | * @return The input string, but with a master string only one character larger than it. 19 | * @author Jackson Dunstan, JacksonDunstan.com 20 | */ 21 | public function cleanMasterString(str:String):String 22 | { 23 | return ("_" + str).substr(1); 24 | } 25 | } -------------------------------------------------------------------------------- /src/com/pblabs/nape/NapeUtils.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.nape 2 | { 3 | import com.pblabs.physics.IPhysics2DSpatial; 4 | 5 | import flash.geom.Point; 6 | 7 | public final class NapeUtils 8 | { 9 | public function NapeUtils() 10 | { 11 | } 12 | 13 | public static function inCollision(caller : IPhysics2DSpatial, event : CollisionEvent):Boolean 14 | { 15 | return (caller == event.collidee) || (caller == event.collider) ? true : false; 16 | } 17 | 18 | public static function getCollider(caller : IPhysics2DSpatial, event : CollisionEvent, self : Boolean = false):IPhysics2DSpatial 19 | { 20 | return (self && caller == event.collidee) || (!self && caller == event.collider) ? event.collidee : event.collider; 21 | } 22 | 23 | public static function normalizePointVector(point : Point):Point 24 | { 25 | var magnitude : Number = getMagnitude(point); 26 | point.x /= magnitude; 27 | point.y /= magnitude; 28 | return point; 29 | } 30 | 31 | public static function getMagnitude(point : Point):Number 32 | { 33 | return Math.sqrt((point.x * point.x) + (point.y * point.y)); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/starling/display/graphics/TriangleStrip.as: -------------------------------------------------------------------------------- 1 | package starling.display.graphics 2 | { 3 | import starling.core.RenderSupport; 4 | import starling.core.Starling; 5 | import starling.textures.Texture; 6 | 7 | public class TriangleStrip extends Graphic 8 | { 9 | private var numVertices :int; 10 | 11 | public function TriangleStrip() 12 | { 13 | 14 | } 15 | 16 | public function addVertex( x:Number, y:Number, 17 | u:Number = 0, v:Number = 0, 18 | r:Number = 1, g:Number = 1, b:Number = 1, a:Number = 1 ):void 19 | { 20 | vertices.push( x, y, 0, r, g, b, a, u, v ); 21 | numVertices++; 22 | 23 | minBounds.x = x < minBounds.x ? x : minBounds.x; 24 | minBounds.y = y < minBounds.y ? y : minBounds.y; 25 | maxBounds.x = x > maxBounds.x ? x : maxBounds.x; 26 | maxBounds.y = y > maxBounds.y ? y : maxBounds.y; 27 | 28 | if ( numVertices > 2 ) 29 | { 30 | indices.push( numVertices-3, numVertices-2, numVertices-1 ); 31 | } 32 | 33 | setGeometryInvalid(); 34 | } 35 | 36 | override protected function buildGeometry():void 37 | { 38 | 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /test/src/com/pblabs/engine/tests/TestComponentA.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.tests 10 | { 11 | import com.pblabs.engine.entity.EntityComponent; 12 | import com.pblabs.engine.entity.IEntity; 13 | import com.pblabs.engine.entity.IEntityComponent; 14 | 15 | /** 16 | * @private 17 | */ 18 | public class TestComponentA extends EntityComponent 19 | { 20 | public var testValue:int = 0; 21 | public var namedReference:IEntity = null; 22 | public var instantiatedReference:IEntity = null; 23 | public var componentReference:TestComponentB = null; 24 | public var namedComponentReference:IEntityComponent = null; 25 | } 26 | } -------------------------------------------------------------------------------- /src/com/pblabs/nape/BodyTypeEnum.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.nape 2 | { 3 | import com.pblabs.engine.serialization.Enumerable; 4 | import com.pblabs.engine.serialization.ISerializable; 5 | 6 | import flash.utils.Dictionary; 7 | 8 | import nape.phys.BodyType; 9 | 10 | //Serializable BodyType wrapper 11 | public class BodyTypeEnum extends Enumerable 12 | { 13 | public static const DYNAMIC:BodyTypeEnum = new BodyTypeEnum(); 14 | public static const KINEMATIC:BodyTypeEnum = new BodyTypeEnum(); 15 | public static const STATIC:BodyTypeEnum = new BodyTypeEnum(); 16 | 17 | public function BodyTypeEnum() 18 | { 19 | super(); 20 | } 21 | 22 | private static var _typeMap:Dictionary = null; 23 | 24 | override public function get typeMap():Dictionary 25 | { 26 | if (!_typeMap) 27 | { 28 | _typeMap = new Dictionary(); 29 | _typeMap["DYNAMIC"] = DYNAMIC; 30 | _typeMap["KINEMATIC"] = KINEMATIC; 31 | _typeMap["STATIC"] = STATIC; 32 | } 33 | 34 | return _typeMap; 35 | } 36 | 37 | override public function get defaultType():Enumerable 38 | { 39 | return DYNAMIC; 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/core/IPrioritizable.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.core 10 | { 11 | /** 12 | * Minimal interface required by SimplePriorityQueue. 13 | * 14 | *

Items are prioritized so that the highest priority is returned first.

15 | * 16 | * @see SimplePriorityQueue 17 | */ 18 | public interface IPrioritizable 19 | { 20 | function get priority():int; 21 | 22 | /** 23 | * Change the priority. You only need to implement this if you want 24 | * SimplePriorityHeap.reprioritize to work. Otherwise it can 25 | * simply throw an Error. 26 | */ 27 | function set priority(value:int):void; 28 | } 29 | } -------------------------------------------------------------------------------- /lessons/Lesson4Base/src/HeroControllerComponent.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | 10 | package 11 | { 12 | import com.pblabs.engine.components.TickedComponent; 13 | import com.pblabs.engine.entity.PropertyReference; 14 | 15 | import flash.geom.Point; 16 | 17 | // Make a ticked component so that it can update itself every frame with onTick() 18 | public class HeroControllerComponent extends TickedComponent 19 | { 20 | // Keep a property reference to our entity's position. 21 | public var positionReference:PropertyReference; 22 | 23 | // onTick() is called every frame 24 | public override function onTick(tickRate:Number):void 25 | { 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /src/starling/utils/execute.as: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // 3 | // Starling Framework 4 | // Copyright 2014 Gamua OG. All Rights Reserved. 5 | // 6 | // This program is free software. You can redistribute and/or modify it 7 | // in accordance with the terms of the accompanying license agreement. 8 | // 9 | // ================================================================================================= 10 | 11 | package starling.utils 12 | { 13 | /** Executes a function with the specified arguments. If the argument count does not match 14 | * the function, the argument list is cropped / filled up with null values. */ 15 | public function execute(func:Function, ...args):void 16 | { 17 | if (func != null) 18 | { 19 | var i:int; 20 | var maxNumArgs:int = func.length; 21 | 22 | for (i=args.length; i([ uOffset, vOffset, 0, 0 ]) ); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/com/pblabs/tweaker/TweakerMapEntry.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.tweaker 10 | { 11 | import com.pblabs.engine.entity.PropertyReference; 12 | 13 | /** 14 | * Map a cell (specified in standard spreadsheet notation, ie E4) to 15 | * a PropertyReference. 16 | *

17 | * Most of the time you will want to set a value in a template, which can 18 | * be done using a PropertyReference in the form of 19 | * !TemplateName.ComponentName.PropertyName.

20 | */ 21 | public class TweakerMapEntry 22 | { 23 | public var cell:String; 24 | public var property:PropertyReference; 25 | 26 | public function toString():String 27 | { 28 | return "[TweakerMapEntry " + cell + " = " + property.property + "]"; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /src/starling/display/ButtonState.as: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // 3 | // Starling Framework 4 | // Copyright 2014 Gamua GmbH. All Rights Reserved. 5 | // 6 | // This program is free software. You can redistribute and/or modify it 7 | // in accordance with the terms of the accompanying license agreement. 8 | // 9 | // ================================================================================================= 10 | 11 | package starling.display 12 | { 13 | import starling.errors.AbstractClassError; 14 | 15 | /** A class that provides constant values for the states of the Button class. */ 16 | public class ButtonState 17 | { 18 | /** @private */ 19 | public function ButtonState() { throw new AbstractClassError(); } 20 | 21 | /** The button's default state. */ 22 | public static const UP:String = "up"; 23 | 24 | /** The button is pressed. */ 25 | public static const DOWN:String = "down"; 26 | 27 | /** The mouse hovers over the button. */ 28 | public static const OVER:String = "over"; 29 | 30 | /** The button was disabled altogether. */ 31 | public static const DISABLED:String = "disabled"; 32 | } 33 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/debug/ExceptionAppender.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.debug 10 | { 11 | public class ExceptionAppender implements ILogAppender 12 | { 13 | public function addLogMessage(level:String, loggerName:String, message:String):void 14 | { 15 | if (level != "FATAL") 16 | return; 17 | 18 | throw new Error(message); 19 | } 20 | 21 | /* public function addLogMessage(level:String, loggerName:String, message:String, arguments:Array):void 22 | { 23 | if (level != "FATAL") 24 | return; 25 | 26 | var numberString:String = ""; 27 | if (errorNumber >= 0) 28 | numberString = "Error #" + errorNumber; 29 | 30 | throw new Error(numberString + replace(message, arguments)); 31 | }*/ 32 | } 33 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/debug/JavascriptLogListener.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.debug 10 | { 11 | import flash.external.ExternalInterface; 12 | 13 | /** 14 | * Simple listener to dump log events out to javascript. You might want 15 | * to customize the name of the function it calls. 16 | * 17 | * Note that this can be an expensive listener to have active. We have 18 | * observed that it can take as much as 6ms to log one output line. So, 19 | * you may only want to use this listener when necessary. 20 | */ 21 | public class JavascriptLogListener implements ILogAppender 22 | { 23 | public function addLogMessage(level:String, loggerName:String, message:String):void 24 | { 25 | ExternalInterface.call("PBL.log.flash", level, loggerName, message); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | The MIT License for PushButton Engine 2 | 3 | Copyright (c) 2009 PushButton Labs, LLC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | 23 | PushButton Engine: http://pushbuttonengine.com 24 | PushButton Labs: http://pushbuttonlabs.com 25 | -------------------------------------------------------------------------------- /src/com/pblabs/nape/MaterialVO.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.nape 2 | { 3 | import com.pblabs.engine.serialization.ISerializable; 4 | 5 | import nape.phys.Material; 6 | 7 | public class MaterialVO implements ISerializable 8 | { 9 | public var material:Material; 10 | public var name:String; 11 | 12 | public function MaterialVO(name:String = null, material:Material = null) 13 | { 14 | this.name = name; 15 | this.material = material; 16 | } 17 | 18 | public function serialize(xml:XML):void 19 | { 20 | if(!material) 21 | return; 22 | xml.elasticity = material.elasticity; 23 | xml.staticFriction = material.staticFriction; 24 | xml.dynamicFriction = material.dynamicFriction; 25 | xml.rollingFriction = material.rollingFriction; 26 | xml.density = material.density; 27 | xml.@name = name; 28 | } 29 | 30 | public function deserialize(xml:XML):* 31 | { 32 | if(!material) 33 | material = new Material(); 34 | material.elasticity = Number(xml.elasticity); 35 | material.staticFriction = Number(xml.staticFriction); 36 | material.dynamicFriction = Number(xml.dynamicFriction); 37 | material.rollingFriction = Number(xml.rollingFriction); 38 | material.density = Number(xml.density); 39 | name = String(xml.@name); 40 | return this; 41 | } 42 | } 43 | } -------------------------------------------------------------------------------- /src/com/pblabs/starling2D/ISceneG2D.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.starling2D 10 | { 11 | import com.pblabs.rendering2D.IScene2D; 12 | 13 | import flash.geom.Point; 14 | 15 | /** 16 | * Base interface for a GPU2d scene. A scene contains multiple layers, and has 17 | * a camera transform which is applied to pan/rotate/zoom the view. The scene 18 | * is responsible for tracking and rendering all the drawable objects in the 19 | * world. 20 | * 21 | * @see DisplayObjectRenderer 22 | * @see DisplayObjectScene 23 | */ 24 | public interface ISceneG2D extends IScene2D 25 | { 26 | /** 27 | * Takes the global flash stage position and transforms it into coordinates relative to the 2D GPU scene taking the viewport 28 | * into account. 29 | */ 30 | function transformScreenToG2DWorld(globalPos:Point):Point; 31 | } 32 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/resource/MP3Resource.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.resource 10 | { 11 | import flash.media.Sound; 12 | 13 | [EditorData(extensions="mp3")] 14 | 15 | /** 16 | * Load Sounds from MP3s using Flash Player's built in MP3 loading code. 17 | */ 18 | public class MP3Resource extends SoundResource 19 | { 20 | /** 21 | * The loaded sound. 22 | */ 23 | protected var _soundObject:Sound = null; 24 | 25 | override public function get soundObject() : Sound 26 | { 27 | return _soundObject; 28 | } 29 | 30 | /** 31 | * @inheritDoc 32 | */ 33 | override protected function onContentReady(content:*):Boolean 34 | { 35 | _soundObject = content; 36 | return soundObject != null; 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /src/org/as3wavsound/sazameki/format/riff/Chunk.as: -------------------------------------------------------------------------------- 1 | package org.as3wavsound.sazameki.format.riff { 2 | import flash.utils.ByteArray; 3 | import flash.utils.Endian; 4 | 5 | /** 6 | * RIFF Chunk class 7 | * @author Takaaki Yamazaki(zk design), modified by b.bottema [Codemonkey] 8 | */ 9 | public class Chunk { 10 | protected const ENDIAN:String = Endian.LITTLE_ENDIAN; 11 | protected var _id:String; 12 | 13 | public function Chunk(id:String) { 14 | this.id = id; 15 | } 16 | 17 | public function set id(value:String):void { 18 | if (value.length > 4) { 19 | value = value.substr(0, 4); 20 | } else if (value.length < 4) { 21 | while (value.length < 4) { 22 | value += " "; 23 | } 24 | } 25 | _id = value; 26 | } 27 | 28 | public function get id():String { 29 | return _id; 30 | } 31 | 32 | public function toByteArray():ByteArray { 33 | var result:ByteArray = new ByteArray(); 34 | result.endian = ENDIAN; 35 | result.writeUTFBytes(_id); 36 | var data:ByteArray = encodeData(); 37 | result.writeUnsignedInt(data.length); 38 | result.writeBytes(data); 39 | return result; 40 | } 41 | 42 | protected function encodeData():ByteArray { 43 | throw new Error("'encodeData()' method must be overriden"); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /src/com/pblabs/rendering2D/ICachingLayer.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.rendering2D 10 | { 11 | import flash.geom.Rectangle; 12 | 13 | /** 14 | * Interface for a scene layer which does caching and needs to know when a 15 | * renderer has changed its state. 16 | */ 17 | public interface ICachingLayer 18 | { 19 | /** 20 | * A renderer has changed its state/appearance/position and needs to be 21 | * redrawn. 22 | * @param dirtyRenderer The renderer which has changed. 23 | */ 24 | function invalidate(dirtyRenderer:DisplayObjectRenderer):void; 25 | 26 | /** 27 | * A region of the scene has become dirty and needs to be redrawn. 28 | * @param dirty The region in screen coordinates that is dirtied. 29 | */ 30 | function invalidateRectangle(dirty:Rectangle):void; 31 | } 32 | } -------------------------------------------------------------------------------- /examples/PBEngineDemo/assets/levelDescriptions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/starling/display/shaders/vertex/RippleVertexShader.as: -------------------------------------------------------------------------------- 1 | package starling.display.shaders.vertex 2 | { 3 | import flash.display3D.Context3D; 4 | import flash.display3D.Context3DProgramType; 5 | import flash.utils.getTimer; 6 | import starling.display.shaders.AbstractShader; 7 | 8 | public class RippleVertexShader extends AbstractShader 9 | { 10 | public function RippleVertexShader() 11 | { 12 | var agal:String = 13 | "mul vt0, va0.x, vc4.y \n" + // Calculate vert.x * frequency. Store in 0 14 | "add vt1, vc4.x, vt0 \n" + // Calculate phase + scaledX. Store in 1 15 | "sin vt2, vt1 \n" + 16 | "mul vt3, vt2, vc4.z \n" + 17 | "add vt4, va0.y, vt3 \n" + 18 | "mov vt5, va0 \n" + 19 | "mov vt5.y, vt4 \n" + 20 | 21 | "m44 op, vt5, vc0 \n" + // Apply view matrix 22 | 23 | "mov v0, va1 \n" + // Copy color to v0 24 | "mov v1, va2 \n" // Copy UV to v1 25 | 26 | compileAGAL( Context3DProgramType.VERTEX, agal ); 27 | } 28 | 29 | override public function setConstants( context:Context3D, firstRegister:int ):void 30 | { 31 | var phase:Number = getTimer()/200; 32 | var frequency:Number = 0.02; 33 | var amplitude:Number = 5; 34 | context.setProgramConstantsFromVector( Context3DProgramType.VERTEX, firstRegister, Vector.([ phase, frequency, amplitude, 1 ]) ); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/com/pblabs/rendering2D/modifier/BlurModifier.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.rendering2D.modifier 10 | { 11 | import flash.display.BitmapData; 12 | import flash.filters.BlurFilter; 13 | import flash.geom.Point; 14 | 15 | public class BlurModifier extends Modifier 16 | { 17 | public var blurX:Number = 6; 18 | public var blurY:Number = 6; 19 | public var quality:int = 1; 20 | 21 | public function BlurModifier(blurX:Number=6, blurY:Number=6, quality:int=1) 22 | { 23 | this.blurX = blurX; 24 | this.blurY = blurY; 25 | this.quality = quality; 26 | super(); 27 | } 28 | 29 | public override function modify(data:BitmapData, index:int=0, count:int=1):BitmapData 30 | { 31 | data.lock(); 32 | data.applyFilter(data,data.rect, new Point(0,0), new BlurFilter(blurX,blurY,quality)); 33 | data.unlock(); 34 | return data; 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /development/FB4/PBEngine/.actionScriptProperties: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/com/pblabs/animation/PointAnimator.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.animation 10 | { 11 | import flash.geom.Point; 12 | 13 | /** 14 | * Animator subclass for animating the flash.geom.Point class. 15 | */ 16 | public class PointAnimator extends Animator 17 | { 18 | 19 | override protected function doEase(elapsed:Number, start:*, end:*, duration:Number):* 20 | { 21 | var result:Point = new Point(); 22 | result.x = ease(elapsed, start.x, end.x - start.x, duration); 23 | result.y = ease(elapsed, start.y, end.y - start.y, duration); 24 | return result; 25 | } 26 | 27 | override protected function interpolate(start:*, end:*, time:Number):* 28 | { 29 | var result:Point = new Point(); 30 | result.x = super.interpolate(start.x, end.x, time); 31 | result.y = super.interpolate(start.y, end.y, time); 32 | return result; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/com/pblabs/nape/CircleCollisionShape.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.nape 2 | { 3 | import flash.geom.Point; 4 | 5 | import nape.geom.Vec2; 6 | import nape.shape.Circle; 7 | import nape.shape.Shape; 8 | 9 | public class CircleCollisionShape extends CollisionShape 10 | { 11 | [EditorData(defaultValue="1")] 12 | public function get radius():Number 13 | { 14 | return _radius; 15 | } 16 | 17 | public function set radius(value:Number):void 18 | { 19 | _radius = value; 20 | 21 | if (_parent) 22 | _parent.buildCollisionShapes(); 23 | } 24 | 25 | public function get position():Point 26 | { 27 | return _position; 28 | } 29 | 30 | public function set position(value:Point):void 31 | { 32 | _position = value; 33 | 34 | if (_parent) 35 | _parent.buildCollisionShapes(); 36 | } 37 | 38 | public function CircleCollisionShape() 39 | { 40 | super(); 41 | } 42 | 43 | override protected function doCreateShape():Shape 44 | { 45 | var invScale:Number = NapeManagerComponent(_parent.spatialManager).inverseScale; 46 | 47 | var nPos:Vec2 = new Vec2(_position.x * invScale, _position.y * invScale); 48 | 49 | return new Circle( ((_radius * Math.sqrt(shapeScale.x * shapeScale.y)) * invScale) , nPos); 50 | } 51 | 52 | private var _radius:Number = 20.0; 53 | private var _position:Point = new Point(0, 0); 54 | } 55 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/version/FlexSDKVersion.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.version 10 | { 11 | /** 12 | * Utility class to parse Flex SDK version strings. 13 | */ 14 | public class FlexSDKVersion 15 | { 16 | public var major:uint; 17 | public var minor:uint; 18 | public var update:uint; 19 | public var build:uint; 20 | 21 | protected var _versionString:String; 22 | 23 | public function FlexSDKVersion(versionString:String) 24 | { 25 | parseVersionString(versionString); 26 | _versionString = versionString; 27 | } 28 | 29 | protected function parseVersionString(value:String):void 30 | { 31 | var pieces:Array = value.split("."); 32 | 33 | major = parseInt(pieces[0]); 34 | minor = parseInt(pieces[1]); 35 | update = parseInt(pieces[2]); 36 | build = parseInt(pieces[3]); 37 | } 38 | 39 | public function toString():String 40 | { 41 | return _versionString; 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /test/src/com/pblabs/engine/tests/ResourceTests.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.tests 10 | { 11 | import com.pblabs.engine.debug.Logger; 12 | 13 | import flexunit.framework.Assert; 14 | 15 | /** 16 | * @private 17 | */ 18 | public class ResourceTests 19 | { 20 | 21 | [Test] 22 | [Ignore("Not implemented.")] 23 | public function testResourceLoad():void 24 | { 25 | Logger.printHeader(null, "Running Resource Load Test"); 26 | Assert.fail("not implemented"); 27 | Logger.printFooter(null, ""); 28 | } 29 | 30 | [Test] 31 | [Ignore("Not implemented.")] 32 | public function testReferenceCounting():void 33 | { 34 | Logger.printHeader(null, "Running Resource Reference Count Test"); 35 | Assert.fail("not implemented"); 36 | Logger.printFooter(null, ""); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /src/com/pblabs/engine/debug/LogEvent.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.debug 10 | { 11 | import flash.events.Event; 12 | 13 | /** 14 | * A LogEvent is an event used by the Logger to dispatch log related information. 15 | */ 16 | public class LogEvent extends Event 17 | { 18 | /** 19 | * The entry added event is dispatched by the Logger whenever a new 20 | * message is printed to the log. 21 | * 22 | * @eventType ENTRY_ADDED_EVENT 23 | */ 24 | public static const ENTRY_ADDED_EVENT:String = "ENTRY_ADDED_EVENT"; 25 | 26 | /** 27 | * The LogEntry associated with this event. 28 | */ 29 | public var entry:LogEntry = null; 30 | 31 | public function LogEvent(type:String, entry:LogEntry, bubbles:Boolean=false, cancelable:Boolean=false) 32 | { 33 | entry = entry; 34 | super(type, bubbles, cancelable); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /src/starling/filters/FragmentFilterMode.as: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // 3 | // Starling Framework 4 | // Copyright 2012 Gamua OG. All Rights Reserved. 5 | // 6 | // This program is free software. You can redistribute and/or modify it 7 | // in accordance with the terms of the accompanying license agreement. 8 | // 9 | // ================================================================================================= 10 | 11 | package starling.filters 12 | { 13 | import starling.errors.AbstractClassError; 14 | 15 | /** A class that provides constant values for filter modes. The values are used in the 16 | * FragmentFilter.mode property and define how a filter result is combined with the 17 | * original object. */ 18 | public class FragmentFilterMode 19 | { 20 | /** @private */ 21 | public function FragmentFilterMode() { throw new AbstractClassError(); } 22 | 23 | /** The filter is displayed below the filtered object. */ 24 | public static const BELOW:String = "below"; 25 | 26 | /** The filter is replacing the filtered object. */ 27 | public static const REPLACE:String = "replace"; 28 | 29 | /** The filter is displayed above the filtered object. */ 30 | public static const ABOVE:String = "above"; 31 | } 32 | } -------------------------------------------------------------------------------- /src/starling/utils/VAlign.as: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // 3 | // Starling Framework 4 | // Copyright 2011 Gamua OG. All Rights Reserved. 5 | // 6 | // This program is free software. You can redistribute and/or modify it 7 | // in accordance with the terms of the accompanying license agreement. 8 | // 9 | // ================================================================================================= 10 | 11 | package starling.utils 12 | { 13 | import starling.errors.AbstractClassError; 14 | 15 | /** A class that provides constant values for vertical alignment of objects. */ 16 | public final class VAlign 17 | { 18 | /** @private */ 19 | public function VAlign() { throw new AbstractClassError(); } 20 | 21 | /** Top alignment. */ 22 | public static const TOP:String = "top"; 23 | 24 | /** Centered alignment. */ 25 | public static const CENTER:String = "center"; 26 | 27 | /** Bottom alignment. */ 28 | public static const BOTTOM:String = "bottom"; 29 | 30 | /** Indicates whether the given alignment string is valid. */ 31 | public static function isValid(vAlign:String):Boolean 32 | { 33 | return vAlign == TOP || vAlign == CENTER || vAlign == BOTTOM; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /.actionScriptProperties: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/starling/utils/HAlign.as: -------------------------------------------------------------------------------- 1 | // ================================================================================================= 2 | // 3 | // Starling Framework 4 | // Copyright 2011 Gamua OG. All Rights Reserved. 5 | // 6 | // This program is free software. You can redistribute and/or modify it 7 | // in accordance with the terms of the accompanying license agreement. 8 | // 9 | // ================================================================================================= 10 | 11 | package starling.utils 12 | { 13 | import starling.errors.AbstractClassError; 14 | 15 | /** A class that provides constant values for horizontal alignment of objects. */ 16 | public final class HAlign 17 | { 18 | /** @private */ 19 | public function HAlign() { throw new AbstractClassError(); } 20 | 21 | /** Left alignment. */ 22 | public static const LEFT:String = "left"; 23 | 24 | /** Centered alignement. */ 25 | public static const CENTER:String = "center"; 26 | 27 | /** Right alignment. */ 28 | public static const RIGHT:String = "right"; 29 | 30 | /** Indicates whether the given alignment string is valid. */ 31 | public static function isValid(hAlign:String):Boolean 32 | { 33 | return hAlign == LEFT || hAlign == CENTER || hAlign == RIGHT; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /docs/js/sh/scripts/shBrushPlain.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SyntaxHighlighter 3 | * http://alexgorbatchev.com/ 4 | * 5 | * SyntaxHighlighter is donationware. If you are using it, please donate. 6 | * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate 7 | * 8 | * @version 9 | * 2.0.296 (March 01 2009) 10 | * 11 | * @copyright 12 | * Copyright (C) 2004-2009 Alex Gorbatchev. 13 | * 14 | * @license 15 | * This file is part of SyntaxHighlighter. 16 | * 17 | * SyntaxHighlighter is free software: you can redistribute it and/or modify 18 | * it under the terms of the GNU General Public License as published by 19 | * the Free Software Foundation, either version 3 of the License, or 20 | * (at your option) any later version. 21 | * 22 | * SyntaxHighlighter is distributed in the hope that it will be useful, 23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 | * GNU General Public License for more details. 26 | * 27 | * You should have received a copy of the GNU General Public License 28 | * along with SyntaxHighlighter. If not, see . 29 | */ 30 | SyntaxHighlighter.brushes.Plain = function() 31 | { 32 | }; 33 | 34 | SyntaxHighlighter.brushes.Plain.prototype = new SyntaxHighlighter.Highlighter(); 35 | SyntaxHighlighter.brushes.Plain.aliases = ['text', 'plain']; 36 | -------------------------------------------------------------------------------- /src/starling/utils/ScaleMode.as: -------------------------------------------------------------------------------- 1 | package starling.utils 2 | { 3 | import starling.errors.AbstractClassError; 4 | 5 | /** A class that provides constant values for the 'RectangleUtil.fit' method. */ 6 | public class ScaleMode 7 | { 8 | /** @private */ 9 | public function ScaleMode() { throw new AbstractClassError(); } 10 | 11 | /** Specifies that the rectangle is not scaled, but simply centered within the 12 | * specified area. */ 13 | public static const NONE:String = "none"; 14 | 15 | /** Specifies that the rectangle fills the specified area without distortion 16 | * but possibly with some cropping, while maintaining the original aspect ratio. */ 17 | public static const NO_BORDER:String = "noBorder"; 18 | 19 | /** Specifies that the entire rectangle will be scaled to fit into the specified 20 | * area, while maintaining the original aspect ratio. This might leave empty bars at 21 | * either the top and bottom, or left and right. */ 22 | public static const SHOW_ALL:String = "showAll"; 23 | 24 | /** Indicates whether the given scale mode string is valid. */ 25 | public static function isValid(scaleMode:String):Boolean 26 | { 27 | return scaleMode == NONE || scaleMode == NO_BORDER || scaleMode == SHOW_ALL; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /src/com/pblabs/physics/IPhysics2DSpatial.as: -------------------------------------------------------------------------------- 1 | package com.pblabs.physics 2 | { 3 | import com.pblabs.engine.core.ObjectType; 4 | import com.pblabs.rendering2D.IMobileSpatialObject2D; 5 | 6 | import flash.geom.Point; 7 | 8 | public interface IPhysics2DSpatial extends IMobileSpatialObject2D 9 | { 10 | function buildCollisionShapes():void; 11 | 12 | function get collisionType():ObjectType; 13 | function set collisionType(type : ObjectType):void; 14 | function get collidesWithTypes():ObjectType; 15 | function set collidesWithTypes(type : ObjectType):void; 16 | function get collisionShapes():Array; 17 | function set collisionShapes(shapes : Array):void; 18 | function get angularVelocity():Number; 19 | function set angularVelocity(val : Number):void; 20 | 21 | function get canMove():Boolean; 22 | function set canMove(val : Boolean):void; 23 | function get canRotate():Boolean; 24 | function set canRotate(val : Boolean):void; 25 | function get canSleep():Boolean; 26 | function set canSleep(val : Boolean):void; 27 | function get collidesContinuously():Boolean; 28 | function set collidesContinuously(val : Boolean):void; 29 | function get bodyType():*; 30 | function set bodyType(val : *):void; 31 | function get gravity():Point; 32 | function set gravity(val : Point):void; 33 | 34 | function get collisionShapeScale():Point; 35 | function set collisionShapeScale(val : Point):void; 36 | } 37 | } -------------------------------------------------------------------------------- /lessons/Lesson1FlashDevelop/bin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Lesson1FlashDevelop 5 | 6 | 7 | 8 | 9 | 10 | 11 | 26 | 30 | 31 | 32 |
33 |

Lesson1FlashDevelop

34 |

Alternative content

35 |

Get Adobe Flash player

38 |
39 | 40 | -------------------------------------------------------------------------------- /src/com/pblabs/components/stateMachine/BasicThinkingState.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.components.stateMachine 10 | { 11 | import com.pblabs.engine.PBE; 12 | import com.pblabs.engine.entity.PropertyReference; 13 | 14 | public class BasicThinkingState extends BasicState implements IThinkingState 15 | { 16 | public var durationProperty:PropertyReference; 17 | protected var _duration:int = 0; 18 | 19 | public function set duration(value:int):void 20 | { 21 | _duration = value; 22 | } 23 | 24 | public function getDuration(fsm:IMachine):int 25 | { 26 | if(durationProperty) 27 | return fsm.propertyBag.getProperty(durationProperty); 28 | return _duration; 29 | } 30 | 31 | public function getTimeForNextTick(fsm:IMachine):int 32 | { 33 | return PBE.processManager.virtualTime + getDuration(fsm); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /src/com/pblabs/components/stateMachine/IState.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.components.stateMachine 10 | { 11 | /** 12 | * A state in a state machine. It is given the opportunity each 13 | * update of the machine to transition to a new state. 14 | * 15 | * Callbacks happen AFTER the previous/current state has been updated. 16 | */ 17 | public interface IState 18 | { 19 | /** 20 | * Called when the machine enters this state. 21 | */ 22 | function enter(fsm:IMachine):void; 23 | 24 | /** 25 | * Called every time the machine ticks and this is the current state. 26 | * 27 | * Typically this function will call setCurrentState on the FSM to update 28 | * its state. 29 | */ 30 | function tick(fsm:IMachine):void; 31 | 32 | /** 33 | * Called when we transition out of this state. 34 | */ 35 | function exit(fsm:IMachine):void; 36 | } 37 | } -------------------------------------------------------------------------------- /src/com/pblabs/rendering2D/modifier/BorderModifier.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.rendering2D.modifier 10 | { 11 | import flash.display.BitmapData; 12 | 13 | public class BorderModifier extends Modifier 14 | { 15 | public var color:uint = 0xff000000; 16 | 17 | public function BorderModifier(color:uint=0xff000000) 18 | { 19 | this.color = color; 20 | super(); 21 | } 22 | 23 | public override function modify(data:BitmapData, index:int=0, count:int=1):BitmapData 24 | { 25 | data.lock(); 26 | 27 | for (var y:int = 0; y 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | Chapter Name 18 | 19 | 20 | 21 |

Chapter Name

22 | 23 |

Introductory text.

24 | 25 |
26 | 27 |
28 | 29 |

Section Name

30 | 31 |

Section Content

32 | 33 |
34 |       <Tag/>
35 |    
36 | 37 |
38 | 39 | -------------------------------------------------------------------------------- /src/com/pblabs/engine/core/TemplateEvent.as: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * PushButton Engine 3 | * Copyright (C) 2009 PushButton Labs, LLC 4 | * For more information see http://www.pushbuttonengine.com 5 | * 6 | * This file is licensed under the terms of the MIT license, which is included 7 | * in the License.html file at the root directory of this SDK. 8 | ******************************************************************************/ 9 | package com.pblabs.engine.core 10 | { 11 | import flash.events.Event; 12 | 13 | /** 14 | * The TemplateEvent is used by the TemplateManager to dispatch information about the loaded 15 | * status of groups. 16 | * 17 | * @see com.pblabs.engine.core.TemplateManager 18 | */ 19 | public class TemplateEvent extends Event 20 | { 21 | 22 | /** 23 | * This event is dispatched by the TemplateManager when a group's entities have been loaded. 24 | * 25 | * @eventType GROUP_LOADED 26 | */ 27 | public static const GROUP_LOADED:String = "groupLoaded"; 28 | 29 | /** 30 | * The object name associated with this event. 31 | */ 32 | public var name:String; 33 | 34 | public function TemplateEvent(type:String, name:String, bubbles:Boolean=false, cancelable:Boolean=false) 35 | { 36 | this.name = name; 37 | super(type, bubbles, cancelable); 38 | } 39 | } 40 | } 41 | 42 | --------------------------------------------------------------------------------