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

◆ ThrowPieces()

static void Terraria.GameContent.Events.MoonlordDeathDrama.ThrowPieces ( Vector2 MoonlordCoreCenter,
int DramaSeed )
inlinestatic

Definition at line 241 of file MoonlordDeathDrama.cs.

242 {
244 Vector2 vector = Vector2.UnitY.RotatedBy(r.NextFloat() * ((float)Math.PI / 2f) - (float)Math.PI / 4f + (float)Math.PI);
245 _pieces.Add(new MoonlordPiece(Main.Assets.Request<Texture2D>("Images/Misc/MoonExplosion/Spine", (AssetRequestMode)1).Value, new Vector2(64f, 150f), MoonlordCoreCenter + new Vector2(0f, 50f), vector * 6f, 0f, r.NextFloat() * 0.1f - 0.05f));
246 vector = Vector2.UnitY.RotatedBy(r.NextFloat() * ((float)Math.PI / 2f) - (float)Math.PI / 4f + (float)Math.PI);
247 _pieces.Add(new MoonlordPiece(Main.Assets.Request<Texture2D>("Images/Misc/MoonExplosion/Shoulder", (AssetRequestMode)1).Value, new Vector2(40f, 120f), MoonlordCoreCenter + new Vector2(50f, -120f), vector * 10f, 0f, r.NextFloat() * 0.1f - 0.05f));
248 vector = Vector2.UnitY.RotatedBy(r.NextFloat() * ((float)Math.PI / 2f) - (float)Math.PI / 4f + (float)Math.PI);
249 _pieces.Add(new MoonlordPiece(Main.Assets.Request<Texture2D>("Images/Misc/MoonExplosion/Torso", (AssetRequestMode)1).Value, new Vector2(192f, 252f), MoonlordCoreCenter, vector * 8f, 0f, r.NextFloat() * 0.1f - 0.05f));
250 vector = Vector2.UnitY.RotatedBy(r.NextFloat() * ((float)Math.PI / 2f) - (float)Math.PI / 4f + (float)Math.PI);
251 _pieces.Add(new MoonlordPiece(Main.Assets.Request<Texture2D>("Images/Misc/MoonExplosion/Head", (AssetRequestMode)1).Value, new Vector2(138f, 185f), MoonlordCoreCenter - new Vector2(0f, 200f), vector * 12f, 0f, r.NextFloat() * 0.1f - 0.05f));
252 }
const double PI
Definition Math.cs:16

References Terraria.GameContent.Events.MoonlordDeathDrama._pieces, Terraria.Main.Assets, System.Math.PI, Microsoft.Xna.Framework.Vector2.UnitY, and Microsoft.Xna.Framework.Graphics.Vector2.

Referenced by Terraria.NPC.HitEffect().