Beispiel #1
0
        // 凡是被 ZOC影響到的 都移除 , S = 自己, E 的敵人, 0=可行走, Z= ZOC 
        //  ZOC: 敵人身後 不可行走
        // Ex1:
        //  0 0 0 S 0 0 0  
        //  0 0 0 0 0 0 0 
        //  0 0 0 E 0 0 0
        //  0 0 Z Z Z 0 0

        // Ex2:
        //  0 0 0 S 0 0 0  
        //  0 0 0 0 0 0 0 
        //  0 0 0 0 E Z Z
        //  0 0 0 0 Z Z Z
        //  0 0 0 0 Z Z Z


        // remove Zoc Block
        public List<iVec2> FilterZocPool( iVec2 self , ref List<iVec2> pool, ref List<iVec2> enemy )
        {
            List<iVec2> lst = new List<iVec2>();
            foreach (iVec2 v in pool)
            {
                bool bCol = false;
                foreach (iVec2 v2 in enemy )
                {
					if (self.ZocCheck( v, v2 ))
                    {
                        bCol = true;
                        break;
                    }

                }

                if (bCol){
					continue;
                    //continue; // 重複的過濾掉
				}

                lst.Add(v); // 
            }

            return lst;
        }