TModLoader
v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches
◆
MoveTowards()
static Vector2 Terraria.Utils.MoveTowards
(
this
Vector2
currentPosition
,
Vector2
targetPosition
,
float
maxAmountAllowedToMove
)
inline
static
Definition at line
1596
of file
Utils.cs
.
1597
{
1598
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
1599
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
1600
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
1601
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
1602
//IL_0014: Unknown result type (might be due to invalid IL or missing references)
1603
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
1604
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
1605
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
1606
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
1607
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
1608
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
1609
Vector2 v =
targetPosition
-
currentPosition
;
1610
if
(((Vector2)(
ref
v)).Length() <
maxAmountAllowedToMove
)
1611
{
1612
return
targetPosition
;
1613
}
1614
return
currentPosition
+ v.SafeNormalize(Vector2.Zero) *
maxAmountAllowedToMove
;
1615
}
List
Terraria
Utils
Generated by
1.10.0