SetRadius() публичный Метод

public SetRadius ( int r ) : void
r int
Результат void
Пример #1
0
        private void Lookup(CommandArgs args)
        {
            TSPlayer        ply      = args.Player;
            var             param    = args.Parameters;
            LogTileArgument argument = new LogTileArgument();

            foreach (string keyval in param)
            {
                string[] pair = keyval.Split('=');
                if (pair.Length < 2)
                {
                    continue;
                }
                string key = pair[0];
                string val = pair[1];

                switch (key)
                {
                case "area":
                    int radius;
                    int.TryParse(val, out radius);
                    argument.SetRadius(radius);
                    break;

                case "since":
                    int time;
                    int.TryParse(val, out time);
                    argument.SetSince(time);
                    break;

                case "page":
                    int page;
                    int.TryParse(val, out page);
                    argument.SetPage(page);
                    break;

                case "name":
                    argument.SetPlayer(val);
                    break;

                case "ip":
                    argument.SetIP(val);
                    break;

                default:
                    break;
                }
            }
            LookupTiles(ply, argument);
        }
Пример #2
0
        private void Lookup(CommandArgs args)
        {
            TSPlayer ply = args.Player;
            var param = args.Parameters;
            LogTileArgument argument = new LogTileArgument();
            foreach (string keyval in param)
            {
                string[] pair = keyval.Split('=');
                if (pair.Length < 2)
                    continue;
                string key = pair[0];
                string val = pair[1];

                switch (key)
                {
                    case "area":
                        int radius;
                        int.TryParse(val, out radius);
                        argument.SetRadius(radius);
                        break;
                    case "since":
                        int time;
                        int.TryParse(val, out time);
                        argument.SetSince(time);
                        break;
                    case "page":
                        int page;
                        int.TryParse(val, out page);
                        argument.SetPage(page);
                        break;
                    case "name":
                        argument.SetPlayer(val);
                        break;
                    case "ip":
                        argument.SetIP(val);
                        break;
                    default:
                        break;
                }
            }
            LookupTiles(ply, argument);
        }