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

◆ AI_143_MonkStaffT2Ghast()

void Terraria.Projectile.AI_143_MonkStaffT2Ghast ( )
inlineprivate

Definition at line 77163 of file Projectile.cs.

77164 {
77165 //IL_001c: Unknown result type (might be due to invalid IL or missing references)
77166 //IL_0063: Unknown result type (might be due to invalid IL or missing references)
77167 //IL_00e2: Unknown result type (might be due to invalid IL or missing references)
77168 //IL_00ec: Unknown result type (might be due to invalid IL or missing references)
77169 //IL_00f1: Unknown result type (might be due to invalid IL or missing references)
77170 //IL_0168: Unknown result type (might be due to invalid IL or missing references)
77171 //IL_01b7: Unknown result type (might be due to invalid IL or missing references)
77172 //IL_01bc: Unknown result type (might be due to invalid IL or missing references)
77173 //IL_01c1: Unknown result type (might be due to invalid IL or missing references)
77174 //IL_01c6: Unknown result type (might be due to invalid IL or missing references)
77175 //IL_01e7: Unknown result type (might be due to invalid IL or missing references)
77176 //IL_0203: Unknown result type (might be due to invalid IL or missing references)
77177 //IL_0209: Unknown result type (might be due to invalid IL or missing references)
77178 //IL_0216: Unknown result type (might be due to invalid IL or missing references)
77179 //IL_021c: Unknown result type (might be due to invalid IL or missing references)
77180 //IL_0221: Unknown result type (might be due to invalid IL or missing references)
77181 //IL_0228: Unknown result type (might be due to invalid IL or missing references)
77182 //IL_022d: Unknown result type (might be due to invalid IL or missing references)
77183 //IL_024c: Unknown result type (might be due to invalid IL or missing references)
77184 //IL_0252: Unknown result type (might be due to invalid IL or missing references)
77185 //IL_0254: Unknown result type (might be due to invalid IL or missing references)
77186 //IL_025e: Unknown result type (might be due to invalid IL or missing references)
77187 //IL_0263: Unknown result type (might be due to invalid IL or missing references)
77188 //IL_0268: Unknown result type (might be due to invalid IL or missing references)
77189 //IL_028b: Unknown result type (might be due to invalid IL or missing references)
77190 //IL_0290: Unknown result type (might be due to invalid IL or missing references)
77191 //IL_0296: Unknown result type (might be due to invalid IL or missing references)
77192 //IL_029b: Unknown result type (might be due to invalid IL or missing references)
77193 //IL_02a0: Unknown result type (might be due to invalid IL or missing references)
77194 if (ai[0] == 0f)
77195 {
77197 }
77199 if (activeSound == null)
77200 {
77201 localAI[1] = SlotId.Invalid.ToFloat();
77202 }
77203 else
77204 {
77205 activeSound.Position = base.Center;
77206 }
77207 ai[0] += 1f;
77208 if (ai[0] > 50f)
77209 {
77210 alpha += 25;
77211 if (alpha > 255)
77212 {
77213 alpha = 255;
77214 }
77215 }
77216 else
77217 {
77218 alpha -= 25;
77219 if (alpha < 100)
77220 {
77221 alpha = 100;
77222 }
77223 }
77224 velocity *= 0.98f;
77225 if (++frameCounter >= 5)
77226 {
77227 frameCounter = 0;
77228 if (++frame >= 4)
77229 {
77230 frame = 0;
77231 }
77232 }
77233 if (ai[0] >= 60f)
77234 {
77235 Kill();
77236 }
77237 direction = (spriteDirection = ((velocity.X > 0f) ? 1 : (-1)));
77238 rotation = velocity.ToRotation();
77239 if (spriteDirection == -1)
77240 {
77241 rotation += (float)Math.PI;
77242 }
77243 if (ai[0] >= 10f && ai[0] < 34f)
77244 {
77245 Vector2 vector = velocity.SafeNormalize(Vector2.UnitY);
77246 float num = ai[0] / 60f;
77247 float num2 = 2f;
77248 for (int i = 0; (float)i < num2; i++)
77249 {
77250 Dust dust = Dust.NewDustDirect(base.Center, 14, 14, 228, 0f, 0f, 110);
77251 dust.velocity = vector * 2f;
77252 dust.position = base.Center + vector.RotatedBy(num * ((float)Math.PI * 2f) * 2f + (float)i / num2 * ((float)Math.PI * 2f)) * 7f;
77253 dust.scale = 1f + 0.6f * Main.rand.NextFloat();
77254 dust.velocity += vector * 3f;
77255 dust.noGravity = true;
77256 }
77257 }
77258 }
static ? ActiveSound GetActiveSound(SlotId slotId)
static SlotId PlayTrackedSound(in SoundStyle style, Vector2? position=null)
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
static readonly SoundStyle DD2_GhastlyGlaiveImpactGhost
Definition SoundID.cs:209
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
int alpha
How transparent to draw this projectile. 0 to 255. 255 is completely transparent. ExampleBulletsets...
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.

References Terraria.ID.SoundID.DD2_GhastlyGlaiveImpactGhost, Terraria.Audio.SoundEngine.GetActiveSound(), Terraria.Dust.NewDustDirect(), Terraria.Audio.SoundEngine.PlayTrackedSound(), and Terraria.Main.rand.

+ Here is the call graph for this function: