28 lines
751 B
C++
28 lines
751 B
C++
// Copyright (c) 2022 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#include "VisualNovelCharacter.hpp"
|
|
|
|
using namespace Dawn;
|
|
|
|
VisualNovelCharacter::VisualNovelCharacter(SceneItem *item) :
|
|
SceneItemComponent(item)
|
|
{
|
|
}
|
|
|
|
void VisualNovelCharacter::setOpacity(float_t opacity) {
|
|
auto interface = this->item->getComponent<SimpleTexturedShaderInterface>();
|
|
assertNotNull(interface);
|
|
auto color = interface->getColor();
|
|
color.a = opacity;
|
|
interface->setColor(color);
|
|
}
|
|
|
|
float_t VisualNovelCharacter::getOpacity() {
|
|
auto interface = this->item->getComponent<SimpleTexturedShaderInterface>();
|
|
assertNotNull(interface);
|
|
auto color = interface->getColor();
|
|
return color.a;
|
|
} |