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

◆ PlaySegment_SantaItemExample()

SegmentInforReport Terraria.GameContent.Skies.CreditsRoll.CreditsRollComposer.PlaySegment_SantaItemExample ( int startTime,
Vector2 sceneAnchorPosition )
inlineprivate

Definition at line 838 of file CreditsRollComposer.cs.

839 {
841 int num = 0;
842 for (int i = 0; i < num; i++)
843 {
844 int num2 = Main.rand.NextFromList(new short[4] { 599, 1958, 3749, 1869 });
845 Main.instance.LoadItem(num2);
846 Asset<Texture2D> val = TextureAssets.Item[num2];
847 DrawData data = new DrawData(val.Value, Vector2.Zero, null, Color.White, 0f, val.Size() / 2f, 1f, SpriteEffects.None);
848 Vector2 initialVelocity = Vector2.UnitY * -12f + Main.rand.NextVector2Circular(6f, 3f).RotatedBy((float)(i - num / 2) * ((float)Math.PI * 2f) * 0.1f);
849 Vector2 gravityPerFrame = Vector2.UnitY * 0.2f;
852 }
854 .Then(new Actions.NPCs.Wait(10))
855 .Then(new Actions.NPCs.ShowItem(30, 2))
856 .Then(new Actions.NPCs.Wait(10));
858 SegmentInforReport result = default(SegmentInforReport);
859 result.totalTime = 170;
860 return result;
861 }
const double PI
Definition Math.cs:16
AnimationSegmentWithActions< T > Then(IAnimationSegmentAction< T > act)
Definition Segments.cs:94

References Terraria.GameContent.Skies.CreditsRoll.CreditsRollComposer._originAtBottom, Terraria.GameContent.Skies.CreditsRoll.CreditsRollComposer._segments, System.Collections.Generic.List< T >.Add(), Terraria.GameContent.Skies.CreditsRoll.CreditsRollComposer.GetSceneFixVector(), Terraria.Main.instance, System.item, Terraria.GameContent.TextureAssets.Item, System.Math.PI, Terraria.Main.rand, Terraria.GameContent.Animations.Segments.AnimationSegmentWithActions< T >.Then(), Microsoft.Xna.Framework.Color.White, and Microsoft.Xna.Framework.Vector2.Zero.