@@ -2769,7 +2769,8 @@ var Kiwi;
2769
2769
if (this.deviceTargetOption === Kiwi.TARGET_BROWSER) {
2770
2770
if (domParent !== '') {
2771
2771
if (document.getElementById(domParent))
2772
- console.log('Game being created inside ' + domParent + '.'); else
2772
+ console.log('Game being created inside ' + domParent + '.');
2773
+ else
2773
2774
console.log('The element "' + domParent + '" could not be found. Appending the game to the body.');
2774
2775
} else {
2775
2776
console.log('No DOM parent specified. Appending the game to the body.');
@@ -3061,6 +3062,7 @@ var Kiwi;
3061
3062
//if (this.containsDescendant(val) === false) {
3062
3063
this.transform.parent = (val !== null) ? val.transform : null;
3063
3064
this._parent = val;
3065
+ //}
3064
3066
},
3065
3067
enumerable: true,
3066
3068
configurable: true
@@ -4070,17 +4072,17 @@ var Kiwi;
4070
4072
})();
4071
4073
Kiwi.PluginManager = PluginManager;
4072
4074
})(Kiwi || (Kiwi = {}));
4075
+ /**
4076
+ *
4077
+ * @module Kiwi
4078
+ *
4079
+ */
4073
4080
var __extends = this.__extends || function (d, b) {
4074
4081
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
4075
4082
function __() { this.constructor = d; }
4076
4083
__.prototype = b.prototype;
4077
4084
d.prototype = new __();
4078
4085
};
4079
- /**
4080
- *
4081
- * @module Kiwi
4082
- *
4083
- */
4084
4086
var Kiwi;
4085
4087
(function (Kiwi) {
4086
4088
/**
@@ -4448,6 +4450,11 @@ var Kiwi;
4448
4450
* @module Kiwi
4449
4451
*
4450
4452
*/
4453
+ /**
4454
+ *
4455
+ * @module Kiwi
4456
+ *
4457
+ */
4451
4458
var Kiwi;
4452
4459
(function (Kiwi) {
4453
4460
/**
@@ -5151,6 +5158,7 @@ var Kiwi;
5151
5158
5152
5159
this._createCompositeCanvas();
5153
5160
if (this._game.debugOption === Kiwi.DEBUG_ON) {
5161
+ //this._createDebugCanvas();
5154
5162
}
5155
5163
};
5156
5164
@@ -5162,6 +5170,7 @@ var Kiwi;
5162
5170
Stage.prototype._createCompositeCanvas = function () {
5163
5171
if (this._game.deviceTargetOption == Kiwi.TARGET_COCOON) {
5164
5172
this.canvas = document.createElement(navigator['isCocoonJS'] ? 'screencanvas' : 'canvas');
5173
+ //otherwise default to normal canvas
5165
5174
} else {
5166
5175
this.canvas = document.createElement("canvas");
5167
5176
}
@@ -5216,6 +5225,7 @@ var Kiwi;
5216
5225
*/
5217
5226
Stage.prototype._createDebugCanvas = function () {
5218
5227
if (this._game.deviceTargetOption === Kiwi.TARGET_COCOON) {
5228
+ //debug canvas not supported in cocoon, creating canvas and context anyway.
5219
5229
}
5220
5230
this.debugCanvas = document.createElement("canvas");
5221
5231
this.debugCanvas.id = this._game.id + "debugCanvas";
@@ -5305,6 +5315,7 @@ var Kiwi;
5305
5315
5306
5316
if (this._animations['default']) {
5307
5317
this.currentAnimation = this._animations['default'];
5318
+ //otherwise create one.
5308
5319
} else {
5309
5320
var defaultCells = [];
5310
5321
for (var i = 0; i < this._atlas.cells.length; i++) {
@@ -5422,7 +5433,8 @@ var Kiwi;
5422
5433
this._setCurrentAnimation(name);
5423
5434
5424
5435
if (index !== null)
5425
- this.currentAnimation.playAt(index); else
5436
+ this.currentAnimation.playAt(index);
5437
+ else
5426
5438
this.currentAnimation.play();
5427
5439
5428
5440
this.onPlay.dispatch(this.currentAnimation);
@@ -6910,7 +6922,8 @@ var Kiwi;
6910
6922
ArcadePhysics.prototype.solid = function (value) {
6911
6923
if (value !== undefined) {
6912
6924
if (value)
6913
- this.allowCollisions = ArcadePhysics.ANY; else
6925
+ this.allowCollisions = ArcadePhysics.ANY;
6926
+ else
6914
6927
this.allowCollisions = ArcadePhysics.NONE;
6915
6928
}
6916
6929
@@ -7263,16 +7276,20 @@ var Kiwi;
7263
7276
if (typeof drag === "undefined") { drag = 0; }
7264
7277
if (typeof max === "undefined") { max = 10000; }
7265
7278
if (acceleration != 0)
7266
- velocity += acceleration * ArcadePhysics.updateInterval; else if (drag != 0) {
7279
+ velocity += acceleration * ArcadePhysics.updateInterval;
7280
+ else if (drag != 0) {
7267
7281
drag = drag * ArcadePhysics.updateInterval;
7268
7282
if (velocity - drag > 0)
7269
- velocity = velocity - drag; else if (velocity + drag < 0)
7270
- velocity += drag; else
7283
+ velocity = velocity - drag;
7284
+ else if (velocity + drag < 0)
7285
+ velocity += drag;
7286
+ else
7271
7287
velocity = 0;
7272
7288
}
7273
7289
if ((velocity != 0) && (max != 10000)) {
7274
7290
if (velocity > max)
7275
- velocity = max; else if (velocity < -max)
7291
+ velocity = max;
7292
+ else if (velocity < -max)
7276
7293
velocity = -max;
7277
7294
}
7278
7295
return velocity;
@@ -10802,6 +10819,7 @@ var Kiwi;
10802
10819
*/
10803
10820
TileMap.prototype.collideGroup = function (group) {
10804
10821
for (var i = 0; i < group.members.length; i++) {
10822
+ //this.collideSingle(group.members[i]);
10805
10823
}
10806
10824
};
10807
10825
@@ -11836,6 +11854,7 @@ var Kiwi;
11836
11854
if (typeof output === "undefined") { output = new Geom.Point(); }
11837
11855
if (asDegrees === true) {
11838
11856
angle = angle * (Math.PI / 180);
11857
+ //angle = angle * (180 / Math.PI); // Degrees to Radians
11839
11858
}
11840
11859
11841
11860
output.x = this.x + this._radius * Math.cos(angle);
@@ -12084,6 +12103,7 @@ var Kiwi;
12084
12103
if (Math.atan2(y - this.y1, x - this.x1) == Math.atan2(this.y2 - this.y1, this.x2 - this.x1)) {
12085
12104
return true;
12086
12105
}
12106
+ // return true;
12087
12107
}
12088
12108
12089
12109
return false;
@@ -12833,7 +12853,8 @@ var Kiwi;
12833
12853
*/
12834
12854
Line.prototype.getY = function (x) {
12835
12855
if (this.x1 == this.x2)
12836
- return null; else
12856
+ return null;
12857
+ else
12837
12858
return this.slope * x + this.yIntercept;
12838
12859
};
12839
12860
@@ -14724,6 +14745,7 @@ var Kiwi;
14724
14745
function (value) {
14725
14746
this._scaleX = value;
14726
14747
this._scaleY = value;
14748
+ //this.owner.dirty = true;
14727
14749
},
14728
14750
enumerable: true,
14729
14751
configurable: true
@@ -15902,6 +15924,7 @@ var Kiwi;
15902
15924
if (this.onCoordsUpdate)
15903
15925
this.onCoordsUpdate.dispose();
15904
15926
delete this.onCoordsUpdate;
15927
+ //remove the elements....
15905
15928
};
15906
15929
return HUDWidget;
15907
15930
})();
@@ -16996,6 +17019,7 @@ var Kiwi;
16996
17019
}
16997
17020
16998
17021
_super.prototype.setTemplate.call(this, main);
17022
+ //do something with each item
16999
17023
}
17000
17024
};
17001
17025
@@ -18463,7 +18487,8 @@ var Kiwi;
18463
18487
this.duration = this.totalDuration * 1000;
18464
18488
18465
18489
if (this._muted)
18466
- this._sound.volume = 0; else
18490
+ this._sound.volume = 0;
18491
+ else
18467
18492
this._sound.volume = this._volume;
18468
18493
18469
18494
this._sound.currentTime = this._markers[this._currentMarker].start;
@@ -19109,6 +19134,7 @@ var Kiwi;
19109
19134
this._parent.updateCellIndex();
19110
19135
if (this._onLoop !== null)
19111
19136
this._onLoop.dispatch();
19137
+ //Not Looping, stop animation.
19112
19138
} else {
19113
19139
//Execute the stop on the parent to allow the isPlaying boolean to remain consistent
19114
19140
this._parent.stop();
@@ -19495,6 +19521,7 @@ var Kiwi;
19495
19521
* @public
19496
19522
*/
19497
19523
Keyboard.prototype.update = function () {
19524
+ // Loop through all 'down' keys and update the timers on those still pressed
19498
19525
};
19499
19526
19500
19527
/**
@@ -22802,6 +22829,7 @@ var Kiwi;
22802
22829
* @method boot
22803
22830
*/
22804
22831
Browser.prototype.boot = function () {
22832
+ //this._game.stage.offset = this.getOffsetPoint(this._game.stage.container);
22805
22833
};
22806
22834
22807
22835
/**
@@ -23171,6 +23199,7 @@ var Kiwi;
23171
23199
this.worker = !!window['Worker'];
23172
23200
23173
23201
if ('ontouchstart' in document.documentElement || window.navigator.msPointerEnabled) {
23202
+ //this.touch = true;
23174
23203
}
23175
23204
};
23176
23205
@@ -24569,6 +24598,7 @@ var Kiwi;
24569
24598
if (this.delta > 0.1) {
24570
24599
this.delta = 0.1;
24571
24600
}
24601
+ // Apply time scaling
24572
24602
};
24573
24603
24574
24604
/**
@@ -25275,6 +25305,7 @@ var Kiwi;
25275
25305
*/
25276
25306
Canvas.prototype.clear = function () {
25277
25307
if (this._clearMode === Canvas.CLEARMODE_NONE) {
25308
+ // Do nothing
25278
25309
} else if (this._clearMode === Canvas.CLEARMODE_CLEARRECT) {
25279
25310
// Clear Rect
25280
25311
this.context.clearRect(0, 0, this.domElement.width, this.domElement.height);
@@ -25692,7 +25723,8 @@ var Kiwi;
25692
25723
max -= min;
25693
25724
25694
25725
if (!max)
25695
- return 0; else
25726
+ return 0;
25727
+ else
25696
25728
return val / max;
25697
25729
};
25698
25730
@@ -25707,7 +25739,8 @@ var Kiwi;
25707
25739
*/
25708
25740
function (n) {
25709
25741
if (n)
25710
- return n / Math.abs(n); else
25742
+ return n / Math.abs(n);
25743
+ else
25711
25744
return 0;
25712
25745
};
25713
25746
@@ -26918,7 +26951,7 @@ var Kiwi;
26918
26951
26919
26952
var seed;
26920
26953
26921
- for (var i = 0; seed = seeds[i++]; ) {
26954
+ for (var i = 0; seed = seeds[i++];) {
26922
26955
this.s0 -= this.hash(seed);
26923
26956
this.s0 += ~~(this.s0 < 0);
26924
26957
0 commit comments