Script first pass
This commit is contained in:
@ -21,7 +21,9 @@ VisualNovelTransformItemEvent::VisualNovelTransformItemEvent(
|
|||||||
this->callbackAnimation.setCallback(
|
this->callbackAnimation.setCallback(
|
||||||
&item->transform, &Transform::setLocalPosition
|
&item->transform, &Transform::setLocalPosition
|
||||||
);
|
);
|
||||||
|
if(duration != 0) {
|
||||||
this->callbackAnimation.addKeyframe(0.0f, start);
|
this->callbackAnimation.addKeyframe(0.0f, start);
|
||||||
|
}
|
||||||
this->callbackAnimation.addKeyframe(duration, end);
|
this->callbackAnimation.addKeyframe(duration, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,7 +40,8 @@ VisualNovelTransformItemEvent::VisualNovelTransformItemEvent(
|
|||||||
this->callbackAnimation.setCallback(
|
this->callbackAnimation.setCallback(
|
||||||
&item->transform, &Transform::setLocalPosition
|
&item->transform, &Transform::setLocalPosition
|
||||||
);
|
);
|
||||||
this->relative = true;
|
|
||||||
|
if(duration != 0) this->relative = true;
|
||||||
this->callbackAnimation.addKeyframe(duration, end);
|
this->callbackAnimation.addKeyframe(duration, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,8 @@ namespace Dawn {
|
|||||||
void vnStage() override {
|
void vnStage() override {
|
||||||
|
|
||||||
this->death = DeathPrefab::create(this);
|
this->death = DeathPrefab::create(this);
|
||||||
|
this->death->material->color.a = 0;
|
||||||
|
// this->death->transform.setLocalPosition(glm::vec3(-100, 0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
void onSceneEnded() {
|
void onSceneEnded() {
|
||||||
@ -48,6 +50,7 @@ namespace Dawn {
|
|||||||
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
|
||||||
start
|
start
|
||||||
->then(new VisualNovelTextboxEvent(vnManager, this->death->vnCharacter, this->death->emotionHappy, "scene.1.1"))
|
->then(new VisualNovelTextboxEvent(vnManager, this->death->vnCharacter, this->death->emotionHappy, "scene.1.1"))
|
||||||
|
->then(new VisualNovelFadeCharacterEvent(vnManager, this->death->vnCharacter, true, &easeOutQuad, 1.0f))
|
||||||
// ->then(new VisualNovelCallbackEvent<Scene_1>(vnManager, this, &Scene_1::onSceneEnded))
|
// ->then(new VisualNovelCallbackEvent<Scene_1>(vnManager, this, &Scene_1::onSceneEnded))
|
||||||
;
|
;
|
||||||
return start;
|
return start;
|
||||||
|
Reference in New Issue
Block a user