Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
StardewValleyAnimation.cs
Go to the documentation of this file.
6
8
10{
12
14 {
16 }
17
18 private void ComposeAnimation()
19 {
21 Rectangle rectangle = val.Frame();
22 DrawData data = new DrawData(val.Value, Vector2.Zero, rectangle, Color.White, 0f, rectangle.Size() * new Vector2(0.5f, 0.5f), 1f, SpriteEffects.None);
23 int targetTime = 128;
24 int num = 60;
25 int num2 = 360;
26 int duration = 60;
27 int num3 = 4;
29 {
30 Delay = 128f,
31 Duration = num2 - 120 + num - 60,
32 AmountOverTime = 0.55f,
33 StartAmount = -0.4f
35 {
36 StartAmount = 0f
38 .Then(new Actions.Sprites.Wait(num2))
40 _segments.Add(item);
42 Rectangle rectangle2 = val2.Frame(1, 8);
43 DrawData data2 = new DrawData(val2.Value, Vector2.Zero, rectangle2, Color.White, 0f, rectangle2.Size() * new Vector2(0.5f, 0.5f), 1f, SpriteEffects.None);
45 {
46 new Point(0, 0),
47 new Point(0, 1),
48 new Point(0, 2),
49 new Point(0, 3),
50 new Point(0, 4),
51 new Point(0, 5),
52 new Point(0, 6),
53 new Point(0, 7)
54 }, num3, 0, 0))
55 .Then(new Actions.Sprites.Wait(num2))
58 }
59
61 {
62 return Main.Transform;
63 }
64
66 {
68 gameAnimationSegment.SpriteBatch = spriteBatch;
69 gameAnimationSegment.AnchorPositionOnScreen = positionInScreen;
70 gameAnimationSegment.TimeInAnimation = timeInAnimation;
71 gameAnimationSegment.DisplayOpacity = 1f;
73 for (int i = 0; i < _segments.Count; i++)
74 {
75 _segments[i].Draw(ref info);
76 }
77 }
78}
AnimationSegmentWithActions< T > Then(IAnimationSegmentAction< T > act)
Definition Segments.cs:94
SpriteSegment UseShaderEffect(IShaderEffect shaderEffect)
Definition Segments.cs:391
void Draw(SpriteBatch spriteBatch, int timeInAnimation, Vector2 positionInScreen)
static Asset< Texture2D >[] Extra
static Matrix Transform
Definition Main.cs:2771