Operation Null Mind 0.4.1
A 2D roguelike top down shooter game made with SDL2
 
Loading...
Searching...
No Matches
Animation Struct Reference

The main animation structure. More...

#include <animation.h>

Public Attributes

SDL_Texture * spritesheet
 Spritesheet texture.
 
AnimationClip * clips
 Array of different animations.
 
int clipCount
 Number of animation clips.
 
Vec2 frameSize
 Size of each frame in the spritesheet.
 
int frameCount
 Total number of frames in the spritesheet.
 
int currentClip
 Currently active clip index.
 
int currentFrame
 Current frame within the clip.
 
float timer
 Time accumulator for frame changes.
 
bool isPlaying
 Whether animation is playing.
 
int direction
 1 for forward, -1 for backward
 

Detailed Description

The main animation structure.

Member Data Documentation

◆ clipCount

int Animation::clipCount

Number of animation clips.

◆ clips

AnimationClip* Animation::clips

Array of different animations.

◆ currentClip

int Animation::currentClip

Currently active clip index.

◆ currentFrame

int Animation::currentFrame

Current frame within the clip.

◆ direction

int Animation::direction

1 for forward, -1 for backward

◆ frameCount

int Animation::frameCount

Total number of frames in the spritesheet.

◆ frameSize

Vec2 Animation::frameSize

Size of each frame in the spritesheet.

◆ isPlaying

bool Animation::isPlaying

Whether animation is playing.

◆ spritesheet

SDL_Texture* Animation::spritesheet

Spritesheet texture.

◆ timer

float Animation::timer

Time accumulator for frame changes.


The documentation for this struct was generated from the following file: