# AnimateSelf

### Introduction

The AnimateSelf function updates advances a Sprite through its animation (if it is animated) and updates the Sprite's Texture and texture coordinates according to its current animation. Sprites which are updated automatically (default) will automatically have this function called by the SpriteManager. Typically you only need to manually call this if a Sprite has been converted to manually updated, but it should still be animated.

### Code Example

Typicalily the AnimateSelf function takes the [TimeManager.CurrentTime](https://github.com/flatredball/FlatRedBallDocs/blob/main/frb/docs/index.php) value. The following code would animate a Sprite:

```
// assuming the Sprite SpriteInstance exists:
SpriteInstance.AnimateSelf(TimeManager.CurrentTime);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flatredball.com/flatredball/api/flatredball/sprite/animateself.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
