57 lines
1.8 KiB
C++
57 lines
1.8 KiB
C++
// Copyright (c) 2022 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#pragma once
|
|
#include "PokerVNScene.hpp"
|
|
#include "prefabs/characters/PennyPrefab.hpp"
|
|
|
|
namespace Dawn {
|
|
class TestScene : public PokerVNScene {
|
|
protected:
|
|
PennyPrefab *penny;
|
|
PennyPrefab *julie;
|
|
PennyPrefab *sammy;
|
|
PennyPrefab *lucy;
|
|
|
|
void vnStage() override {
|
|
penny = PennyPrefab::create(this);
|
|
julie = PennyPrefab::create(this);
|
|
sammy = PennyPrefab::create(this);
|
|
lucy = PennyPrefab::create(this);
|
|
|
|
PokerVNScene::vnStage();
|
|
}
|
|
|
|
std::vector<PokerPlayer *> getPokerPlayers() override {
|
|
return std::vector<PokerPlayer*>{
|
|
this->penny->getComponent<PokerPlayer>(),
|
|
this->julie->getComponent<PokerPlayer>(),
|
|
this->sammy->getComponent<PokerPlayer>(),
|
|
this->lucy->getComponent<PokerPlayer>()
|
|
};
|
|
}
|
|
|
|
public:
|
|
TestScene(DawnGame *game) : PokerVNScene(game) {}
|
|
|
|
std::vector<Asset*> getRequiredAssets() override {
|
|
auto assMan = &this->game->assetManager;
|
|
std::vector<Asset*> assets;
|
|
vectorAppend(&assets, PokerVNScene::getRequiredAssets());
|
|
vectorAppend(&assets, PennyPrefab::getRequiredAssets(assMan));
|
|
assets.push_back(assMan->get<TextureAsset>("texture_tavern_night"));
|
|
return assets;
|
|
}
|
|
|
|
IVisualNovelEvent * getVNEvent() override {
|
|
auto texture = this->game->assetManager.get<TextureAsset>("texture_tavern_night");
|
|
auto start = new VisualNovelChangeSimpleBackgroundEvent(
|
|
vnManager, &texture->texture
|
|
);
|
|
start->then(new VisualNovelTextboxEvent(vnManager, penny->getComponent<VisualNovelCharacter>(), "1234"));
|
|
return start;
|
|
}
|
|
};
|
|
} |