added rest of basics in TSE_Core

This commit is contained in:
2026-01-17 21:06:02 +01:00
parent d09953f476
commit 117c1e6adb
27 changed files with 2908 additions and 9 deletions

View File

@@ -0,0 +1,38 @@
#pragma once
#define IMAGE_ANIMATION typeid(ImageAnimation).name()
#include "Image.hpp"
#include "elements/BehaviourScript.hpp"
#include "elements/ImageAnimationSet.hpp"
#include <unordered_map>
namespace TSE
{
class ImageAnimation : public BehaviourScript
{
private:
std::unordered_map<string, ImageAnimationSet*> animations;
string currentAnimation = "";
int frame = 0;
float deltatime = 0;
public:
ImageAnimation();
void SetAnimationSet(ImageAnimationSet* set);
void SetAnimationSet(string name, ImageAnimationSet* set);
void StartAnimation(const string name);
int GetImageAnimationSetCount();
ImageAnimationSet* GetImageAnimationAt(int& i);
string& GetCurrentAnimation();
int& GetCurrentFrame();
float& GetDeltaTime();
void RemoveAnimationSet(std::string& name);
void OnUpdate() override;
inline const char* GetName() override
{
return "Image Animation";
}
};
} // namespace TSE