Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        public WaveOverlay()
        {
            HalfSize = Vector2.one;
            Rotation = 0.0f;
            Creation = OceanTime();
            Duration = 0.001f;

            Corners = new Vector4[4];

            HeightTex = new OverlayHeightTexture();
            NormalTex = new OverlayNormalTexture();
            FoamTex   = new OverlayFoamTexture();
            ClipTex   = new OverlayClipTexture();

            CalculateLocalToWorld();
            CalculateBounds();
        }
Exemplo n.º 2
0
        /// <summary>
        /// New overlay at this position rotation and size.
        /// </summary>
        public WaveOverlay(Vector3 pos, float rotation, Vector2 halfSize, float duration)
        {
            Position = pos;
            HalfSize = halfSize;
            Rotation = rotation;
            Creation = OceanTime();
            Duration = Mathf.Max(duration, 0.001f);

            Corners = new Vector4[4];

            HeightTex = new OverlayHeightTexture();
            NormalTex = new OverlayNormalTexture();
            FoamTex   = new OverlayFoamTexture();
            ClipTex   = new OverlayClipTexture();

            CalculateLocalToWorld();
            CalculateBounds();
        }
Exemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        public WaveOverlay()
        {
            HalfSize          = Vector2.one;
            Rotation          = 0.0f;
            Creation          = OceanTime();
            Duration          = 0.001f;
            BoundsUpdateStamp = -1;
            DrawDistance      = float.PositiveInfinity;

            Corners = new Vector4[4];

            HeightTex = new OverlayHeightTexture();
            NormalTex = new OverlayNormalTexture();
            FoamTex   = new OverlayFoamTexture();
            ClipTex   = new OverlayClipTexture();

            CalculateLocalToWorld();
            CalculateBounds();
        }