TModLoader
v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches
ShimmerUnstuckHelper.cs
Go to the documentation of this file.
1
using
Terraria.GameContent.Drawing
;
2
3
namespace
Terraria.GameContent
;
4
5
public
struct
ShimmerUnstuckHelper
6
{
7
public
int
TimeLeftUnstuck
;
8
9
public
bool
IndefiniteProtectionActive
;
10
11
public
bool
ShouldUnstuck
12
{
13
get
14
{
15
if
(!
IndefiniteProtectionActive
)
16
{
17
return
TimeLeftUnstuck
> 0;
18
}
19
return
true
;
20
}
21
}
22
23
public
void
Update
(
Player
player)
24
{
25
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
26
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
27
bool
flag
= !player.shimmering && !player.
shimmerWet
;
28
if
(
flag
)
29
{
30
IndefiniteProtectionActive
=
false
;
31
}
32
if
(
TimeLeftUnstuck
> 0 && !
flag
)
33
{
34
StartUnstuck
();
35
}
36
if
(!
IndefiniteProtectionActive
&&
TimeLeftUnstuck
> 0)
37
{
38
TimeLeftUnstuck
--;
39
if
(
TimeLeftUnstuck
== 0)
40
{
41
ParticleOrchestrator
.
BroadcastOrRequestParticleSpawn
(
ParticleOrchestraType
.ShimmerTownNPC,
new
ParticleOrchestraSettings
42
{
43
PositionInWorld = player.Bottom
44
});
45
}
46
}
47
}
48
49
public
void
StartUnstuck
()
50
{
51
IndefiniteProtectionActive
=
true
;
52
TimeLeftUnstuck
= 120;
53
}
54
55
public
void
Clear
()
56
{
57
IndefiniteProtectionActive
=
false
;
58
TimeLeftUnstuck
= 0;
59
}
60
}
List
Terraria.Entity.shimmerWet
bool shimmerWet
Definition
Entity.cs:59
Terraria.GameContent.Drawing.ParticleOrchestrator.BroadcastOrRequestParticleSpawn
static void BroadcastOrRequestParticleSpawn(ParticleOrchestraType type, ParticleOrchestraSettings settings)
Definition
ParticleOrchestrator.cs:51
Terraria.GameContent.Drawing.ParticleOrchestrator
Definition
ParticleOrchestrator.cs:13
Terraria.Player
Definition
Player.cs:51
Terraria.GameContent.Drawing.ParticleOrchestraType
ParticleOrchestraType
Definition
ParticleOrchestraType.cs:4
Terraria.GameContent.Drawing
Definition
ParticleOrchestraSettings.cs:4
Terraria.GameContent
Definition
AchievementsHelper.cs:3
Terraria.GameContent.Drawing.ParticleOrchestraSettings
Definition
ParticleOrchestraSettings.cs:7
Terraria.GameContent.ShimmerUnstuckHelper.ShouldUnstuck
bool ShouldUnstuck
Definition
ShimmerUnstuckHelper.cs:12
Terraria.GameContent.ShimmerUnstuckHelper.Update
void Update(Player player)
Definition
ShimmerUnstuckHelper.cs:23
Terraria.GameContent.ShimmerUnstuckHelper.TimeLeftUnstuck
int TimeLeftUnstuck
Definition
ShimmerUnstuckHelper.cs:7
Terraria.GameContent.ShimmerUnstuckHelper.StartUnstuck
void StartUnstuck()
Definition
ShimmerUnstuckHelper.cs:49
Terraria.GameContent.ShimmerUnstuckHelper.Clear
void Clear()
Definition
ShimmerUnstuckHelper.cs:55
Terraria.GameContent.ShimmerUnstuckHelper.IndefiniteProtectionActive
bool IndefiniteProtectionActive
Definition
ShimmerUnstuckHelper.cs:9
Terraria.GameContent.ShimmerUnstuckHelper
Definition
ShimmerUnstuckHelper.cs:6
source
Terraria.GameContent
ShimmerUnstuckHelper.cs
Generated by
1.10.0