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

◆ PlaySegment_DryadTurningToTree()

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

Definition at line 769 of file CreditsRollComposer.cs.

770 {
772 int num = startTime;
773 Asset<Texture2D> val = TextureAssets.Extra[217];
774 Rectangle rectangle = val.Frame();
775 DrawData data = new DrawData(val.Value, Vector2.Zero, rectangle, Color.White, 0f, rectangle.Size() * new Vector2(0.5f, 1f) + new Vector2(0f, -42f), 1f, SpriteEffects.None);
778 .Then(new Actions.NPCs.Wait(10))
779 .Then(new Actions.NPCs.Fade(0));
780 num += (int)animationSegmentWithActions2.DedicatedTimeNeeded;
781 Asset<Texture2D> val2 = TextureAssets.Extra[215];
782 Rectangle rectangle2 = val2.Frame(1, 9);
783 DrawData data2 = new DrawData(val2.Value, Vector2.Zero, rectangle2, Color.White, 0f, rectangle2.Size() * new Vector2(0.5f, 1f), 1f, SpriteEffects.FlipHorizontally);
784 Vector2 vector = new Vector2(1f, 0f) * 60f + new Vector2(2f, 4f);
786 {
787 new Point(0, 0),
788 new Point(0, 1),
789 new Point(0, 2),
790 new Point(0, 3),
791 new Point(0, 4),
792 new Point(0, 5),
793 new Point(0, 6),
794 new Point(0, 7),
795 new Point(0, 8)
796 }, 8, 0, 0)).Then(new Actions.Sprites.Wait(30));
797 num += (int)animationSegmentWithActions3.DedicatedTimeNeeded;
798 Segments.AnimationSegmentWithActions<NPC> item = new Segments.NPCSegment(num, 46, sceneAnchorPosition + new Vector2(-100f, 0f), _originAtBottom).Then(new Actions.NPCs.Fade(255)).With(new Actions.NPCs.Fade(-5, 51)).Then(new Actions.NPCs.Move(new Vector2(1f, 0f), 60))
799 .Then(new Actions.NPCs.Wait(90))
800 .Then(new Actions.NPCs.Move(new Vector2(1f, 0f), 120))
801 .With(new Actions.NPCs.Fade(3, 85));
802 Segments.AnimationSegmentWithActions<NPC> item2 = new Segments.NPCSegment(num + 60, 299, sceneAnchorPosition + new Vector2(170f, 0f), _originAtBottom).Then(new Actions.NPCs.Fade(255)).With(new Actions.NPCs.Fade(-5, 51)).Then(new Actions.NPCs.Move(new Vector2(-1f, 0f), 60))
803 .Then(new Actions.NPCs.Wait(60))
804 .Then(new Actions.NPCs.Move(new Vector2(-1f, 0f), 90))
805 .Then(new Actions.NPCs.Move(new Vector2(-1f, 0f), 85))
806 .With(new Actions.NPCs.Fade(3, 85));
807 float x = 1.5f;
808 Segments.AnimationSegmentWithActions<NPC> item3 = new Segments.NPCSegment(num + 45, 74, sceneAnchorPosition + new Vector2(-80f, -70f), _originAtBottom).Then(new Actions.NPCs.Fade(255)).With(new Actions.NPCs.Fade(-5, 51)).Then(new Actions.NPCs.Move(new Vector2(x, 0f), 85))
809 .With(new Actions.NPCs.MoveWithRotor(new Vector2(10f, 0f), (float)Math.PI * 2f / 85f, new Vector2(0f, 1f), 85))
810 .Then(new Actions.NPCs.Move(new Vector2(x, 0f), 85))
811 .With(new Actions.NPCs.MoveWithRotor(new Vector2(4f, 0f), (float)Math.PI * 2f / 85f, new Vector2(0f, 1f), 85))
812 .With(new Actions.NPCs.Fade(3, 85));
814 .With(new Actions.NPCs.Fade(-5, 51))
815 .Then(new Actions.NPCs.Wait(60))
816 .Then(new Actions.NPCs.Move(new Vector2(0.5f, 0f), 60))
817 .Then(new Actions.NPCs.Wait(60))
818 .Then(new Actions.NPCs.DoBunnyRestAnimation(90))
819 .Then(new Actions.NPCs.Wait(90))
820 .With(new Actions.NPCs.Fade(3, 120));
821 Segments.EmoteSegment item5 = new Segments.EmoteSegment(0, num + 360, 60, sceneAnchorPosition + new Vector2(36f, -10f), SpriteEffects.FlipHorizontally, Vector2.Zero);
822 animationSegmentWithActions3.Then(new Actions.Sprites.Wait(420)).Then(new Actions.Sprites.Fade(0f, 120));
823 num += 620;
824 animationSegmentWithActions.Then(new Actions.Sprites.Wait(num - startTime - 180)).Then(new Actions.Sprites.Fade(0f, 120));
833 SegmentInforReport result = default(SegmentInforReport);
834 result.totalTime = num - startTime;
835 return result;
836 }
const double PI
Definition Math.cs:16
AnimationSegmentWithActions< T > Then(IAnimationSegmentAction< T > act)
Definition Segments.cs:94
SpriteSegment UseShaderEffect(IShaderEffect shaderEffect)
Definition Segments.cs:391

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

Referenced by Terraria.GameContent.Skies.CreditsRoll.CreditsRollComposer.FillSegments().