Skip to content

Commit

Permalink
GITBOOK-260: change request with no subject merged in GitBook
Browse files Browse the repository at this point in the history
  • Loading branch information
vchelaru authored and gitbook-bot committed Oct 31, 2024
1 parent 4b59feb commit 5192b81
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
* [Categories](gum-code-reference/datauigrid/categories.md)
* [GraphicalUiElement](gum-code-reference/graphicaluielement/README.md)
* [AddToManagers](gum-code-reference/graphicaluielement/addtomanagers.md)
* [AnimateSelf](gum-code-reference/graphicaluielement/animateself.md)
* [ApplyState](gum-code-reference/graphicaluielement/applystate.md)
* [BlendState](gum-code-reference/graphicaluielement/blendstate.md)
* [CanvasHeight](gum-code-reference/graphicaluielement/canvasheight.md)
Expand Down
21 changes: 21 additions & 0 deletions docs/gum-code-reference/graphicaluielement/animateself.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# AnimateSelf

### Introduction

The AnimateSelf method performs .achx animation logic, advancing the displayed frame on the calling GraphicalUiElement and its children. This call is recursive, so it is typically only called on the root GraphicalUiElement (such as the current Screen).

## Code Example

The following shows how to call AnimateSelf on a GraphicalUiElement. Typically this is called every frame in activity. For example, this code shows how to animate a GraphicalUiElement in a MonoGame project:

```csharp
protected override void Update(GameTime gameTime)
{
SystemManagers.Default.Activity(gameTime.TotalGameTime.TotalSeconds);
currentScreenGue.AnimateSelf(gameTime.ElapsedGameTime.TotalSeconds);
...
```

{% hint style="info" %}
AnimateSelf is called automatically in FlatRedBall projects in generated code.
{% endhint %}

0 comments on commit 5192b81

Please sign in to comment.