private static List <Point> GetPointInner(Point pos, string type, bool isLeft)
        {
            List <Point> posLis = new List <Point>();
            int          size   = BattleManager.Instance.MemMap.CardSize;

            if (type == "side")
            {
                posLis.Add(new Point(pos.X, pos.Y - size));
                posLis.Add(new Point(pos.X, pos.Y + size));
            }
            if (type == "back") //击退
            {
                if (!isLeft)
                {
                    posLis.Add(new Point(pos.X + size, pos.Y));
                }
                else
                {
                    posLis.Add(new Point(pos.X - size, pos.Y));
                }
            }
            if (type == "come") //拉过来
            {
                if (!isLeft)
                {
                    posLis.Add(new Point(pos.X - size, pos.Y));
                }
                else
                {
                    posLis.Add(new Point(pos.X + size, pos.Y));
                }
            }
            if (type == "around") //随机
            {
                posLis.Add(new Point(pos.X, pos.Y - size));
                posLis.Add(new Point(pos.X, pos.Y + size));
                posLis.Add(new Point(pos.X - size, pos.Y));
                posLis.Add(new Point(pos.X + size, pos.Y));
            }
            if (type == "rand") //随机
            {
                posLis.Add(BattleLocationManager.GetRandomPoint());
            }
            return(posLis);
        }
Esempio n. 2
0
 public Point GetRandomPoint()
 {
     return(BattleLocationManager.GetRandomPoint());
 }