Exemplo n.º 1
0
        public override void ParseCue(string cueToken, string cueData)
        {
            switch (cueToken)
            {
            case "VICTIMS":
                // def.NumVictims = int.Parse(cueData);
                break;

            case "BG":
                def.Actions.Add(StageActionFactory.NewBackground(cueData));
                break;

            case "BGM":
                def.Actions.Add(StageActionFactory.NewBackgroundMusic(cueData));
                break;

            case "VO":
                def.Actions.Add(StageActionFactory.NewVOAction(cueData));
                break;

            default:
                mCurrentCharacterDevName = cueToken;

                foreach (var action in DialogueParser.ParseCue(mCurrentCharacterDevName, cueData))
                {
                    def.Actions.Add(action);
                }
                break;
            }
        }
Exemplo n.º 2
0
        public override void ParseCue(string cueToken, string cueData)
        {
            if (mSettings.KnownInitGunks.Contains(cueToken))
            {
                int gunkAmount = int.Parse(cueData);

                def.Actions.Add(StageActionFactory.NewGunkInit(cueToken, gunkAmount));
                return;
            }

            if (mSettings.KnownIndexedGunks.Contains(cueToken))
            {
                int[] data = cueData.AsIntArray();

                def.Actions.Add(StageActionFactory.NewGunkIndices(cueToken, data));
                return;
            }

            if (mSettings.KnownSpeakerNames.Contains(cueToken))
            {
                mCurrentCharacterDevName = cueToken;

                mLastDialogueAction = StageActionFactory.NewDialogueAction(mCurrentCharacterDevName, "");

                def.Actions.Add(mLastDialogueAction);
                return;
            }

            switch (cueToken)
            {
            case "ACTION_NEW_PATIENT":
                ZLog.Warn("Need to handle ACTION_NEW_PATIENT");
                return;

            case "VO":
                def.Actions.Add(StageActionFactory.NewVOAction(cueData));
                return;
            }

            throw new InvalidOperationException($"[PHASE] Unknown cue token! token: {cueToken}, is this a speaker or surgery gunk?");
        }