# Fly Up Text

Presented by FlyUpText class, it makes gameobject with attached Text/TMP\_Text/TextMesh component move up with certain speed and disappear after certain amount of time. This movement automatically begins when its gameobject becomes active on scene.

{% hint style="info" %}
This component is inherited from IPooledObject interface, so it can be pooled via [Pool System](https://heroicsolo.gitbook.io/heroic-engine/basics/engine-utilities/poolsystem). Also, when it ends flying, it automatically returns to pool.
{% endhint %}

<figure><img src="https://1131436974-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9rEHd0nHFvWCSkMEfAjl%2Fuploads%2F08S9OgCP5yFPHIRUsUwy%2Fimage.png?alt=media&#x26;token=5a5b21cb-bc22-4fb3-aaf4-3a5b2498fb9d" alt=""><figcaption><p>Fly Up Text component</p></figcaption></figure>

### Parameters in inspector

**Lifetime** – how much time this object will fly before disappearance (in seconds)

**Floating Speed** – movement speed (should be set in pixels per second in case if its Canvas UI element, where Canvas is not in World Space, otherwise – it should be set in world units per second)

**Curved** – if set to true, object will fly up by curved trajectory, otherwise it will just move along Fly Direction

**Fly Direction** – direction of object movement (Vector3.up by default)

**Curve Direction** – direction of curvature (Vector3.right by default); sign of direction is not important, so Vector3.right will give the same result as Vector3.left.

***

### Available methods

```csharp
public void SetCurved(bool _value)
```

*This method sets Curved parameter value. If set to true, object will fly up by curved trajectory, otherwise it will just move along Fly Direction.*

***

```csharp
public void SetColor(Color color)
```

*This method sets text color.*

***

```csharp
public void SetText(string _text)
```

*This method sets text string.*
