Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
◆
TryAllowingSnappingToPosition()
void
Terraria.Player.TryAllowingSnappingToPosition
(
ref
bool
canSnapToPosition
,
Vector2
pos1
,
Vector2
pos2
)
inline
private
Definition at line
31186
of file
Player.cs
.
31187
{
31188
Vector2
vector
=
new
Vector2
(
width
- 2, 0f);
31189
canSnapToPosition
= Collision.CanHit(
pos1
+
vector
, 2,
height
,
pos2
, 2,
height
);
31190
if
(!
canSnapToPosition
)
31191
{
31192
canSnapToPosition
= Collision.CanHit(
pos1
+
vector
, 2,
height
,
pos2
+
vector
, 2,
height
);
31193
}
31194
if
(!
canSnapToPosition
)
31195
{
31196
canSnapToPosition
= Collision.CanHit(
pos1
, 2,
height
,
pos2
, 2,
height
);
31197
}
31198
if
(!
canSnapToPosition
)
31199
{
31200
canSnapToPosition
= Collision.CanHit(
pos1
, 2,
height
,
pos2
+
vector
, 2,
height
);
31201
}
31202
}
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
Terraria.Entity.width
int width
Definition
Entity.cs:26
Terraria.Entity.height
int height
Definition
Entity.cs:28
Microsoft.Xna.Framework.Vector2
Definition
Vector2.cs:12
References
Terraria.Collision.CanHit()
.
Terraria
Player
Generated by
1.10.0