isaacscript-common 1.0.541 → 1.0.542
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.
|
@@ -152,6 +152,13 @@ export declare function getSlots(matchingVariant?: number, matchingSubType?: num
|
|
|
152
152
|
* ```
|
|
153
153
|
*/
|
|
154
154
|
export declare function getTears(matchingVariant?: number, matchingSubType?: number): EntityTear[];
|
|
155
|
+
/**
|
|
156
|
+
* Helper function to measure an entity's velocity to see if it is moving.
|
|
157
|
+
*
|
|
158
|
+
* @param entity The entity whose velocity to measure.
|
|
159
|
+
* @param threshold Optional. The threshold from 0 to consider to be moving. 0.01 by default.
|
|
160
|
+
*/
|
|
161
|
+
export declare function isEntityMoving(entity: Entity, threshold?: number): boolean;
|
|
155
162
|
/**
|
|
156
163
|
* Helper function to remove all of the entities in the supplied array.
|
|
157
164
|
*
|
|
@@ -210,6 +210,12 @@ function ____exports.getTears(self, matchingVariant, matchingSubType)
|
|
|
210
210
|
end
|
|
211
211
|
return tears
|
|
212
212
|
end
|
|
213
|
+
function ____exports.isEntityMoving(self, entity, threshold)
|
|
214
|
+
if threshold == nil then
|
|
215
|
+
threshold = 0.01
|
|
216
|
+
end
|
|
217
|
+
return entity.Velocity:Length() >= threshold
|
|
218
|
+
end
|
|
213
219
|
function ____exports.removeEntities(self, entities, cap)
|
|
214
220
|
local numEntitiesRemoved = 0
|
|
215
221
|
do
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.542",
|
|
4
4
|
"description": "Helper functions for IsaacScript mods",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dist/**/*.d.ts"
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"isaac-typescript-definitions": "^1.0.
|
|
28
|
+
"isaac-typescript-definitions": "^1.0.305",
|
|
29
29
|
"isaacscript-lint": "^1.0.72",
|
|
30
30
|
"typedoc": "^0.22.10",
|
|
31
31
|
"typescript": "4.4.4",
|