Skip to content

Commit 6235f25

Browse files
committed
LL
1 parent d317779 commit 6235f25

5 files changed

Lines changed: 114 additions & 55 deletions

File tree

Phaser.sublime-workspace

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -523,39 +523,40 @@
523523
"file": "src/gameobjects/Sprite.js",
524524
"settings":
525525
{
526-
"buffer_size": 9167,
526+
"buffer_size": 9442,
527527
"line_ending": "Windows"
528528
}
529529
},
530530
{
531-
"file": "examples/camera4.php",
531+
"file": "src/core/World.js",
532532
"settings":
533533
{
534-
"buffer_size": 1166,
534+
"buffer_size": 2868,
535535
"line_ending": "Windows"
536536
}
537537
},
538538
{
539-
"file": "src/animation/Parser.js",
539+
"file": "TS Source/math/QuadTree.js",
540540
"settings":
541541
{
542-
"buffer_size": 8379,
542+
"buffer_size": 18663,
543543
"line_ending": "Windows"
544544
}
545545
},
546546
{
547-
"file": "src/animation/Frame.js",
547+
"file": "src/math/QuadTree.js",
548548
"settings":
549549
{
550-
"buffer_size": 3046,
551-
"line_ending": "Windows"
550+
"buffer_size": 1014,
551+
"line_ending": "Windows",
552+
"name": "Phaser.QuadTree = function () {"
552553
}
553554
},
554555
{
555-
"file": "src/animation/AnimationManager.js",
556+
"file": "src/pixi/display/Sprite.js",
556557
"settings":
557558
{
558-
"buffer_size": 6598,
559+
"buffer_size": 4817,
559560
"line_ending": "Windows"
560561
}
561562
}
@@ -588,6 +589,15 @@
588589
},
589590
"file_history":
590591
[
592+
"/D/wamp/www/phaser/src/math/LinkedList.js",
593+
"/D/wamp/www/phaser/TS Source/math/LinkedList.js",
594+
"/D/wamp/www/phaser/src/pixi/display/DisplayObject.js",
595+
"/D/wamp/www/phaser/src/pixi/display/DisplayObjectContainer.js",
596+
"/D/wamp/www/phaser/src/pixi/display/Sprite.js",
597+
"/D/wamp/www/phaser/src/animation/AnimationManager.js",
598+
"/D/wamp/www/phaser/src/animation/Frame.js",
599+
"/D/wamp/www/phaser/src/animation/Parser.js",
600+
"/D/wamp/www/phaser/examples/camera4.php",
591601
"/D/wamp/www/phaser/src/core/Game.js",
592602
"/D/wamp/www/phaser/examples/sprite3.php",
593603
"/D/wamp/www/phaser/examples/camera5.php",
@@ -596,7 +606,6 @@
596606
"/D/wamp/www/pixi.js/examples/example 6 - Interactivity/index.html",
597607
"/D/wamp/www/phaser/src/pixi/renderers/canvas/CanvasRenderer.js",
598608
"/D/wamp/www/phaser/src/core/World.js",
599-
"/D/wamp/www/phaser/src/pixi/display/DisplayObject.js",
600609
"/D/wamp/www/phaser/src/math/Math.js",
601610
"/D/wamp/www/phaser/src/geom/Point.js",
602611
"/D/wamp/www/phaser/src/input/Input.js",
@@ -606,7 +615,6 @@
606615
"/D/wamp/www/phaser/src/core/Camera.js",
607616
"/D/wamp/www/phaser/src/input/MSPointer.js",
608617
"/D/wamp/www/phaser/src/core/StateManager.js",
609-
"/D/wamp/www/phaser/src/pixi/display/Sprite.js",
610618
"/D/wamp/www/phaser/TS Source/utils/DebugUtils.js",
611619
"/D/wamp/www/phaser/examples/js.php",
612620
"/D/wamp/www/phaser/TS Source/renderers/canvas/SpriteRenderer.ts",
@@ -647,11 +655,9 @@
647655
"/D/wamp/www/phaser/src/tween/TweenManager.js",
648656
"/D/wamp/www/phaser/TS Source/gameobjects/GameObjectFactory.ts",
649657
"/C/Users/rich/Desktop/game.js",
650-
"/D/wamp/www/phaser/src/animation/AnimationManager.js",
651658
"/D/wamp/www/phaser/src/animation/Animation.js",
652659
"/D/wamp/www/phaser/TS Source/animation/Animation.js",
653660
"/D/wamp/www/phaser/TS Source/animation/AnimationManager.js",
654-
"/D/wamp/www/phaser/src/animation/Parser.js",
655661
"/D/wamp/www/phaser/src/loader/Cache.js",
656662
"/D/wamp/www/phaser/TS Source/gameobjects/Sprite.js",
657663
"/D/wamp/www/phaser/src/system/RequestAnimationFrame.js",
@@ -660,7 +666,6 @@
660666
"/D/wamp/www/phaser/src/pixi/display/MovieClip.js",
661667
"/D/wamp/www/phaser/src/pixi/loaders/ImageLoader.js",
662668
"/D/wamp/www/phaser/src/animation/FrameData.js",
663-
"/D/wamp/www/phaser/src/animation/Frame.js",
664669
"/D/wamp/www/phaser/src/pixi/loaders/SpriteSheetLoader.js",
665670
"/D/wamp/www/phaser/examples/assets/sprites/running_bot.json",
666671
"/D/wamp/www/pixi.js/examples/example 2 - SpriteSheet/index.html",
@@ -673,7 +678,6 @@
673678
"/D/wamp/www/phaser/src/Game.js",
674679
"/D/wamp/www/phaser/src/Stage.js",
675680
"/D/wamp/www/phaser/src/pixi/display/Stage.js",
676-
"/D/wamp/www/phaser/src/pixi/display/DisplayObjectContainer.js",
677681
"/D/wamp/www/phaser/examples/pixi 1.html",
678682
"/D/wamp/www/phaser/src/system/Canvas.js",
679683
"/D/wamp/www/phaser/src/Phaser.js",
@@ -712,10 +716,7 @@
712716
"/D/wamp/www/phaser/TS Source/tweens/TweenManager.js",
713717
"/D/wamp/www/phaser/TS Source/utils/RectangleUtils.js",
714718
"/D/wamp/www/phaser/TS Source/geom/Rectangle.js",
715-
"/D/wamp/www/phaser/examples/point.html",
716-
"/D/wamp/www/phaser/src/geom/Circle.js",
717-
"/D/wamp/www/phaser/TS Source/utils/PointUtils.js",
718-
"/D/wamp/www/phaser/TS Source/geom/Point.js"
719+
"/D/wamp/www/phaser/examples/point.html"
719720
],
720721
"find":
721722
{
@@ -947,23 +948,23 @@
947948
"groups":
948949
[
949950
{
950-
"selected": 1,
951+
"selected": 2,
951952
"sheets":
952953
[
953954
{
954955
"buffer": 0,
955956
"file": "src/gameobjects/Sprite.js",
956957
"settings":
957958
{
958-
"buffer_size": 9167,
959+
"buffer_size": 9442,
959960
"regions":
960961
{
961962
},
962963
"selection":
963964
[
964965
[
965-
7118,
966-
7118
966+
0,
967+
0
967968
]
968969
],
969970
"settings":
@@ -1076,25 +1077,25 @@
10761077
"translate_tabs_to_spaces": true
10771078
},
10781079
"translation.x": 0.0,
1079-
"translation.y": 3579.0,
1080+
"translation.y": 0.0,
10801081
"zoom_level": 1.0
10811082
},
10821083
"type": "text"
10831084
},
10841085
{
10851086
"buffer": 1,
1086-
"file": "examples/camera4.php",
1087+
"file": "src/core/World.js",
10871088
"settings":
10881089
{
1089-
"buffer_size": 1166,
1090+
"buffer_size": 2868,
10901091
"regions":
10911092
{
10921093
},
10931094
"selection":
10941095
[
10951096
[
1096-
1089,
1097-
1089
1097+
149,
1098+
149
10981099
]
10991100
],
11001101
"settings":
@@ -1202,8 +1203,7 @@
12021203
"Python Django": "Python"
12031204
},
12041205
"sublime_auto_complete": true,
1205-
"syntax": "Packages/PHP/PHP.tmLanguage",
1206-
"translate_tabs_to_spaces": false
1206+
"syntax": "Packages/JavaScript/JavaScript.tmLanguage"
12071207
},
12081208
"translation.x": 0.0,
12091209
"translation.y": 0.0,
@@ -1213,18 +1213,18 @@
12131213
},
12141214
{
12151215
"buffer": 2,
1216-
"file": "src/animation/Parser.js",
1216+
"file": "TS Source/math/QuadTree.js",
12171217
"settings":
12181218
{
1219-
"buffer_size": 8379,
1219+
"buffer_size": 18663,
12201220
"regions":
12211221
{
12221222
},
12231223
"selection":
12241224
[
12251225
[
1226-
0,
1227-
0
1226+
1291,
1227+
1583
12281228
]
12291229
],
12301230
"settings":
@@ -1344,22 +1344,23 @@
13441344
},
13451345
{
13461346
"buffer": 3,
1347-
"file": "src/animation/Frame.js",
1347+
"file": "src/math/QuadTree.js",
13481348
"settings":
13491349
{
1350-
"buffer_size": 3046,
1350+
"buffer_size": 1014,
13511351
"regions":
13521352
{
13531353
},
13541354
"selection":
13551355
[
13561356
[
1357-
538,
1358-
538
1357+
829,
1358+
829
13591359
]
13601360
],
13611361
"settings":
13621362
{
1363+
"auto_name": "Phaser.QuadTree = function () {",
13631364
"codeintel": true,
13641365
"codeintel_config":
13651366
{
@@ -1463,8 +1464,7 @@
14631464
"Python Django": "Python"
14641465
},
14651466
"sublime_auto_complete": true,
1466-
"syntax": "Packages/JavaScript/JavaScript.tmLanguage",
1467-
"translate_tabs_to_spaces": false
1467+
"syntax": "Packages/JavaScript/JavaScript.tmLanguage"
14681468
},
14691469
"translation.x": 0.0,
14701470
"translation.y": 0.0,
@@ -1474,18 +1474,18 @@
14741474
},
14751475
{
14761476
"buffer": 4,
1477-
"file": "src/animation/AnimationManager.js",
1477+
"file": "src/pixi/display/Sprite.js",
14781478
"settings":
14791479
{
1480-
"buffer_size": 6598,
1480+
"buffer_size": 4817,
14811481
"regions":
14821482
{
14831483
},
14841484
"selection":
14851485
[
14861486
[
1487-
603,
1488-
603
1487+
1861,
1488+
1861
14891489
]
14901490
],
14911491
"settings":
@@ -1593,10 +1593,11 @@
15931593
"Python Django": "Python"
15941594
},
15951595
"sublime_auto_complete": true,
1596-
"syntax": "Packages/JavaScript/JavaScript.tmLanguage"
1596+
"syntax": "Packages/JavaScript/JavaScript.tmLanguage",
1597+
"translate_tabs_to_spaces": false
15971598
},
15981599
"translation.x": 0.0,
1599-
"translation.y": 0.0,
1600+
"translation.y": 900.0,
16001601
"zoom_level": 1.0
16011602
},
16021603
"type": "text"

examples/camera4.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,11 @@ function update() {
4040

4141
function render() {
4242

43+
game.debug.renderRectangle(mummy.bounds, 'rgba(255,255,0,0.1)');
4344
game.debug.renderPoint(mummy.topLeft, 'rgb(255,0,0)');
4445
game.debug.renderPoint(mummy.topRight, 'rgb(0,255,0)');
4546
game.debug.renderPoint(mummy.bottomLeft, 'rgb(0,0,255)');
4647
game.debug.renderPoint(mummy.bottomRight, 'rgb(255,0,255)');
47-
game.debug.renderPoint(mummy.center, 'rgb(255,255,0)');
48-
game.debug.renderRectangle(mummy.bounds, 'rgba(255,255,0,0.1)');
4948

5049
}
5150

src/core/World.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ Phaser.World.prototype = {
5959

6060
do
6161
{
62-
// if (!displayObject.active)
63-
// {
64-
// displayObject = displayObject.last._iNext;
65-
// continue;
66-
// }
67-
6862
if (displayObject['update'])
6963
{
7064
displayObject.update();

src/math/LinkedList.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* Phaser - LinkedList
3+
*
4+
* A miniature linked list class. Useful for optimizing time-critical or highly repetitive tasks!
5+
*/
6+
7+
/**
8+
* Creates a new link, and sets <code>object</code> and <code>next</code> to <code>null</code>.
9+
*/
10+
Phaser.LinkedList = function () {
11+
12+
this.object = null;
13+
this.next = null;
14+
15+
};
16+
17+
Phaser.LinkedList.prototype = {
18+
19+
destroy: function () {
20+
21+
this.object = null;
22+
23+
if (this.next != null)
24+
{
25+
this.next.destroy();
26+
}
27+
28+
this.next = null;
29+
}
30+
31+
};

src/math/QuadTree.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Phaser - QuadTree
3+
*
4+
* A fairly generic quad tree structure for rapid overlap checks. QuadTree is also configured for single or dual list operation.
5+
* You can add items either to its A list or its B list. When you do an overlap check, you can compare the A list to itself,
6+
* or the A list against the B list. Handy for different things!
7+
*/
8+
9+
/**
10+
* Instantiate a new Quad Tree node.
11+
12+
* @extends Rectangle
13+
*
14+
* @param {Number} x The X-coordinate of the point in space.
15+
* @param {Number} y The Y-coordinate of the point in space.
16+
* @param {Number} width Desired width of this node.
17+
* @param {Number} height Desired height of this node.
18+
* @param {Number} parent The parent branch or node. Pass null to create a root.
19+
*/
20+
Phaser.QuadTree = function (manager, x, y, width, height, parent) {
21+
22+
Phaser.Rectangle.call(this);
23+
24+
25+
};
26+
27+
// constructor
28+
Phaser.QuadTree.prototype = Object.create(Phaser.Rectangle.prototype);
29+
Phaser.QuadTree.prototype.constructor = Phaser.Rectangle;
30+
31+
Phaser.QuadTree.prototype = {
32+
33+
34+
};

0 commit comments

Comments
 (0)