Updated the display controllers to use state controls

This commit is contained in:
2023-03-01 08:43:59 -08:00
parent b9667f8312
commit 94d15b20cc
7 changed files with 79 additions and 137 deletions

View File

@ -1,24 +1,27 @@
// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "scene/SceneItemComponent.hpp"
#include "display/animation/Animation.hpp"
namespace Dawn {
class AnimationController : public SceneItemComponent {
private:
std::vector<Animation*> animations;
void onSceneUpdate();
public:
AnimationController(SceneItem *item);
void addAnimation(Animation *animation);
void onStart() override;
void onDispose() override;
};
// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "scene/SceneItemComponent.hpp"
#include "display/animation/Animation.hpp"
namespace Dawn {
class AnimationController : public SceneItemComponent {
private:
std::vector<Animation*> animations;
public:
AnimationController(SceneItem *item);
/**
* Add an animation to this controller.
*
* @param animation Pointer to the animation to add.
*/
void addAnimation(Animation *animation);
void onStart() override;
};
}