Beispiel #1
0
        public KrController(Text dialogBox, GameObject waitSymbol, GameObject nameObject, Text nameBox)
        {
            cmdManager = new CmdManager(new IdleTask());

            //資料池初始化
            speedHandler  = new SpeedHandler();
            dialogQueue   = new Queue <ICmd[]>();
            styleHandler  = new DialogStyleHandler();
            dialogHandler = new DialogHandler(dialogBox, styleHandler);
            waitHandler   = new WaitHandler(waitSymbol);
            nameHandler   = new CharaNameHandler(nameObject, nameBox);

            //文本編譯器初始化
            dialogCompiler = new DialogCompiler(new TypeDialogFactory(speedHandler, dialogHandler), new FactoryInputConverter());
            dialogCompiler.AddDialogUnitFactory(
                new SetSizeFactory(styleHandler),
                new WaitClickFactory(waitHandler),
                new SetNameFactory(nameHandler));
        }
Beispiel #2
0
 public DialogHandler(Text dialogBox, DialogStyleHandler styleHandler)
 {
     this.styleHandler = styleHandler;
     this.dialogBox    = dialogBox;
 }