NasNas
An intuitive and beginner friendly 2D game framework for C++
Public Member Functions | Public Attributes | List of all members
ns::AnimFrame Class Reference

Public Member Functions

 AnimFrame (const ns::IntRect &rectangle, int duration, const sf::Vector2i &origin={0, 0})
 Constructs an AnimFrame object. More...
 

Public Attributes

const ns::IntRect rectangle
 Frame rectangle.
 
const int duration
 Frame duration in milliseconds.
 
const sf::Vector2i origin
 Frame origin.
 

Detailed Description

Definition at line 19 of file Anim.hpp.

Constructor & Destructor Documentation

◆ AnimFrame()

ns::AnimFrame::AnimFrame ( const ns::IntRect rectangle,
int  duration,
const sf::Vector2i &  origin = {0, 0} 
)

Constructs an AnimFrame object.

Parameters
rectangleFrame rectangle on the spritesheet
durationFrame duration in milliseconds
originFrame origin, {0, 0} = top left corner by default

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