TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ AI_156_BatOfLight()

void Terraria.Projectile.AI_156_BatOfLight ( )
inlineprivate

Definition at line 54071 of file Projectile.cs.

54072 {
54073 //IL_0052: Unknown result type (might be due to invalid IL or missing references)
54074 //IL_0057: Unknown result type (might be due to invalid IL or missing references)
54075 //IL_005b: Unknown result type (might be due to invalid IL or missing references)
54076 //IL_0060: Unknown result type (might be due to invalid IL or missing references)
54077 //IL_0066: Unknown result type (might be due to invalid IL or missing references)
54078 //IL_006b: Unknown result type (might be due to invalid IL or missing references)
54079 //IL_0070: Unknown result type (might be due to invalid IL or missing references)
54080 //IL_0071: Unknown result type (might be due to invalid IL or missing references)
54081 //IL_0077: Unknown result type (might be due to invalid IL or missing references)
54082 //IL_0122: Unknown result type (might be due to invalid IL or missing references)
54083 //IL_0127: Unknown result type (might be due to invalid IL or missing references)
54084 //IL_012b: Unknown result type (might be due to invalid IL or missing references)
54085 //IL_0130: Unknown result type (might be due to invalid IL or missing references)
54086 //IL_0136: Unknown result type (might be due to invalid IL or missing references)
54087 //IL_013b: Unknown result type (might be due to invalid IL or missing references)
54088 //IL_0140: Unknown result type (might be due to invalid IL or missing references)
54089 //IL_0142: Unknown result type (might be due to invalid IL or missing references)
54090 //IL_0149: Unknown result type (might be due to invalid IL or missing references)
54092 Player player = Main.player[owner];
54093 bool num3 = type == 755;
54094 bool flag = type == 946;
54095 Color val;
54096 if (num3)
54097 {
54098 if (player.dead)
54099 {
54100 player.batsOfLight = false;
54101 }
54102 if (player.batsOfLight)
54103 {
54104 timeLeft = 2;
54105 }
54106 val = AI_156_GetColor();
54107 DelegateMethods.v3_1 = ((Color)(ref val)).ToVector3();
54108 Point point = base.Center.ToTileCoordinates();
54109 DelegateMethods.CastLightOpen(point.X, point.Y);
54110 if (++frameCounter >= 6)
54111 {
54112 frameCounter = 0;
54113 if (++frame >= Main.projFrames[type] - 1)
54114 {
54115 frame = 0;
54116 }
54117 }
54118 int num2 = player.direction;
54119 if (velocity.X != 0f)
54120 {
54121 num2 = Math.Sign(velocity.X);
54122 }
54124 }
54125 if (flag)
54126 {
54127 if (player.dead)
54128 {
54129 player.empressBlade = false;
54130 }
54131 if (player.empressBlade)
54132 {
54133 timeLeft = 2;
54134 }
54135 val = AI_156_GetColor();
54136 DelegateMethods.v3_1 = ((Color)(ref val)).ToVector3();
54137 Point point2 = base.Center.ToTileCoordinates();
54138 DelegateMethods.CastLightOpen(point2.X, point2.Y);
54139 }
54142 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
static List< int > _ai156_blacklistedTargets
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
void AI_156_Think(List< int > blacklist)
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
int timeLeft
Time in ticks before this projectile will naturally despawn. Each update timeLeft is decreased by 1...
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.

References Terraria.Player.batsOfLight, Terraria.DelegateMethods.CastLightOpen(), Terraria.Player.dead, Terraria.Entity.direction, Terraria.Player.empressBlade, Terraria.Main.player, and Terraria.Main.projFrames.

+ Here is the call graph for this function: