Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
◆
GetZenithTarget()
bool
Terraria.Player.GetZenithTarget
(
Vector2
searchCenter
,
float
maxDistance
,
out
int
npcTargetIndex
)
inline
private
Definition at line
44433
of file
Player.cs
.
44434
{
44435
npcTargetIndex
= 0;
44436
int
? num =
null
;
44437
float
num2
=
maxDistance
;
44438
for
(
int
i = 0;
i
< 200;
i
++)
44439
{
44440
NPC
nPC
= Main.npc[
i
];
44441
if
(
nPC
.CanBeChasedBy(
this
))
44442
{
44443
float
num3
=
searchCenter
.Distance(
nPC
.Center);
44444
if
(!(
num2
<=
num3
))
44445
{
44446
num =
i
;
44447
num2
=
num3
;
44448
}
44449
}
44450
}
44451
if
(!num.HasValue)
44452
{
44453
return
false
;
44454
}
44455
npcTargetIndex
= num.Value;
44456
return
true
;
44457
}
System.Collections.Generic.Dictionary
Definition
Dictionary.cs:14
System.Text.RegularExpressions.ExceptionArgument.i
@ i
Terraria.Enums.NPCTargetType.NPC
@ NPC
References
Terraria.Main.npc
.
Terraria
Player
Generated by
1.10.0