コード例 #1
0
ファイル: Cluster.cs プロジェクト: BUFORD/Funky
        }          // of IsPointReachable()

        /// <summary>
        /// Incorporates all points from given cluster to this cluster
        /// </summary>
        /// <param name="p_Cluster"></param>
        /// <returns>true always</returns>
        public virtual bool AnnexCluster(cluster p_Cluster)
        {
            MidPoint += p_Cluster.MidPoint;
            ListPoints.AddRange(p_Cluster.ListPoints);
            RAGUIDS.AddRange(p_Cluster.RAGUIDS);
            return(true);
        }          // of AnnexCluster()
コード例 #2
0
ファイル: Cluster.cs プロジェクト: BUFORD/Funky
        }          // of MergeClusters()

        public override bool Equals(object obj)
        {
            //Check for null and compare run-time types.
            if (obj == null || GetType() != obj.GetType())
            {
                return(false);
            }
            cluster p = (cluster)obj;

            return(Midpoint.Equals(p.Midpoint));
        }
コード例 #3
0
        }          // of AddPoint()

        /// <summary>
        /// Incorporates all points from given cluster to this cluster
        /// </summary>
        /// <param name="p_Cluster"></param>
        /// <returns>true always</returns>
        public override bool AnnexCluster(cluster p_Cluster)
        {
            base.AnnexCluster(p_Cluster);

            //Unit specific
            UnitCluster u_Cluster = (UnitCluster)p_Cluster;

            ListUnits.AddRange(u_Cluster.ListUnits);
            if (this.NearestMonsterDistance > u_Cluster.NearestMonsterDistance)
            {
                this.NearestMonsterDistance = u_Cluster.NearestMonsterDistance;
            }
            Info.Merge(u_Cluster.Info);


            return(true);
        }          // of AnnexCluster()