react-simple-game-engine 0.3.7 → 0.3.8
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.
@@ -57,7 +57,7 @@ export declare abstract class Entity<P extends Record<string, any> = Record<stri
|
|
57
57
|
get havePhysicBody(): boolean;
|
58
58
|
/**
|
59
59
|
* @param {TerminateOptions} options
|
60
|
-
* #duration: time to disappear from the world in
|
60
|
+
* #duration: time to disappear from the world in milliseconds, default: 200 milliseconds
|
61
61
|
* #effect: effect to showing on duration time
|
62
62
|
* @void
|
63
63
|
*/
|
@@ -95,7 +95,7 @@ var Entity = /** @class */ (function (_super) {
|
|
95
95
|
});
|
96
96
|
/**
|
97
97
|
* @param {TerminateOptions} options
|
98
|
-
* #duration: time to disappear from the world in
|
98
|
+
* #duration: time to disappear from the world in milliseconds, default: 200 milliseconds
|
99
99
|
* #effect: effect to showing on duration time
|
100
100
|
* @void
|
101
101
|
*/
|
@@ -103,7 +103,7 @@ var Entity = /** @class */ (function (_super) {
|
|
103
103
|
var _this = this;
|
104
104
|
var _a;
|
105
105
|
if (options) {
|
106
|
-
var _b = options.duration, duration = _b === void 0 ?
|
106
|
+
var _b = options.duration, duration = _b === void 0 ? 200 : _b, effect = options.effect, _c = options.keepVisible, keepVisible = _c === void 0 ? false : _c;
|
107
107
|
this.isTerminate = true;
|
108
108
|
this.keepVisible = keepVisible;
|
109
109
|
if (this.havePhysicBody) {
|
@@ -119,7 +119,7 @@ var Entity = /** @class */ (function (_super) {
|
|
119
119
|
var _a;
|
120
120
|
_this.worldManagement.removeEntity(_this);
|
121
121
|
(_a = _this.onTerminate) === null || _a === void 0 ? void 0 : _a.call(_this);
|
122
|
-
}, duration
|
122
|
+
}, duration);
|
123
123
|
}
|
124
124
|
else {
|
125
125
|
this.worldManagement.removeEntity(this);
|