# C#: Sequences

Source: https://tweens.gd/csharp/sequences/

A Chain plays motions one after another on one target’s timeline. A Group plays them at the same time.

Examples use `using Godot;` and `using tweens.gd;` in a Node method, with targets inside the scene tree.

## Play in order

```csharp
var animation = sprite.Chain([
    new Tweens.Position2D((400, 180), 0.6),
    new Tweens.Scale2D(1.2, 0.2),
    new Tweens.ModulateAlpha(0, 0.3),
]);
await animation.End;
```

The sprite moves, grows, then fades. Each step reads its starting value when it begins, so it continues from where the previous step ended.

## Overlap and gaps

An entry’s `Delay` counts from the end of the entry before it. A positive delay leaves a gap; a negative one overlaps.

```csharp
var animation = sprite.Chain([
    new Tweens.Position2D((400, 180), 0.6),
    new Tweens.ModulateAlpha(0, 0.3) { Delay = -0.2 },
]);
```

1.  **Move** from 0 to 0.6 seconds.
2.  **Fade** from 0.4 to 0.7 seconds, overlapping the move’s last 0.2 seconds.

## Play together

```csharp
var together = sprite.Tween(
    new Tweens.Position2D((400, 180), 0.6),
    new Tweens.ModulateAlpha(0, 0.6));
await together.End;
```

Starting several definitions at once returns a Group. To group tween handles from different targets, use `Group.Of(first, second)`. A Group ends when all its members have ended; if one stops early, the Group cancels the rest.

Chain or await?

Await between steps that wait on a decision, input, or another target. Use a Chain when steps share one timeline: a tween started after an await begins on the next update.

[Chains](https://tweens.gd/csharp/api/chains/)Pre-roll, capture order, controls, and limits.

[Groups](https://tweens.gd/csharp/api/groups/)Membership, controls, and completion rules.
