예제 #1
0
 public static bool TryParse(string c, out DevCommand command)
 {
     Match m = REGEX.Match(c);
     if(m.Success) {
         command = new DevCommandCapital(RegexHelper.ExtractInt(m));
         return true;
     }
     command = null;
     return false;
 }
예제 #2
0
        public static bool TryParse(string c, out DevCommand command)
        {
            Match m = REGEX.Match(c);

            if (m.Success)
            {
                command = new DevCommandStopMotion();
                return(true);
            }
            command = null;
            return(false);
        }
예제 #3
0
        public static bool TryParse(string c, out DevCommand command)
        {
            Match m = REGEX.Match(c);

            if (m.Success)
            {
                command = new DevCommandCapital(RegexHelper.ExtractInt(m));
                return(true);
            }
            command = null;
            return(false);
        }
예제 #4
0
        public static bool TryParse(string c, out DevCommand command)
        {
            Match m = REGEX.Match(c);

            if (m.Success)
            {
                string cwd = Directory.GetCurrentDirectory();
                command = new DevCommandSave(RegexHelper.ExtractFile(m, cwd));
                return(true);
            }
            command = null;
            return(false);
        }
예제 #5
0
        public static bool TryParse(string c, out DevCommand command)
        {
            Match m;

            if ((m = REGEX1.Match(c)).Success)
            {
                command = new DevCommandFOW(FogOfWar.Active);
                return(true);
            }
            if ((m = REGEX2.Match(c)).Success)
            {
                command = new DevCommandFOW(FogOfWar.Nothing);
                return(true);
            }
            command = null;
            return(false);
        }
예제 #6
0
        public static bool TryParse(string c, out DevCommand command)
        {
            Match m = REGEX.Match(c);

            if (m.Success)
            {
                string[]        split = Regex.Split(m.Groups[1].Value, RegexHelper.NUM_SPLIT);
                DevCommandSpawn comm  = new DevCommandSpawn();
                comm.TeamIndex = int.Parse(split[0]);
                comm.UnitIndex = int.Parse(split[1]);
                comm.Count     = int.Parse(split[2]);
                comm.X         = float.Parse(split[3]);
                comm.Z         = float.Parse(split[4]);
                command        = comm;
                return(true);
            }
            command = null;
            return(false);
        }
예제 #7
0
 public static bool TryParse(string c, out DevCommand command)
 {
     Match m = REGEX.Match(c);
     if(m.Success) {
         command = new DevCommandStopMotion();
         return true;
     }
     command = null;
     return false;
 }
예제 #8
0
 public static bool TryParse(string c, out DevCommand command)
 {
     Match m = REGEX.Match(c);
     if(m.Success) {
         string[] split = Regex.Split(m.Groups[1].Value, RegexHelper.NUM_SPLIT);
         DevCommandSpawn comm = new DevCommandSpawn();
         comm.TeamIndex = int.Parse(split[0]);
         comm.UnitIndex = int.Parse(split[1]);
         comm.Count = int.Parse(split[2]);
         comm.X = float.Parse(split[3]);
         comm.Z = float.Parse(split[4]);
         command = comm;
         return true;
     }
     command = null;
     return false;
 }
예제 #9
0
 public static bool TryParse(string c, out DevCommand command)
 {
     Match m = REGEX.Match(c);
     if(m.Success) {
         string cwd = Directory.GetCurrentDirectory();
         command = new DevCommandSave(RegexHelper.ExtractFile(m, cwd));
         return true;
     }
     command = null;
     return false;
 }
예제 #10
0
 public static bool TryParse(string c, out DevCommand command)
 {
     Match m;
     if((m = REGEX1.Match(c)).Success) {
         command = new DevCommandFOW(FogOfWar.Active);
         return true;
     }
     if((m = REGEX2.Match(c)).Success) {
         command = new DevCommandFOW(FogOfWar.Nothing);
         return true;
     }
     command = null;
     return false;
 }