Starting new VN Structure
This commit is contained in:
37
archive/visualnovel/components/VisualNovelCharacter.hpp
Normal file
37
archive/visualnovel/components/VisualNovelCharacter.hpp
Normal file
@ -0,0 +1,37 @@
|
||||
// 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 "asset/assets/AudioAsset.hpp"
|
||||
#include "scene/components/display/material/SimpleTexturedMaterial.hpp"
|
||||
#include "scene/components/display/TiledSprite.hpp"
|
||||
#include "scene/components/audio/AudioSource.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
struct VisualNovelCharacterEmotion {
|
||||
int32_t tile = 0;
|
||||
AudioAsset *talkSound = nullptr;
|
||||
AudioAsset *emotionSound = nullptr;
|
||||
};
|
||||
|
||||
class VisualNovelCharacter : public SceneItemComponent {
|
||||
public:
|
||||
std::string nameKey = "character.unknown";
|
||||
SimpleTexturedMaterial *material = nullptr;
|
||||
TiledSprite *tiledSprite = nullptr;
|
||||
|
||||
/**
|
||||
* Visual Novel Character Component. Mostly logic-less but provides nice
|
||||
* interfaces for sibling components.
|
||||
*
|
||||
* @param item Item that this component belongs to.
|
||||
*/
|
||||
VisualNovelCharacter(SceneItem *item);
|
||||
|
||||
std::vector<SceneItemComponent*> getDependencies() override;
|
||||
void onStart() override;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user