Finished off RenderTexture. Sprites can now accept a RenderTexture or a key when you create them. RenderTextures are also now stored in the cache under their own key, making re-using them across other Sprites much easier. Also ported over all of the Tilemap classes, but need to get them rendering.

This commit is contained in:
Richard Davey
2013-09-11 02:57:36 +01:00
parent f885f7b023
commit 48ed27dfcc
11 changed files with 1292 additions and 73 deletions
+3 -11
View File
@@ -1,17 +1,9 @@
Phaser.RenderTexture = function (game, width, height) {
// If exists = false then the Sprite isn't updated by the core game loop or physics subsystem at all
this.exists = true;
// This is a handy little var your game can use to determine if a sprite is alive or not, it doesn't effect rendering
this.alive = true;
this.group = null;
this.name = '';
Phaser.RenderTexture = function (game, key, width, height) {
this.game = game;
this.name = key;
PIXI.EventTarget.call( this );
this.width = width || 100;