コード例 #1
0
ファイル: Pig.cs プロジェクト: shammill/PigWorld-Simulation
        /// <summary>
        /// Determines if there is a wolf nearby.
        /// </summary>
        /// <returns> true if there is a wolf nearby, or false otherwise. </returns>
        public bool IsWolfNearby()
        {
            Echo echo = FindNearest(typeof(Wolf));

            return(echo != null && echo.distance < SAFE_DISTANCE_FROM_WOLF);
        }