File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,18 +60,23 @@ var components = [
6060
6161Phaser . Component . Core . install . call ( Phaser . Graphics . prototype , components ) ;
6262
63+ Phaser . Graphics . prototype . preUpdatePhysics = Phaser . Component . PhysicsBody . preUpdate ;
64+ Phaser . Graphics . prototype . preUpdateLifeSpan = Phaser . Component . LifeSpan . preUpdate ;
65+ Phaser . Graphics . prototype . preUpdateInWorld = Phaser . Component . InWorld . preUpdate ;
66+ Phaser . Graphics . prototype . preUpdateCore = Phaser . Component . Core . preUpdate ;
67+
6368/**
6469* Automatically called by World.preUpdate.
6570* @method Phaser.Graphics.prototype.preUpdate
6671*/
6772Phaser . Graphics . prototype . preUpdate = function ( ) {
6873
69- // Phaser.Component.PhysicsBody.preUpdate.call( this);
70- // Phaser.Component.LifeSpan.preUpdate.call(this);
71- Phaser . Component . InWorld . preUpdate . call ( this ) ;
72- Phaser . Component . Core . preUpdate . call ( this ) ;
74+ if ( ! this . preUpdatePhysics ( ) || ! this . preUpdateLifeSpan ( ) || ! this . preUpdateInWorld ( ) )
75+ {
76+ return false ;
77+ }
7378
74- return true ;
79+ return this . preUpdateCore ( ) ;
7580
7681} ;
7782
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ PIXI.DisplayObjectContainer = function()
3131PIXI . DisplayObjectContainer . prototype = Object . create ( PIXI . DisplayObject . prototype ) ;
3232PIXI . DisplayObjectContainer . prototype . constructor = PIXI . DisplayObjectContainer ;
3333
34-
3534/**
3635 * The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set
3736 *
Original file line number Diff line number Diff line change @@ -136,10 +136,6 @@ PIXI.Graphics = function()
136136PIXI . Graphics . prototype = Object . create ( PIXI . DisplayObjectContainer . prototype ) ;
137137PIXI . Graphics . prototype . constructor = PIXI . Graphics ;
138138
139- PIXI . Graphics . prototype . preUpdate = function ( ) { } ;
140- PIXI . Graphics . prototype . update = function ( ) { } ;
141- PIXI . Graphics . prototype . postUpdate = function ( ) { } ;
142-
143139/**
144140 * Specifies the line style used for subsequent calls to Graphics methods such as the lineTo() method or the drawCircle() method.
145141 *
You can’t perform that action at this time.
0 commit comments