# C#: Reuse a Definition

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

A tween definition is a motion you can re-use on any compatible Node.

Interactive preview: https://tweens.gd/csharp/definitions/

## Scripting it

In a 2D scene, drag `icon.svg` into the viewport a few times, side by side. Attach this script to the scene’s root `Node2D` and run it.

HopWave.cs

```csharp
using System.Linq;
using Godot;
using tweens.gd;

public partial class HopWave : Node2D
{
    public override void _Ready()
    {
        var hop = new Tweens.Position2DY
        {
            By = -80,
            Duration = 0.25,
            Ease = Out.Quad,
            PingPong = true,
        };

        var icons = GetChildren().OfType<Node2D>().ToArray();
        for (var i = 0; i < icons.Length; i++)
            icons[i].Tween(hop with { Delay = i * 0.2 });
    }
}
```

1.  **Define once.** `hop` lifts a node 80 pixels and drops it back; negative y is up in Godot. `By` is relative, so each icon hops from wherever it stands.
2.  **Find the nodes.** Every `Node2D` child of this node.
3.  **Start a copy on each.** `with` copies `hop` and changes only `Delay`, so `hop` itself keeps no delay. Each start returns its own handle.

Each start snapshots its definition. Change `hop` later, and only the starts after that follow; tweens already playing keep their settings.

### Would you like to know more?

[Anatomy](https://tweens.gd/csharp/anatomy/)Every field a definition can set.

[Variations](https://tweens.gd/csharp/variations/)Scale or shift a copy relative to the original.

Keep reusable motion nearby

Store a shared definition in a `static readonly` field of a class you can use as your animation design system (or theme), shared across your project. The generated definitions are readonly record structs.
