isaacscript-common 24.0.0 → 24.1.1
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/dist/index.rollup.d.ts +6 -3
- package/dist/isaacscript-common.lua +22 -12
- package/dist/src/core/constantsFirstLast.d.ts +2 -3
- package/dist/src/core/constantsFirstLast.d.ts.map +1 -1
- package/dist/src/core/constantsFirstLast.lua +5 -4
- package/dist/src/functions/ui.d.ts +2 -0
- package/dist/src/functions/ui.d.ts.map +1 -1
- package/dist/src/functions/ui.lua +18 -10
- package/package.json +1 -1
- package/src/core/constantsFirstLast.ts +7 -4
- package/src/functions/ui.ts +20 -10
package/dist/index.rollup.d.ts
CHANGED
|
@@ -6465,8 +6465,12 @@ export declare function getScreenBottomLeftPos(): Readonly<Vector>;
|
|
|
6465
6465
|
|
|
6466
6466
|
export declare function getScreenBottomRightPos(): Readonly<Vector>;
|
|
6467
6467
|
|
|
6468
|
+
export declare function getScreenBottomY(): float;
|
|
6469
|
+
|
|
6468
6470
|
export declare function getScreenCenterPos(): Readonly<Vector>;
|
|
6469
6471
|
|
|
6472
|
+
export declare function getScreenRightX(): float;
|
|
6473
|
+
|
|
6470
6474
|
export declare function getScreenTopCenterPos(): Readonly<Vector>;
|
|
6471
6475
|
|
|
6472
6476
|
export declare function getScreenTopLeftPos(): Readonly<Vector>;
|
|
@@ -12026,9 +12030,8 @@ export declare const NUM_VANILLA_CARD_TYPES: number;
|
|
|
12026
12030
|
export declare const NUM_VANILLA_COLLECTIBLE_TYPES: number;
|
|
12027
12031
|
|
|
12028
12032
|
/**
|
|
12029
|
-
* Calculated from the `PillEffect` enum.
|
|
12030
|
-
*
|
|
12031
|
-
* (There is no `PillEffect.NULL` in the custom enum, so we do not have to subtract one here.)
|
|
12033
|
+
* Calculated from the `PillEffect` enum. (There is no `PillEffect.NULL` in the custom enum, so we
|
|
12034
|
+
* do not have to subtract one here.)
|
|
12032
12035
|
*/
|
|
12033
12036
|
export declare const NUM_VANILLA_PILL_EFFECTS: number;
|
|
12034
12037
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 24.
|
|
3
|
+
isaacscript-common 24.1.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -17314,6 +17314,8 @@ local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
|
17314
17314
|
local ____enums = require("src.functions.enums")
|
|
17315
17315
|
local getEnumLength = ____enums.getEnumLength
|
|
17316
17316
|
local getLastEnumValue = ____enums.getLastEnumValue
|
|
17317
|
+
local ____utils = require("src.functions.utils")
|
|
17318
|
+
local iRange = ____utils.iRange
|
|
17317
17319
|
____exports.FIRST_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION
|
|
17318
17320
|
____exports.LAST_VANILLA_COLLECTIBLE_TYPE = getLastEnumValue(nil, CollectibleType)
|
|
17319
17321
|
____exports.NUM_VANILLA_COLLECTIBLE_TYPES = getEnumLength(nil, CollectibleType) - 1
|
|
@@ -17330,7 +17332,7 @@ ____exports.FIRST_PILL_COLOR = PillColor.BLUE_BLUE
|
|
|
17330
17332
|
____exports.LAST_NORMAL_PILL_COLOR = PillColor.WHITE_YELLOW
|
|
17331
17333
|
____exports.FIRST_HORSE_PILL_COLOR = PillColor.HORSE_BLUE_BLUE
|
|
17332
17334
|
____exports.LAST_HORSE_PILL_COLOR = PillColor.HORSE_WHITE_YELLOW
|
|
17333
|
-
____exports.NUM_NORMAL_PILL_COLORS = ____exports.
|
|
17335
|
+
____exports.NUM_NORMAL_PILL_COLORS = #iRange(nil, ____exports.FIRST_PILL_COLOR, ____exports.LAST_NORMAL_PILL_COLOR)
|
|
17334
17336
|
____exports.FIRST_CHARACTER = PlayerType.ISAAC
|
|
17335
17337
|
____exports.LAST_VANILLA_CHARACTER = getLastEnumValue(nil, PlayerType)
|
|
17336
17338
|
____exports.FIRST_ROOM_TYPE = RoomType.DEFAULT
|
|
@@ -40587,27 +40589,35 @@ function ____exports.getHeartsUIWidth(self)
|
|
|
40587
40589
|
return width
|
|
40588
40590
|
end
|
|
40589
40591
|
function ____exports.getScreenBottomCenterPos(self)
|
|
40590
|
-
local
|
|
40591
|
-
return Vector(
|
|
40592
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
40593
|
+
return Vector(bottomRightPos.X / 2, bottomRightPos.Y)
|
|
40592
40594
|
end
|
|
40593
40595
|
function ____exports.getScreenBottomLeftPos(self)
|
|
40594
|
-
local
|
|
40595
|
-
return Vector(0,
|
|
40596
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
40597
|
+
return Vector(0, bottomRightPos.Y)
|
|
40598
|
+
end
|
|
40599
|
+
function ____exports.getScreenBottomY(self)
|
|
40600
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
40601
|
+
return bottomRightPos.Y
|
|
40596
40602
|
end
|
|
40597
40603
|
function ____exports.getScreenCenterPos(self)
|
|
40598
|
-
local
|
|
40599
|
-
return
|
|
40604
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
40605
|
+
return bottomRightPos / 2
|
|
40606
|
+
end
|
|
40607
|
+
function ____exports.getScreenRightX(self)
|
|
40608
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
40609
|
+
return bottomRightPos.X
|
|
40600
40610
|
end
|
|
40601
40611
|
function ____exports.getScreenTopCenterPos(self)
|
|
40602
|
-
local
|
|
40603
|
-
return Vector(
|
|
40612
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
40613
|
+
return Vector(bottomRightPos.X / 2, 0)
|
|
40604
40614
|
end
|
|
40605
40615
|
function ____exports.getScreenTopLeftPos(self)
|
|
40606
40616
|
return copyVector(nil, VectorZero)
|
|
40607
40617
|
end
|
|
40608
40618
|
function ____exports.getScreenTopRightPos(self)
|
|
40609
|
-
local
|
|
40610
|
-
return Vector(
|
|
40619
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
40620
|
+
return Vector(bottomRightPos.X, 0)
|
|
40611
40621
|
end
|
|
40612
40622
|
function ____exports.getVisibleHearts(self, player)
|
|
40613
40623
|
local effectiveMaxHearts = player:GetEffectiveMaxHearts()
|
|
@@ -27,9 +27,8 @@ export declare const FIRST_PILL_EFFECT = PillEffect.BAD_GAS;
|
|
|
27
27
|
/** Calculated from the `PillEffect` enum. */
|
|
28
28
|
export declare const LAST_VANILLA_PILL_EFFECT: PillEffect;
|
|
29
29
|
/**
|
|
30
|
-
* Calculated from the `PillEffect` enum.
|
|
31
|
-
*
|
|
32
|
-
* (There is no `PillEffect.NULL` in the custom enum, so we do not have to subtract one here.)
|
|
30
|
+
* Calculated from the `PillEffect` enum. (There is no `PillEffect.NULL` in the custom enum, so we
|
|
31
|
+
* do not have to subtract one here.)
|
|
33
32
|
*/
|
|
34
33
|
export declare const NUM_VANILLA_PILL_EFFECTS: number;
|
|
35
34
|
/** Equal to `PillColor.BLUE_BLUE`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constantsFirstLast.d.ts","sourceRoot":"","sources":["../../../src/core/constantsFirstLast.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACZ,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"constantsFirstLast.d.ts","sourceRoot":"","sources":["../../../src/core/constantsFirstLast.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAQtC,4CAA4C;AAC5C,eAAO,MAAM,sBAAsB,4BAA4B,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,iBAAoC,CAAC;AAE/E,4FAA4F;AAC5F,eAAO,MAAM,6BAA6B,QAAqC,CAAC;AAMhF,8CAA8C;AAC9C,eAAO,MAAM,kBAAkB,8BAA8B,CAAC;AAE9D,8CAA8C;AAC9C,eAAO,MAAM,yBAAyB,aAAgC,CAAC;AAEvE,oFAAoF;AACpF,eAAO,MAAM,yBAAyB,QAAiC,CAAC;AAMxE,4BAA4B;AAC5B,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAE7C,uCAAuC;AACvC,eAAO,MAAM,sBAAsB,UAA6B,CAAC;AAEjE,oEAAoE;AACpE,eAAO,MAAM,sBAAsB,QAA8B,CAAC;AAMlE,qCAAqC;AACrC,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AAEpD,6CAA6C;AAC7C,eAAO,MAAM,wBAAwB,YAA+B,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,wBAAwB,QAA4B,CAAC;AAMlE,sCAAsC;AACtC,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAE7D,4CAA4C;AAC5C,eAAO,MAAM,sBAAsB,4BAA4B,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,+BAA+B,CAAC;AAElE,eAAO,MAAM,sBAAsB,QAG3B,CAAC;AAMT,mCAAmC;AACnC,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAIhD,6CAA6C;AAC7C,eAAO,MAAM,sBAAsB,YAA+B,CAAC;AAMnE,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAChD,eAAO,MAAM,cAAc,UAA6B,CAAC;AAMzD,eAAO,MAAM,WAAW,wBAAwB,CAAC;AACjD,eAAO,MAAM,UAAU,YAA+B,CAAC"}
|
|
@@ -11,6 +11,8 @@ local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
|
11
11
|
local ____enums = require("src.functions.enums")
|
|
12
12
|
local getEnumLength = ____enums.getEnumLength
|
|
13
13
|
local getLastEnumValue = ____enums.getLastEnumValue
|
|
14
|
+
local ____utils = require("src.functions.utils")
|
|
15
|
+
local iRange = ____utils.iRange
|
|
14
16
|
--- Equal to `CollectibleType.SAD_ONION`.
|
|
15
17
|
____exports.FIRST_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION
|
|
16
18
|
--- Calculated from the `CollectibleType` enum.
|
|
@@ -36,9 +38,8 @@ ____exports.NUM_VANILLA_CARD_TYPES = getEnumLength(nil, CardType) - 1
|
|
|
36
38
|
____exports.FIRST_PILL_EFFECT = PillEffect.BAD_GAS
|
|
37
39
|
--- Calculated from the `PillEffect` enum.
|
|
38
40
|
____exports.LAST_VANILLA_PILL_EFFECT = getLastEnumValue(nil, PillEffect)
|
|
39
|
-
--- Calculated from the `PillEffect` enum.
|
|
40
|
-
--
|
|
41
|
-
-- (There is no `PillEffect.NULL` in the custom enum, so we do not have to subtract one here.)
|
|
41
|
+
--- Calculated from the `PillEffect` enum. (There is no `PillEffect.NULL` in the custom enum, so we
|
|
42
|
+
-- do not have to subtract one here.)
|
|
42
43
|
____exports.NUM_VANILLA_PILL_EFFECTS = getEnumLength(nil, PillEffect)
|
|
43
44
|
--- Equal to `PillColor.BLUE_BLUE`.
|
|
44
45
|
____exports.FIRST_PILL_COLOR = PillColor.BLUE_BLUE
|
|
@@ -54,7 +55,7 @@ ____exports.FIRST_HORSE_PILL_COLOR = PillColor.HORSE_BLUE_BLUE
|
|
|
54
55
|
-- Note that `PillColor.HORSE_GOLD` is technically higher, but that is not considered for the
|
|
55
56
|
-- purposes of this constant.
|
|
56
57
|
____exports.LAST_HORSE_PILL_COLOR = PillColor.HORSE_WHITE_YELLOW
|
|
57
|
-
____exports.NUM_NORMAL_PILL_COLORS = ____exports.
|
|
58
|
+
____exports.NUM_NORMAL_PILL_COLORS = #iRange(nil, ____exports.FIRST_PILL_COLOR, ____exports.LAST_NORMAL_PILL_COLOR)
|
|
58
59
|
--- Equal to `PlayerType.ISAAC`.
|
|
59
60
|
____exports.FIRST_CHARACTER = PlayerType.ISAAC
|
|
60
61
|
--- Calculated from the `PlayerType` enum.
|
|
@@ -26,7 +26,9 @@ export declare function getHeartsUIWidth(): int;
|
|
|
26
26
|
export declare function getScreenBottomCenterPos(): Readonly<Vector>;
|
|
27
27
|
export declare function getScreenBottomLeftPos(): Readonly<Vector>;
|
|
28
28
|
export declare function getScreenBottomRightPos(): Readonly<Vector>;
|
|
29
|
+
export declare function getScreenBottomY(): float;
|
|
29
30
|
export declare function getScreenCenterPos(): Readonly<Vector>;
|
|
31
|
+
export declare function getScreenRightX(): float;
|
|
30
32
|
export declare function getScreenTopCenterPos(): Readonly<Vector>;
|
|
31
33
|
export declare function getScreenTopLeftPos(): Readonly<Vector>;
|
|
32
34
|
export declare function getScreenTopRightPos(): Readonly<Vector>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/functions/ui.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAmBrD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAU3D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,GAAG,CAgCtC;AAED,wBAAgB,wBAAwB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAG3D;AAED,wBAAgB,sBAAsB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGzD;AAED,wBAAgB,uBAAuB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAK1D;AAED,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGrD;AAED,wBAAgB,qBAAqB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGxD;AAED,wBAAgB,mBAAmB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAEtD;AAED,wBAAgB,oBAAoB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAa1D"}
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../src/functions/ui.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAmBrD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAU3D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,GAAG,CAgCtC;AAED,wBAAgB,wBAAwB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAG3D;AAED,wBAAgB,sBAAsB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGzD;AAED,wBAAgB,uBAAuB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAK1D;AAED,wBAAgB,gBAAgB,IAAI,KAAK,CAGxC;AAED,wBAAgB,kBAAkB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGrD;AAED,wBAAgB,eAAe,IAAI,KAAK,CAGvC;AAED,wBAAgB,qBAAqB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGxD;AAED,wBAAgB,mBAAmB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAEtD;AAED,wBAAgB,oBAAoB,IAAI,QAAQ,CAAC,MAAM,CAAC,CAGvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAa1D"}
|
|
@@ -79,27 +79,35 @@ function ____exports.getHeartsUIWidth(self)
|
|
|
79
79
|
return width
|
|
80
80
|
end
|
|
81
81
|
function ____exports.getScreenBottomCenterPos(self)
|
|
82
|
-
local
|
|
83
|
-
return Vector(
|
|
82
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
83
|
+
return Vector(bottomRightPos.X / 2, bottomRightPos.Y)
|
|
84
84
|
end
|
|
85
85
|
function ____exports.getScreenBottomLeftPos(self)
|
|
86
|
-
local
|
|
87
|
-
return Vector(0,
|
|
86
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
87
|
+
return Vector(0, bottomRightPos.Y)
|
|
88
|
+
end
|
|
89
|
+
function ____exports.getScreenBottomY(self)
|
|
90
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
91
|
+
return bottomRightPos.Y
|
|
88
92
|
end
|
|
89
93
|
function ____exports.getScreenCenterPos(self)
|
|
90
|
-
local
|
|
91
|
-
return
|
|
94
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
95
|
+
return bottomRightPos / 2
|
|
96
|
+
end
|
|
97
|
+
function ____exports.getScreenRightX(self)
|
|
98
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
99
|
+
return bottomRightPos.X
|
|
92
100
|
end
|
|
93
101
|
function ____exports.getScreenTopCenterPos(self)
|
|
94
|
-
local
|
|
95
|
-
return Vector(
|
|
102
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
103
|
+
return Vector(bottomRightPos.X / 2, 0)
|
|
96
104
|
end
|
|
97
105
|
function ____exports.getScreenTopLeftPos(self)
|
|
98
106
|
return copyVector(nil, VectorZero)
|
|
99
107
|
end
|
|
100
108
|
function ____exports.getScreenTopRightPos(self)
|
|
101
|
-
local
|
|
102
|
-
return Vector(
|
|
109
|
+
local bottomRightPos = ____exports.getScreenBottomRightPos(nil)
|
|
110
|
+
return Vector(bottomRightPos.X, 0)
|
|
103
111
|
end
|
|
104
112
|
--- Get how many hearts are currently being shown on the hearts UI.
|
|
105
113
|
--
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
TrinketType,
|
|
12
12
|
} from "isaac-typescript-definitions";
|
|
13
13
|
import { getEnumLength, getLastEnumValue } from "../functions/enums";
|
|
14
|
+
import { iRange } from "../functions/utils";
|
|
14
15
|
|
|
15
16
|
// ------------
|
|
16
17
|
// Collectibles
|
|
@@ -67,9 +68,8 @@ export const FIRST_PILL_EFFECT = PillEffect.BAD_GAS;
|
|
|
67
68
|
export const LAST_VANILLA_PILL_EFFECT = getLastEnumValue(PillEffect);
|
|
68
69
|
|
|
69
70
|
/**
|
|
70
|
-
* Calculated from the `PillEffect` enum.
|
|
71
|
-
*
|
|
72
|
-
* (There is no `PillEffect.NULL` in the custom enum, so we do not have to subtract one here.)
|
|
71
|
+
* Calculated from the `PillEffect` enum. (There is no `PillEffect.NULL` in the custom enum, so we
|
|
72
|
+
* do not have to subtract one here.)
|
|
73
73
|
*/
|
|
74
74
|
export const NUM_VANILLA_PILL_EFFECTS = getEnumLength(PillEffect);
|
|
75
75
|
|
|
@@ -99,7 +99,10 @@ export const FIRST_HORSE_PILL_COLOR = PillColor.HORSE_BLUE_BLUE;
|
|
|
99
99
|
*/
|
|
100
100
|
export const LAST_HORSE_PILL_COLOR = PillColor.HORSE_WHITE_YELLOW;
|
|
101
101
|
|
|
102
|
-
export const NUM_NORMAL_PILL_COLORS =
|
|
102
|
+
export const NUM_NORMAL_PILL_COLORS = iRange(
|
|
103
|
+
FIRST_PILL_COLOR,
|
|
104
|
+
LAST_NORMAL_PILL_COLOR,
|
|
105
|
+
).length;
|
|
103
106
|
|
|
104
107
|
// -------
|
|
105
108
|
// Players
|
package/src/functions/ui.ts
CHANGED
|
@@ -90,13 +90,13 @@ export function getHeartsUIWidth(): int {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
export function getScreenBottomCenterPos(): Readonly<Vector> {
|
|
93
|
-
const
|
|
94
|
-
return Vector(
|
|
93
|
+
const bottomRightPos = getScreenBottomRightPos();
|
|
94
|
+
return Vector(bottomRightPos.X / 2, bottomRightPos.Y);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
export function getScreenBottomLeftPos(): Readonly<Vector> {
|
|
98
|
-
const
|
|
99
|
-
return Vector(0,
|
|
98
|
+
const bottomRightPos = getScreenBottomRightPos();
|
|
99
|
+
return Vector(0, bottomRightPos.Y);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
export function getScreenBottomRightPos(): Readonly<Vector> {
|
|
@@ -106,14 +106,24 @@ export function getScreenBottomRightPos(): Readonly<Vector> {
|
|
|
106
106
|
return Vector(screenWidth, screenHeight);
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
export function getScreenBottomY(): float {
|
|
110
|
+
const bottomRightPos = getScreenBottomRightPos();
|
|
111
|
+
return bottomRightPos.Y;
|
|
112
|
+
}
|
|
113
|
+
|
|
109
114
|
export function getScreenCenterPos(): Readonly<Vector> {
|
|
110
|
-
const
|
|
111
|
-
return
|
|
115
|
+
const bottomRightPos = getScreenBottomRightPos();
|
|
116
|
+
return bottomRightPos.div(2);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function getScreenRightX(): float {
|
|
120
|
+
const bottomRightPos = getScreenBottomRightPos();
|
|
121
|
+
return bottomRightPos.X;
|
|
112
122
|
}
|
|
113
123
|
|
|
114
124
|
export function getScreenTopCenterPos(): Readonly<Vector> {
|
|
115
|
-
const
|
|
116
|
-
return Vector(
|
|
125
|
+
const bottomRightPos = getScreenBottomRightPos();
|
|
126
|
+
return Vector(bottomRightPos.X / 2, 0);
|
|
117
127
|
}
|
|
118
128
|
|
|
119
129
|
export function getScreenTopLeftPos(): Readonly<Vector> {
|
|
@@ -121,8 +131,8 @@ export function getScreenTopLeftPos(): Readonly<Vector> {
|
|
|
121
131
|
}
|
|
122
132
|
|
|
123
133
|
export function getScreenTopRightPos(): Readonly<Vector> {
|
|
124
|
-
const
|
|
125
|
-
return Vector(
|
|
134
|
+
const bottomRightPos = getScreenBottomRightPos();
|
|
135
|
+
return Vector(bottomRightPos.X, 0);
|
|
126
136
|
}
|
|
127
137
|
|
|
128
138
|
/**
|