about to add SDL and probably break everything

This commit is contained in:
2023-01-16 10:01:06 -08:00
parent dbe2409287
commit 23fc1206ba
54 changed files with 904 additions and 138 deletions

View File

@ -14,6 +14,8 @@
namespace Dawn {
class PennyPrefab : public SceneItemPrefab<PennyPrefab> {
public:
VisualNovelCharacter *vnCharacter;
static std::vector<Asset*> prefabAssets(AssetManager *assMan) {
return std::vector<Asset*>{
assMan->get<TextureAsset>("texture_penny"),
@ -33,7 +35,7 @@ namespace Dawn {
auto tiledSprite = this->addComponent<TiledSprite>();
auto animation = this->addComponent<AnimationController>();
auto pokerPlayer = this->addComponent<PokerPlayer>();
auto vnCharacter = this->addComponent<VisualNovelCharacter>();
vnCharacter = this->addComponent<VisualNovelCharacter>();
vnCharacter->nameKey = "character.penny.name";
@ -44,10 +46,10 @@ namespace Dawn {
tiledSprite->setTile(0);
this->transform.setLocalPosition(glm::vec3(0, 0, 0));
// auto anim = new TiledSpriteAnimation(tiledSprite);
// anim->addSequentialKeyframes(0.1f, 0, 22);
// anim->loop = true;
// animation->animation = anim;
auto anim = new TiledSpriteAnimation(tiledSprite);
anim->addSequentialKeyframes(0.1f, 0, 22);
anim->loop = true;
animation->animation = anim;
}
};
}

View File

@ -15,6 +15,7 @@ namespace Dawn {
static std::vector<Asset*> prefabAssets(AssetManager *man) {
std::vector<Asset*> assets;
assets.push_back(man->get<TrueTypeAsset>("truetype_ark"));
vectorAppend(&assets, UIBorderPrefab::getRequiredAssets(man));
return assets;
}