Adding Type support for collision checks.

This commit is contained in:
Richard Davey
2013-09-12 21:54:41 +01:00
parent 79dc3566f4
commit 9f687b4f8a
13 changed files with 683 additions and 207 deletions
+626 -206
View File
@@ -3,6 +3,122 @@
{
"selected_items":
[
[
"emit",
"emitX"
],
[
"obj",
"objectOrGroup"
],
[
"callb",
"callback (argument)"
],
[
"call",
"callback"
],
[
"phy",
"physicsElapsed"
],
[
"delt",
"deltaX"
],
[
"sep",
"separatedX"
],
[
"separat",
"separateY"
],
[
"collde",
"collideDown"
],
[
"all",
"allowCollision"
],
[
"separated",
"separatedY"
],
[
"instance",
"instanceof"
],
[
"font-",
"font-family"
],
[
"Tilem",
"TilemapLayer"
],
[
"parse",
"parseCSV"
],
[
"map",
"mapData"
],
[
"TI",
"FORMAT_TILED_JSON"
],
[
"mapd",
"mapDataURL"
],
[
"tile",
"tilesetURL"
],
[
"mapD",
"mapDataURL"
],
[
"fun",
"function"
],
[
"_star",
"_startY (variable)"
],
[
"_",
"_ty (variable)"
],
[
"_st",
"_startY (variable)"
],
[
"he",
"heightInPixels"
],
[
"wid",
"widthInPixels"
],
[
"mar",
"marioMap"
],
[
"mario",
"marioTiles"
],
[
"colli",
"collideNone (variable)"
],
[
"pl",
"plugin"
@@ -111,10 +227,6 @@
"crea",
"createDefaultTexture"
],
[
"emit",
"emitX (variable)"
],
[
"int",
"integerInRange"
@@ -147,10 +259,6 @@
"update",
"updateBounds"
],
[
"call",
"callbackContext (argument)"
],
[
"str_re",
"str_replace"
@@ -171,10 +279,6 @@
"alph",
"alphaThreshold"
],
[
"_",
"_iPrev (variable)"
],
[
"nl",
"null"
@@ -259,10 +363,6 @@
"rad",
"radToDeg"
],
[
"callb",
"callbackContext (variable)"
],
[
"callbac",
"callbackContext"
@@ -414,111 +514,35 @@
[
"upda",
"updateOnVisible"
],
[
"_a",
"_a12"
],
[
"_a0",
"_a02"
],
[
"ds",
"displayObject"
],
[
"displ",
"displayObject"
],
[
"dis",
"displayObject"
],
[
"an",
"anchor"
],
[
"line",
"lineHeight"
],
[
"_ontouche",
"_onTouchEnter"
],
[
"_ontou",
"_onTouchEnd"
],
[
"_ont",
"_onTouchMove"
],
[
"_onk",
"_onKeyUp"
],
[
"world",
"worldView"
],
[
"re",
"releaseMummy"
],
[
"child",
"children"
],
[
"fra",
"frameHeight"
],
[
"g",
"game (variable)"
],
[
"Te",
"TextureCache"
],
[
"Base",
"BaseTextureCache"
],
[
"inn",
"innerHeight (variable)"
],
[
"get",
"getOffset"
],
[
"at",
"antialias"
],
[
"we",
"webGL"
],
[
"can",
"canvas"
],
[
"REN",
"RENDERER_CANVAS"
],
[
"AU",
"RENDERER_AUTO"
]
]
},
"buffers":
[
{
"file": "examples/a_template.php",
"settings":
{
"buffer_size": 640,
"line_ending": "Windows"
}
},
{
"file": "src/physics/arcade/ArcadePhysics.js",
"settings":
{
"buffer_size": 38650,
"line_ending": "Windows"
}
},
{
"file": "src/Phaser.js",
"settings":
{
"buffer_size": 488,
"line_ending": "Windows"
}
}
],
"build_system": "",
"command_palette":
@@ -548,44 +572,74 @@
},
"file_history":
[
"/D/wamp/www/phaser/src/particles/arcade/Emitter.js",
"/D/wamp/www/phaser/src/tilemap/Tilemap.js",
"/D/wamp/www/phaser/src/tilemap/TilemapLayer.js",
"/D/wamp/www/phaser/src/core/Group.js",
"/D/wamp/www/phaser/src/gameobjects/TileSprite.js",
"/D/wamp/www/phaser/src/gameobjects/Text.js",
"/D/wamp/www/phaser/src/gameobjects/RenderTexture.js",
"/D/wamp/www/phaser/src/gameobjects/Graphics.js",
"/D/wamp/www/phaser/src/gameobjects/Button.js",
"/D/wamp/www/phaser/src/gameobjects/Sprite.js",
"/D/wamp/www/phaser/src/physics/arcade/ArcadePhysics.js",
"/D/wamp/www/phaser/examples/statetest.php",
"/D/wamp/www/phaser/src/tilemap/Tile.js",
"/D/wamp/www/phaser/src/utils/Debug.js",
"/D/wamp/www/phaser/examples/mariocombo/particles.php",
"/D/wamp/www/phaser/src/physics/arcade/Body.js",
"/D/wamp/www/phaser/examples/mariocombo/index.php",
"/D/wamp/www/phaser/examples/a_template.php",
"/D/wamp/www/phaser/examples/particles.php",
"/D/wamp/www/phaser/src/time/Time.js",
"/D/wamp/www/phaser/src/math/Math.js",
"/D/wamp/www/phaser/src/core/Game.js",
"/D/wamp/www/phaser/src/core/World.js",
"/D/wamp/www/phaser/src/gameobjects/GameObjectFactory.js",
"/D/wamp/www/phaser/src/system/StageScaleMode.js",
"/D/wamp/www/phaser/examples/js.php",
"/D/wamp/www/phaser/TS Source/physics/aabb/ProjAABB22Deg.js",
"/D/wamp/www/phaser/TS Source/physics/TileMapCell.js",
"/D/wamp/www/phaser/TS Source/physics/PhysicsManager.js",
"/D/wamp/www/phaser/TS Source/physics/AABB.js",
"/D/wamp/www/phaser/examples/supermario.php",
"/D/wamp/www/phaser/src/tilemap/TilemapRenderer.js",
"/D/wamp/www/phaser/examples/tilemap.php",
"/D/wamp/www/phaser/src/pixi/display/DisplayObjectContainer.js",
"/D/wamp/www/phaser/src/loader/Loader.js",
"/D/wamp/www/phaser/src/loader/Cache.js",
"/D/wamp/www/phaser/TS Tests/tilemaps/tiled tilemap.ts",
"/D/wamp/www/phaser/src/core/Camera.js",
"/D/Tools/mapwin1423/MAPWIN.INI",
"/D/wamp/www/phaser/src/pixi/textures/BaseTexture.js",
"/D/wamp/www/phaser/src/pixi/textures/Texture.js",
"/D/wamp/www/phaser/TS Source/renderers/canvas/TilemapRenderer.ts",
"/D/wamp/www/phaser/TS Source/renderers/canvas/TilemapRenderer.js",
"/D/wamp/www/phaser/src/pixi/display/Sprite.js",
"/D/wamp/www/phaser/plugins/SamplePlugin.js",
"/D/wamp/www/phaser/src/core/Plugin.js",
"/D/wamp/www/phaser/examples/plugin1.php",
"/D/wamp/www/phaser/src/core/Game.js",
"/D/wamp/www/phaser/src/core/PluginManager.js",
"/D/wamp/www/phaser/examples/js.php",
"/D/wamp/www/phaser/src/animation/FrameData.js",
"/D/wamp/www/phaser/src/loader/Cache.js",
"/D/wamp/www/phaser/src/physics/arcade/Body.js",
"/D/wamp/www/phaser/src/gameobjects/Bullet.js",
"/D/wamp/www/phaser/examples/pixelpick3.php",
"/D/wamp/www/phaser/src/input/InputHandler.js",
"/D/wamp/www/phaser/src/input/Input.js",
"/D/wamp/www/phaser/src/gameobjects/Sprite.js",
"/D/wamp/www/phaser/src/utils/Debug.js",
"/D/wamp/www/phaser/src/core/Stage.js",
"/D/wamp/www/phaser/examples/sprite3.php",
"/D/wamp/www/phaser/examples/world.php",
"/D/wamp/www/phaser/src/core/Camera.js",
"/D/wamp/www/phaser/examples/camerafollow.php",
"/D/wamp/www/phaser/examples/tilesprite2.php",
"/D/wamp/www/phaser/src/math/Math.js",
"/D/wamp/www/phaser/src/core/Group.js",
"/D/wamp/www/phaser/src/core/Signal.js",
"/D/wamp/www/phaser/src/geom/Circle.js",
"/D/wamp/www/phaser/src/geom/Rectangle.js",
"/D/wamp/www/phaser/src/sound/Sound.js",
"/D/wamp/www/phaser/src/sound/SoundManager.js",
"/D/wamp/www/phaser/src/utils/Color.js",
"/D/wamp/www/phaser/src/core/World.js",
"/D/wamp/www/phaser/src/core/LinkedList.js",
"/D/wamp/www/phaser/src/gameobjects/GameObjectFactory.js",
"/D/wamp/www/phaser/examples/group1.php",
"/D/wamp/www/phaser/src/geom/Point.js",
"/D/wamp/www/phaser/src/input/Pointer.js",
"/D/wamp/www/phaser/src/particles/arcade/Emitter.js",
"/D/wamp/www/phaser/src/physics/arcade/ArcadePhysics.js",
"/D/wamp/www/phaser/src/system/StageScaleMode.js",
"/D/wamp/www/phaser/src/gameobjects/BitmapText.js",
"/D/wamp/www/phaser/src/core/StateManager.js",
"/D/wamp/www/phaser/src/animation/Parser.js",
@@ -595,23 +649,15 @@
"/D/wamp/www/phaser/examples/sound1.php",
"/D/wamp/www/phaser/src/input/Touch.js",
"/D/wamp/www/phaser/examples/fullscreen.php",
"/D/wamp/www/phaser/src/loader/Loader.js",
"/D/wamp/www/pixi.js/examples/example 14 - Masking/index.html",
"/D/wamp/www/phaser/examples/crop3.php",
"/D/wamp/www/phaser/src/system/Canvas.js",
"/D/ws/manukura/kiwi/components/dom/Gradient.js",
"/D/wamp/www/phaser/examples/invaders.php",
"/D/wamp/www/phaser/src/pixi/textures/Texture.js",
"/D/wamp/www/phaser/src/pixi/textures/BaseTexture.js",
"/D/wamp/www/phaser/examples/rendertexture.php",
"/D/wamp/www/pixi.js/examples/example 11 - RenderTexture/index.html",
"/D/wamp/www/phaser/src/gameobjects/RenderTexture.js",
"/D/wamp/www/phaser/src/pixi/textures/RenderTexture.js",
"/D/wamp/www/phaser/src/animation/Frame.js",
"/D/wamp/www/phaser/src/tilemap/Tile.js",
"/D/wamp/www/phaser/examples/tilemap.php",
"/D/wamp/www/phaser/src/tilemap/Tilemap.js",
"/D/wamp/www/phaser/src/tilemap/TilemapLayer.js",
"/D/wamp/www/phaser/TS Tests/tilemaps/csv tilemap.ts",
"/D/wamp/www/phaser/TS Source/tilemap/Tile.js",
"/D/wamp/www/phaser/TS Source/tilemap/TilemapLayer.js",
@@ -619,18 +665,15 @@
"/D/wamp/www/phaser/TS Source/loader/Loader.ts",
"/D/wamp/www/phaser/TS Source/loader/Cache.ts",
"/D/wamp/www/phaser/examples/sprite_extend.php",
"/D/wamp/www/phaser/src/gameobjects/TileSprite.js",
"/D/wamp/www/phaser/TS Source/gameobjects/ScrollZone.js",
"/D/wamp/www/phaser/TS Source/display/CSS3Filters.js",
"/D/wamp/www/phaser/plugins/CSS3Filters.js",
"/D/wamp/www/phaser/src/pixi/loaders/BitmapFontLoader.js",
"/D/wamp/www/phaser/src/pixi/text/BitmapText.js",
"/D/wamp/www/phaser/src/gameobjects/Graphics.js",
"/D/wamp/www/phaser/src/gameobjects/BitmapFont.js",
"/D/wamp/www/phaser/src/loader/Parser.js",
"/D/wamp/www/pixi.js/examples/example 10 - Text/index.html",
"/D/wamp/www/phaser/examples/assets/fonts/desyrel.xml",
"/D/wamp/www/phaser/src/time/Time.js",
"/D/wamp/www/phaser/src/tween/Tween.js",
"/D/wamp/www/phaser/src/tween/TweenManager.js",
"/D/wamp/www/phaser/src/core/State.js",
@@ -650,32 +693,13 @@
"/D/wamp/www/phaser/examples/bring to top2.php",
"/D/wamp/www/phaser/examples/bring to top.php",
"/D/wamp/www/phaser/src/utils/Utils.js",
"/D/wamp/www/phaser/examples/particles.php",
"/D/wamp/www/phaser/examples/assets/sprites/pixi_monsters.json",
"/D/wamp/www/phaser/src/particles/Particles.js",
"/D/wamp/www/phaser/src/math/RandomDataGenerator.js",
"/D/wamp/www/phaser/src/particles/arcade/ArcadeParticles.js",
"/D/wamp/www/phaser/src/system/Device.js",
"/D/wamp/www/phaser/src/pixi/primitives/Graphics.js",
"/D/wamp/www/phaser/examples/graphics.php",
"/D/wamp/www/pixi.js/examples/example 13 - Graphics/index.html",
"/D/wamp/www/phaser/src/gameobjects/Button.js",
"/D/wamp/www/phaser/examples/button1.php",
"/D/wamp/www/phaser/examples/outofbounds.php",
"/D/wamp/www/phaser/TS Tests/buttons/basic button.ts",
"/D/wamp/www/phaser/TS Source/gameobjects/GameObjectFactory.js",
"/D/wamp/www/phaser/TS Source/ui/Button.js",
"/D/wamp/www/phaser/src/Phaser.js",
"/D/wamp/www/phaser/build/build.php",
"/D/wamp/www/phaser/src/Intro.js",
"/D/wamp/www/phaser/build/phaser.js",
"/D/wamp/www/phaser/examples/js-physics.php",
"/D/wamp/www/phaser/src/pixi/utils/Utils.js",
"/D/wamp/www/phaser/src/pixi/display/Stage.js",
"/D/wamp/www/phaser/examples/js_full.php",
"/D/wamp/www/phaser/examples/bring top top2.php",
"/D/wamp/www/phaser/TS Tests/input/bring to top.ts",
"/D/wamp/www/phaser/examples/touch1.php"
"/D/wamp/www/phaser/examples/graphics.php"
],
"find":
{
@@ -683,7 +707,7 @@
},
"find_in_files":
{
"height": 90.0,
"height": 0.0,
"where_history":
[
"D:\\wamp\\www\\phaser\\src",
@@ -715,6 +739,49 @@
"case_sensitive": true,
"find_history":
[
"maps/",
"Phaser.Group",
"this",
"this.collisionLayer",
"_tempTileBlock",
"timeToCall",
"min",
".y",
"y",
"x",
"touch",
"50",
"body.bounds",
"x",
"deltaX",
"object1",
": number",
": bool",
": number",
"gfx",
"assets/maps",
"console.",
": function",
"tilemap",
"FORMAT_CSV",
"FORMAT_TILED_JSON",
"tilesetURL",
"_images",
"addText",
"fileComplete",
"atlasData",
"atlasURL",
"atlasData",
"atlasURL",
"width",
" = ",
"4",
"texture",
"generateTiles",
"texture.alpha",
"camera.worldView",
"camera",
"var ",
"Phaser.Sprite",
"mummy",
"checkBody",
@@ -799,50 +866,7 @@
"i",
"active",
"key",
"star2",
"reset",
"this.maxSize",
"Phaser.Physics.Arcade.Body",
"integer",
"x",
"reset",
"false",
": number",
"TileSprite",
"Vec2",
"Graphics",
", false",
"add",
"Phaser.Sprite",
"TileSprite",
"reset",
"this.",
"transform.origin",
"TileSprite",
"PolyK",
"bind",
"Rectangle",
"_container",
"stage",
"global",
"Phaser.DebugUtils",
"targetObject.input",
"first",
"sprite.events",
"new Phaser.Signal",
"()",
"_parent",
"if(",
"InputHandler.prototype.",
"_parent",
"()",
"InputHandler.prototype.",
"game.world.randomY",
"_iPrev",
"_iNext",
"entity",
"ship",
"displayObject"
"star2"
],
"highlight": true,
"in_selection": false,
@@ -850,6 +874,9 @@
"regex": false,
"replace_history":
[
" = function",
"CSV",
"JSON",
"Phaser.Bullet",
"for (",
"if (",
@@ -963,8 +990,401 @@
"groups":
[
{
"selected": 2,
"sheets":
[
{
"buffer": 0,
"file": "examples/a_template.php",
"settings":
{
"buffer_size": 640,
"regions":
{
},
"selection":
[
[
0,
0
]
],
"settings":
{
"codeintel": true,
"codeintel_config":
{
"JavaScript":
{
"codeintel_max_recursive_dir_depth": 2,
"codeintel_scan_files_in_project": false,
"javascriptExtraPaths":
[
]
},
"PHP":
{
"codeintel_max_recursive_dir_depth": 5,
"codeintel_scan_files_in_project": false,
"phpExtraPaths":
[
]
},
"Python":
{
"env":
{
}
}
},
"codeintel_enabled_languages":
[
"JavaScript",
"Mason",
"XBL",
"XUL",
"RHTML",
"SCSS",
"Python",
"HTML",
"Ruby",
"Python3",
"XML",
"Sass",
"XSLT",
"Django",
"HTML5",
"Perl",
"CSS",
"Twig",
"Less",
"Smarty",
"Node.js",
"Tcl",
"TemplateToolkit",
"PHP"
],
"codeintel_live": true,
"codeintel_live_enabled_languages":
[
"JavaScript",
"Mason",
"XBL",
"XUL",
"RHTML",
"SCSS",
"Python",
"HTML",
"Ruby",
"Python3",
"XML",
"Sass",
"XSLT",
"Django",
"HTML5",
"Perl",
"CSS",
"Twig",
"Less",
"Smarty",
"Node.js",
"Tcl",
"TemplateToolkit",
"PHP"
],
"codeintel_max_recursive_dir_depth": 10,
"codeintel_scan_exclude_dir":
{
"JavaScript":
[
"/build/",
"/min/"
]
},
"codeintel_scan_files_in_project": true,
"codeintel_selected_catalogs":
[
"PyWin32",
"jQuery",
"Rails"
],
"codeintel_snippets": true,
"codeintel_syntax_map":
{
"Python Django": "Python"
},
"sublime_auto_complete": true,
"syntax": "Packages/PHP/PHP.tmLanguage",
"tab_size": 4,
"translate_tabs_to_spaces": true
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"type": "text"
},
{
"buffer": 1,
"file": "src/physics/arcade/ArcadePhysics.js",
"settings":
{
"buffer_size": 38650,
"regions":
{
},
"selection":
[
[
474,
474
]
],
"settings":
{
"codeintel": true,
"codeintel_config":
{
"JavaScript":
{
"codeintel_max_recursive_dir_depth": 2,
"codeintel_scan_files_in_project": false,
"javascriptExtraPaths":
[
]
},
"PHP":
{
"codeintel_max_recursive_dir_depth": 5,
"codeintel_scan_files_in_project": false,
"phpExtraPaths":
[
]
},
"Python":
{
"env":
{
}
}
},
"codeintel_enabled_languages":
[
"JavaScript",
"Mason",
"XBL",
"XUL",
"RHTML",
"SCSS",
"Python",
"HTML",
"Ruby",
"Python3",
"XML",
"Sass",
"XSLT",
"Django",
"HTML5",
"Perl",
"CSS",
"Twig",
"Less",
"Smarty",
"Node.js",
"Tcl",
"TemplateToolkit",
"PHP"
],
"codeintel_live": true,
"codeintel_live_enabled_languages":
[
"JavaScript",
"Mason",
"XBL",
"XUL",
"RHTML",
"SCSS",
"Python",
"HTML",
"Ruby",
"Python3",
"XML",
"Sass",
"XSLT",
"Django",
"HTML5",
"Perl",
"CSS",
"Twig",
"Less",
"Smarty",
"Node.js",
"Tcl",
"TemplateToolkit",
"PHP"
],
"codeintel_max_recursive_dir_depth": 10,
"codeintel_scan_exclude_dir":
{
"JavaScript":
[
"/build/",
"/min/"
]
},
"codeintel_scan_files_in_project": true,
"codeintel_selected_catalogs":
[
"PyWin32",
"jQuery",
"Rails"
],
"codeintel_snippets": true,
"codeintel_syntax_map":
{
"Python Django": "Python"
},
"sublime_auto_complete": true,
"syntax": "Packages/JavaScript/JavaScript.tmLanguage",
"tab_size": 4,
"translate_tabs_to_spaces": true
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"type": "text"
},
{
"buffer": 2,
"file": "src/Phaser.js",
"settings":
{
"buffer_size": 488,
"regions":
{
},
"selection":
[
[
287,
287
]
],
"settings":
{
"codeintel": true,
"codeintel_config":
{
"JavaScript":
{
"codeintel_max_recursive_dir_depth": 2,
"codeintel_scan_files_in_project": false,
"javascriptExtraPaths":
[
]
},
"PHP":
{
"codeintel_max_recursive_dir_depth": 5,
"codeintel_scan_files_in_project": false,
"phpExtraPaths":
[
]
},
"Python":
{
"env":
{
}
}
},
"codeintel_enabled_languages":
[
"JavaScript",
"Mason",
"XBL",
"XUL",
"RHTML",
"SCSS",
"Python",
"HTML",
"Ruby",
"Python3",
"XML",
"Sass",
"XSLT",
"Django",
"HTML5",
"Perl",
"CSS",
"Twig",
"Less",
"Smarty",
"Node.js",
"Tcl",
"TemplateToolkit",
"PHP"
],
"codeintel_live": true,
"codeintel_live_enabled_languages":
[
"JavaScript",
"Mason",
"XBL",
"XUL",
"RHTML",
"SCSS",
"Python",
"HTML",
"Ruby",
"Python3",
"XML",
"Sass",
"XSLT",
"Django",
"HTML5",
"Perl",
"CSS",
"Twig",
"Less",
"Smarty",
"Node.js",
"Tcl",
"TemplateToolkit",
"PHP"
],
"codeintel_max_recursive_dir_depth": 10,
"codeintel_scan_exclude_dir":
{
"JavaScript":
[
"/build/",
"/min/"
]
},
"codeintel_scan_files_in_project": true,
"codeintel_selected_catalogs":
[
"PyWin32",
"jQuery",
"Rails"
],
"codeintel_snippets": true,
"codeintel_syntax_map":
{
"Python Django": "Python"
},
"sublime_auto_complete": true,
"syntax": "Packages/JavaScript/JavaScript.tmLanguage",
"translate_tabs_to_spaces": false
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"type": "text"
}
]
}
],
+14 -1
View File
@@ -7,7 +7,20 @@ var Phaser = Phaser || {
GAMES: [],
AUTO: 0,
CANVAS: 1,
WEBGL: 2
WEBGL: 2,
SPRITE: 0,
BUTTON: 1,
BULLET: 2,
GRAPHICS: 3,
TEXT: 4,
TILESPRITE: 5,
BITMAPTEXT: 6,
GROUP: 7,
RENDERTEXTURE: 8,
TILEMAP: 9,
TILEMAPLAYER: 10,
EMITTER: 11
};
+2
View File
@@ -36,6 +36,8 @@ Phaser.Group = function (game, parent, name, useStage) {
}
}
this.type = Phaser.GROUP;
this.exists = true;
/**
+2
View File
@@ -21,6 +21,8 @@ Phaser.Button = function (game, x, y, key, callback, callbackContext, overFrame,
Phaser.Sprite.call(this, game, x, y, key, outFrame);
this.type = Phaser.BUTTON;
this._onOverFrameName = null;
this._onOutFrameName = null;
this._onDownFrameName = null;
+2
View File
@@ -14,6 +14,8 @@ Phaser.Graphics = function (game, x, y) {
PIXI.DisplayObjectContainer.call(this);
this.type = Phaser.GRAPHICS;
this.position.x = x;
this.position.y = y;
+2
View File
@@ -13,6 +13,8 @@ Phaser.RenderTexture = function (game, key, width, height) {
this.frame = new PIXI.Rectangle(0, 0, this.width, this.height);
this.type = Phaser.RENDERTEXTURE;
if (PIXI.gl)
{
this.initWebGL();
+2
View File
@@ -17,6 +17,8 @@ Phaser.Sprite = function (game, x, y, key, frame) {
this.name = '';
this.type = Phaser.SPRITE;
this.renderOrderID = -1;
// If you would like the Sprite to have a lifespan once 'born' you can set this to a positive value. Handy for particles, bullets, etc.
+2
View File
@@ -14,6 +14,8 @@ Phaser.Text = function (game, x, y, text, style) {
Phaser.Sprite.call(this, game, x, y, canvasID);
this.type = Phaser.TEXT;
this.setText(text);
this.setStyle(style);
+2
View File
@@ -13,6 +13,8 @@ Phaser.TileSprite = function (game, x, y, width, height, key, frame) {
PIXI.TilingSprite.call(this, this.texture, width, height);
this.type = Phaser.TILESPRITE;
/**
* The scaling of the image that is being tiled
*
+2
View File
@@ -14,6 +14,8 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
this.name = 'emitter' + this.game.particles.ID++;
this.type = Phaser.EMITTER;
/**
* The X position of the top left corner of the emitter in world space.
*/
+24
View File
@@ -179,11 +179,35 @@ Phaser.Physics.Arcade.prototype = {
*/
overlap: function (object1, object2, notifyCallback, processCallback, callbackContext) {
object1 = object1 || null;
object2 = object2 || null;
notifyCallback = notifyCallback || null;
processCallback = processCallback || this.separate;
callbackContext = callbackContext || this;
// World vs. World check
if (object1 == null)
{
// Scan the entire display list, comparing every object! (ouch)
if (this.game.world._container.first._iNext)
{
var currentNode = this.game.world._container.first._iNext;
do
{
if (checkExists == false || (checkExists && currentNode.exists))
{
callback.call(callbackContext, currentNode);
}
currentNode = currentNode._iNext;
}
while (currentNode != this.game.world._container.last._iNext);
}
}
// Get the ships top-most ID. If the length of that ID is 1 then we can ignore every other result,
// it's simply not colliding with anything :)
var potentials = this.quadTree.retrieve(object1);
+2
View File
@@ -51,6 +51,8 @@ Phaser.Tilemap = function (game, key, x, y, resizeWorld, tileWidth, tileHeight)
this.position.x = x;
this.position.y = y;
this.type = Phaser.TILEMAP;
this.renderer = new Phaser.TilemapRenderer(this.game);
this.mapFormat = map.format;
+1
View File
@@ -73,6 +73,7 @@ Phaser.TilemapLayer = function (parent, id, key, mapFormat, name, tileWidth, til
this.ID = id;
this.name = name;
this.key = key;
this.type = Phaser.TILEMAPLAYER;
this.mapFormat = mapFormat;
this.tileWidth = tileWidth;