Beispiel #1
0
        public static string CheckEnemy(MyDm dm)
        {
            if (string.IsNullOrEmpty(enemy_fonts))
            {
                enemy_fonts = string.Join("|", GetEnemyNames());
                dm.SetDict(0, font_file);
            }
            var p = dm.FindPic(0, 0, 2000, 2000, "resources/arrow1.bmp");

            if (p.X <= 0)
            {
                return(null);
            }
            var w        = 203;
            var h        = 331;
            var left     = p.X - w;
            var top      = p.Y;
            var mask_str = "";

            for (int i = 0; i < 5; i++)
            {
                var x1 = left + 13;
                var y1 = top + 9 + 68 * i;
                var r  = dm.FindStr(x1, y1, x1 + 157, y1 + 15, enemy_fonts, "f1ffb1-555555");
                mask_str += r.X > 0 ? 1 : 0;
            }
            return(mask_str);
        }