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

◆ AI_188_LightsBane()

void Terraria.Projectile.AI_188_LightsBane ( )
inlineprivate

Definition at line 43428 of file Projectile.cs.

43429 {
43430 //IL_001a: Unknown result type (might be due to invalid IL or missing references)
43431 //IL_00aa: Unknown result type (might be due to invalid IL or missing references)
43432 //IL_00cc: Unknown result type (might be due to invalid IL or missing references)
43433 //IL_00d1: Unknown result type (might be due to invalid IL or missing references)
43434 //IL_00fe: Unknown result type (might be due to invalid IL or missing references)
43435 //IL_0103: Unknown result type (might be due to invalid IL or missing references)
43436 //IL_0105: Unknown result type (might be due to invalid IL or missing references)
43437 //IL_010a: Unknown result type (might be due to invalid IL or missing references)
43438 //IL_0110: Unknown result type (might be due to invalid IL or missing references)
43439 //IL_0115: Unknown result type (might be due to invalid IL or missing references)
43440 //IL_0117: Unknown result type (might be due to invalid IL or missing references)
43441 //IL_011c: Unknown result type (might be due to invalid IL or missing references)
43442 //IL_012f: Unknown result type (might be due to invalid IL or missing references)
43443 //IL_0139: Unknown result type (might be due to invalid IL or missing references)
43444 //IL_0153: Unknown result type (might be due to invalid IL or missing references)
43445 //IL_0159: Unknown result type (might be due to invalid IL or missing references)
43446 //IL_015b: Unknown result type (might be due to invalid IL or missing references)
43447 //IL_0165: Unknown result type (might be due to invalid IL or missing references)
43448 //IL_0174: Unknown result type (might be due to invalid IL or missing references)
43449 //IL_0187: Unknown result type (might be due to invalid IL or missing references)
43450 if (soundDelay == 0)
43451 {
43452 soundDelay = -1;
43453 SoundEffectInstance soundEffectInstance = SoundEngine.PlaySound((SoundStyle?)SoundID.Item60, (Vector2?)base.Center);
43454 if (soundEffectInstance != null)
43455 {
43456 soundEffectInstance.Volume *= 0.15f * ai[0];
43457 }
43458 }
43459 scale = ai[0];
43460 localAI[0] += 1f;
43461 if (++frameCounter >= 3)
43462 {
43463 frameCounter = 0;
43464 if (++frame >= 12)
43465 {
43466 Kill();
43467 return;
43468 }
43469 }
43470 rotation = velocity.ToRotation();
43471 float f = rotation;
43472 float num = 46f * scale;
43473 Vector2 vector = f.ToRotationVector2();
43474 float num2 = localAI[0] / 36f * 4f;
43475 if (num2 >= 0f && num2 <= 1f)
43476 {
43477 Dust dust = Dust.NewDustPerfect(Vector2.Lerp(base.Center - vector * num, base.Center + vector * num, localAI[0] / 36f), 278, vector.RotatedBy((float)Math.PI * 2f * Main.rand.NextFloatDirection() * 0.02f) * 8f * Main.rand.NextFloat(), 0, new Color(60, 0, 150), 0.7f * num2);
43478 dust.noGravity = true;
43479 dust.noLight = (dust.noLightEmittence = true);
43480 }
43481 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
static readonly SoundStyle Item60
Definition SoundID.cs:797
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.
float scale
Scales how large the projectile will be drawn. Will also affect the hitbox (F:Terraria....
This data type describes in detail how a sound should be played. Passable to the M:Terraria....
Definition SoundStyle.cs:19

References Terraria.ID.SoundID.Item60, Terraria.Dust.NewDustPerfect(), Terraria.Audio.SoundEngine.PlaySound(), and Terraria.Main.rand.

+ Here is the call graph for this function: