Beispiel #1
0
        private bool parseWait(GasParser parser)
        {
            GasParam min     = new GasParam();
            GasParam max     = new GasParam();
            GasParam percent = new GasParam();

            if (parser.ReadInteger(out min.IntegerValue) == false)
            {
                return(false);
            }
            if (parser.ReadInteger(out max.IntegerValue) == false)
            {
                max.IntegerValue = 0;
            }
            if (parser.ReadInteger(out percent.IntegerValue) == false)
            {
                percent.IntegerValue = 100;
            }

            GasScriptLine line;

            line.Command = GasCommand.Wait;
            line.Params  = new GasParam[] { min, max, percent };

            _lines.Add(line);

            return(true);
        }
Beispiel #2
0
        private bool parseAnim(GasParser parser, bool isAnim)
        {
            GasParam filename = new GasParam();
            GasParam moving   = new GasParam();
            GasParam percent  = new GasParam();

            if (parser.ReadString(out filename.StringValue) == false)
            {
                return(false);
            }
            if (parser.ReadBoolean(out moving.BooleanValue) == false)
            {
                moving.BooleanValue = false;
            }
            if (parser.ReadInteger(out percent.IntegerValue) == false)
            {
                percent.IntegerValue = 100;
            }

            GasScriptLine line;

            line.Command = (isAnim ? GasCommand.Anim : GasCommand.OneOf);
            line.Params  = new GasParam[] { filename, moving, percent };

            _lines.Add(line);

            return(true);
        }