# Tween

> Aego 0.12.5 · development; docs build `4a32b816933e02930662f6a443cb25abe6050d090c55e237cbff5c44ae9b25f8`. [Build manifest](/docs-build.json).

```
type Tween
```

Tween animates one property of a node. A finished, stopped or nil tween reads as done; yield t waits until it ends.

## Tween.Curve

```
func (Tween) Curve(curve Curve) Handle<aego/tween.Tween>
```

Replaces the easing with a curve field; its time range is stretched over the duration.

## Tween.Delay

```
func (Tween) Delay(seconds float) Handle<aego/tween.Tween>
```

Waits before the tween starts; the start value is read when the delay ends. Call it right after creating the tween.

## Tween.Done

```
func (Tween) Done() bool
```

Reports whether the tween finished, was stopped or is nil.

## Tween.Loop

```
func (Tween) Loop(count int) Handle<aego/tween.Tween>
```

Plays the tween n times from the start; -1 repeats until Stop.

## Tween.PingPong

```
func (Tween) PingPong(legs int) Handle<aego/tween.Tween>
```

Plays n legs, every second one backwards; 2 goes there and back, -1 repeats until Stop.

## Tween.Running

```
func (Tween) Running() bool
```

Is the opposite of Done.

## Tween.Stop

```
func (Tween) Stop()
```

Ends the tween where it is; the property keeps its current value.

## Tween.Unscaled

```
func (Tween) Unscaled() Handle<aego/tween.Tween>
```

Runs the tween in real time, also while the game is paused.

## Tween.Completed

```
signal Completed(finished bool)
```

Runs once when the tween ends. Its finished parameter is true at the natural end, false after Stop, when a new tween on the same property replaced it, or when its node or target is gone.
