Example #1
0
        /// <summary>
        /// Query the waves at world position xz.
        /// </summary>
        public void QueryWaves(WaveQuery query)
        {
            //Clear previous result in query.
            query.result.Clear();

            if (enabled)
            {
                if (Spectrum != null)
                {
                    Spectrum.QueryWaves(query);
                }

                if (OverlayManager != null)
                {
                    OverlayManager.QueryWaves(query);
                }
            }

            query.result.height += level;
        }
Example #2
0
        /// <summary>
        /// Query the waves at world position xz.
        /// </summary>
        public float QueryWaves(float x, float z)
        {
            m_query.result.Clear();
            m_query.posX = x;
            m_query.posZ = z;

            if (enabled)
            {
                if (Spectrum != null)
                {
                    Spectrum.QueryWaves(m_query);
                }

                if (OverlayManager != null)
                {
                    OverlayManager.QueryWaves(m_query);
                }
            }

            return(m_query.result.height + level);
        }