First real pass at VN Event Parsing
This commit is contained in:
@ -14,4 +14,8 @@ target_include_directories(${DAWN_TARGET_NAME}
|
||||
|
||||
# Subdirs
|
||||
add_subdirectory(game)
|
||||
add_subdirectory(save)
|
||||
add_subdirectory(save)
|
||||
|
||||
# Assets
|
||||
set(LIMINAL_ASSETS_DIR ${DAWN_ASSETS_DIR}/games/liminal)
|
||||
tool_vnscene(${LIMINAL_ASSETS_DIR}/test.xml)
|
@ -5,9 +5,11 @@
|
||||
|
||||
#include "game/DawnGame.hpp"
|
||||
#include "scenes/HelloWorldScene.hpp"
|
||||
#include "vnscenes/TestScene.hpp"
|
||||
|
||||
using namespace Dawn;
|
||||
|
||||
Scene * Dawn::dawnGameGetInitialScene(DawnGame *game) {
|
||||
return new HelloWorldScene(game);
|
||||
// return new HelloWorldScene(game);
|
||||
return new TestScene(game);
|
||||
}
|
@ -12,6 +12,7 @@
|
||||
#include "games/vn/events/VNTextEvent.hpp"
|
||||
#include "games/vn/events/VNPositionEvent.hpp"
|
||||
#include "games/vn/events/VNSetEvent.hpp"
|
||||
#include "games/vn/events/VNChoiceEvent.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class HelloWorldScene : public Scene {
|
||||
@ -47,10 +48,19 @@ namespace Dawn {
|
||||
setPropertyEvent->modifies = &test;
|
||||
setPropertyEvent->to = 10;
|
||||
|
||||
auto choiceEvent = vnManager->createEvent<VNChoiceEvent>();
|
||||
choiceEvent->text = "Choice?";
|
||||
choiceEvent->choices["state0"] = "State 0";
|
||||
choiceEvent->choices["state1"] = "State 1";
|
||||
choiceEvent->choices["state2"] = "State 2";
|
||||
choiceEvent->choices["state3"] = "State 3";
|
||||
|
||||
|
||||
eventTest
|
||||
->then(positionEvent)
|
||||
->then(vnTextEvent)
|
||||
->then(setPropertyEvent)
|
||||
->then(choiceEvent)
|
||||
;
|
||||
vnManager->setEvent(eventTest);
|
||||
}
|
||||
|
Reference in New Issue
Block a user