Bbop-2D 0.4.1-alpha
Bbop-2D is a c++ library based on openGL to make 2D game. It implement sprite, shape, light and more.
Loading...
Searching...
No Matches
animatedSpriteClass.h
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include "spriteClass.h"
7
14class AnimatedSprite : public Sprite
15{
16 public:
26 AnimatedSprite(std::string _animated_sprite_sheet, Vector2i _size,
27 float _frame_t, int _dead_frame, bool _random_start);
28 AnimatedSprite(std::string _animated_sprite_sheet, Vector2i _size,
29 float _frame_t, int _dead_frame);
30 AnimatedSprite(std::string _animated_sprite_sheet, Vector2i _size,
31 float _frame_t);
33
39 bool update();
40
44 std::vector<Texture> &getSpriteSheet();
45 std::vector<Texture> animated_sprite_texture;
46 long unsigned int frame_cpt; //<! compteur de frame
47 long unsigned int n_frame; //<! nombre de frame
48 float frame_t; //<! timing entre les frames
49 float total_t; //<! temps total de l'anim
50 float anim_start; //<! depart de l'anim
51 float last_frame_t; //<! timing de la dernière frame
52};
Gère un Sprite qui joue une aniomation en boucle.
Definition animatedSpriteClass.h:15
AnimatedSprite()
Definition animatedSpriteClass.cpp:9
long unsigned int frame_cpt
Definition animatedSpriteClass.h:46
float total_t
Definition animatedSpriteClass.h:49
long unsigned int n_frame
Definition animatedSpriteClass.h:47
std::vector< Texture > animated_sprite_texture
Definition animatedSpriteClass.h:45
std::vector< Texture > & getSpriteSheet()
renvoie la liste de texture
Definition animatedSpriteClass.cpp:62
bool update()
Met a jour les particules.
Definition animatedSpriteClass.cpp:43
float last_frame_t
Definition animatedSpriteClass.h:51
float anim_start
Definition animatedSpriteClass.h:50
float frame_t
Definition animatedSpriteClass.h:48
Gère un Sprite (Rectangle avec une Texture)
Definition spriteClass.h:39
Definition bbopMathClass.h:39