Parallel event
This commit is contained in:
@ -10,6 +10,6 @@
|
||||
using namespace Dawn;
|
||||
|
||||
Scene * Dawn::dawnGameGetInitialScene(DawnGame *game) {
|
||||
// return new HelloWorldScene(game);
|
||||
return new TestScene(game);
|
||||
return new HelloWorldScene(game);
|
||||
// return new TestScene(game);
|
||||
}
|
@ -13,6 +13,8 @@
|
||||
#include "games/vn/events/VNPositionEvent.hpp"
|
||||
#include "games/vn/events/VNSetEvent.hpp"
|
||||
#include "games/vn/events/VNChoiceEvent.hpp"
|
||||
#include "games/vn/events/VNParallelEvent.hpp"
|
||||
#include "games/vn/events/VNWaitEvent.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class HelloWorldScene : public Scene {
|
||||
@ -55,12 +57,21 @@ namespace Dawn {
|
||||
choiceEvent->choices["state2"] = "State 2";
|
||||
choiceEvent->choices["state3"] = "State 3";
|
||||
|
||||
auto parallelEvent = vnManager->createEvent<VNParallelEvent>();
|
||||
auto wait0 = vnManager->createEvent<VNWaitEvent>();
|
||||
wait0->duration = 1.0f;
|
||||
parallelEvent->events.push_back(wait0);
|
||||
|
||||
auto wait1 = vnManager->createEvent<VNWaitEvent>();
|
||||
wait1->duration = 3.0f;
|
||||
parallelEvent->events.push_back(wait1);
|
||||
|
||||
eventTest
|
||||
->then(parallelEvent)
|
||||
->then(positionEvent)
|
||||
->then(vnTextEvent)
|
||||
->then(setPropertyEvent)
|
||||
->then(choiceEvent)
|
||||
// ->then(vnTextEvent)
|
||||
// ->then(setPropertyEvent)
|
||||
// ->then(choiceEvent)
|
||||
;
|
||||
vnManager->setEvent(eventTest);
|
||||
}
|
||||
|
Reference in New Issue
Block a user