react-simple-game-engine 0.2.89 → 0.2.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/classes/sound.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sound.d.ts","sourceRoot":"","sources":["../../src/classes/sound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD,qBAAa,KAAK;
|
1
|
+
{"version":3,"file":"sound.d.ts","sourceRoot":"","sources":["../../src/classes/sound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD,qBAAa,KAAK;aAYY,IAAI,EAAE,SAAS;IAX3C,MAAM,CAAC,UAAU,EAAE,eAAe,CAOhC;IACF,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAe;IAChD,OAAO,CAAC,OAAO,CAAS;gBAEI,IAAI,GAAE,SAA0B;IAE5D,IAAI,MAAM,IAIM,MAAM,CAFrB;IAED,IAAI,MAAM,CAAC,GAAG,EAAE,MAAM,EAGrB;IAED,IAAI,SAAS,YAEZ;IAEK,OAAO;IAQP,KAAK;IAIL,MAAM;IAQN,IAAI;IAQJ,IAAI;CAcX"}
|
package/lib/classes/sound.js
CHANGED
@@ -48,6 +48,7 @@ var Sound = /** @class */ (function () {
|
|
48
48
|
return this.native.volume;
|
49
49
|
},
|
50
50
|
set: function (vol) {
|
51
|
+
this._volume = vol;
|
51
52
|
this.native.volume = vol;
|
52
53
|
},
|
53
54
|
enumerable: false,
|
@@ -120,7 +121,7 @@ var Sound = /** @class */ (function () {
|
|
120
121
|
};
|
121
122
|
Sound.prototype.play = function () {
|
122
123
|
return __awaiter(this, void 0, void 0, function () {
|
123
|
-
var canPlay, loop;
|
124
|
+
var canPlay, loop, exec;
|
124
125
|
return __generator(this, function (_a) {
|
125
126
|
switch (_a.label) {
|
126
127
|
case 0:
|
@@ -133,7 +134,9 @@ var Sound = /** @class */ (function () {
|
|
133
134
|
else {
|
134
135
|
this.native.loop = false;
|
135
136
|
}
|
136
|
-
|
137
|
+
exec = this.native.play();
|
138
|
+
this.native.volume = this._volume;
|
139
|
+
return [4 /*yield*/, exec];
|
137
140
|
case 1:
|
138
141
|
_a.sent();
|
139
142
|
_a.label = 2;
|