Background test
This commit is contained in:
@ -25,25 +25,27 @@ namespace Dawn {
|
||||
auto textureAsset = scene->game->assetManager.get<TextureAsset>("texture_penny");
|
||||
auto tilesetAsset = scene->game->assetManager.get<TilesetAsset>("tileset_penny");
|
||||
|
||||
auto meshRenderer = item->addComponent<MeshRenderer>();
|
||||
auto material = item->addComponent<Material>();
|
||||
auto meshHost = item->addComponent<MeshHost>();
|
||||
auto tiledSprite = item->addComponent<TiledSprite>();
|
||||
// auto meshRenderer = item->addComponent<MeshRenderer>();
|
||||
// auto material = item->addComponent<Material>();
|
||||
// auto meshHost = item->addComponent<MeshHost>();
|
||||
// auto tiledSprite = item->addComponent<TiledSprite>();
|
||||
// auto animation = item->addComponent<AnimationController>();
|
||||
auto pokerPlayer = item->addComponent<PokerPlayer>();
|
||||
auto animation = item->addComponent<AnimationController>();
|
||||
|
||||
auto param = material->getShader()->getParameterByName("u_Text");
|
||||
material->textureValues[param] = &textureAsset->texture;
|
||||
|
||||
tiledSprite->setTileset(&tilesetAsset->tileset);
|
||||
tiledSprite->setSize(glm::vec2(tilesetAsset->tileset.divX, tilesetAsset->tileset.divY));
|
||||
|
||||
auto anim = new TiledSpriteAnimation(tiledSprite);
|
||||
anim->addSequentialKeyframes(0.1f, 0, 22);
|
||||
anim->loop = true;
|
||||
animation->animation = anim;
|
||||
|
||||
return item;
|
||||
|
||||
// auto param = material->getShader()->getParameterByName("u_Text");
|
||||
// material->textureValues[param] = &textureAsset->texture;
|
||||
|
||||
// tiledSprite->setTileset(&tilesetAsset->tileset);
|
||||
// tiledSprite->setSize(glm::vec2(tilesetAsset->tileset.divX, tilesetAsset->tileset.divY));
|
||||
|
||||
// auto anim = new TiledSpriteAnimation(tiledSprite);
|
||||
// anim->addSequentialKeyframes(0.1f, 0, 22);
|
||||
// anim->loop = true;
|
||||
// animation->animation = anim;
|
||||
|
||||
// return item;
|
||||
}
|
||||
};
|
||||
}
|
@ -13,6 +13,7 @@
|
||||
#include "visualnovel/events/VisualNovelTextboxEvent.hpp"
|
||||
#include "visualnovel/events/VisualNovelPauseEvent.hpp"
|
||||
#include "visualnovel/events/VisualNovelFadeEvent.hpp"
|
||||
#include "visualnovel/events/VisualNovelChangeSimpleBackgroundEvent.hpp"
|
||||
#include "poker/PokerGame.hpp"
|
||||
#include "visualnovel/events/PokerBetLoopEvent.hpp"
|
||||
#include "visualnovel/events/PokerInitialEvent.hpp"
|
||||
@ -34,17 +35,25 @@ namespace Dawn {
|
||||
vectorAppend(&assets, &PokerPlayerDisplay::getAssets(assMan));
|
||||
vectorAppend(&assets, &VNPenny::getAssets(assMan));
|
||||
|
||||
assets.push_back(assMan->get<TextureAsset>("texture_tavern_night"));
|
||||
|
||||
return assets;
|
||||
}
|
||||
|
||||
void stage() override {
|
||||
// Camera
|
||||
auto camera = Camera::create(this);
|
||||
camera->transform->lookAt(glm::vec3(50, 50, 50), glm::vec3(0, 0, 0));
|
||||
camera->transform->lookAtPixelPerfect(
|
||||
glm::vec3(0, 0, 0),
|
||||
glm::vec3(0, 0, 0),
|
||||
1.0f,
|
||||
camera->fov
|
||||
);
|
||||
|
||||
// UI
|
||||
auto canvas = UICanvas::createCanvas(this);
|
||||
auto textbox = PokerGameTextbox::create(canvas);
|
||||
auto background = SimpleVisualNovelBackground::create(this);
|
||||
|
||||
// VN Manager
|
||||
auto vnManagerItem = this->createSceneItem();
|
||||
@ -64,9 +73,11 @@ namespace Dawn {
|
||||
|
||||
auto vnFader = VisualNovelFader::create(canvas);
|
||||
|
||||
auto texture = this->game->assetManager.get<TextureAsset>("texture_tavern_night");
|
||||
|
||||
auto betting = vnManager
|
||||
->setEvent(new VisualNovelFadeEvent(
|
||||
vnManager, COLOR_BLACK, true, &easeOutCubic, 0.0f
|
||||
->setEvent(new VisualNovelChangeSimpleBackgroundEvent(
|
||||
vnManager, &texture->texture
|
||||
))
|
||||
->then(new VisualNovelPauseEvent(vnManager, 1.0f))
|
||||
->then(new VisualNovelFadeEvent(
|
||||
|
Reference in New Issue
Block a user