コード例 #1
0
        public override IQuestAction CreateNew(string source, Quest parentQuest)
        {
            // Source must match pattern
            Match match = Test(source);

            if (!match.Success)
            {
                return(null);
            }

            // Factory new action
            PlaceFoe action = new PlaceFoe(parentQuest);

            action.foeSymbol   = new Symbol(match.Groups["aFoe"].Value);
            action.placeSymbol = new Symbol(match.Groups["aPlace"].Value);

            // Set custom marker
            Group markerGroup = match.Groups["marker"];

            if (markerGroup.Success)
            {
                action.marker = Parser.ParseInt(markerGroup.Value);
            }

            return(action);
        }
コード例 #2
0
        public override IQuestAction CreateNew(string source, Quest parentQuest)
        {
            // Source must match pattern
            Match match = Test(source);

            if (!match.Success)
            {
                return(null);
            }

            // Factory new action
            PlaceFoe action = new PlaceFoe(parentQuest);

            action.foeSymbol   = new Symbol(match.Groups["aFoe"].Value);
            action.placeSymbol = new Symbol(match.Groups["aPlace"].Value);

            return(action);
        }