예제 #1
0
        protected override List <(float xMin, float zMin, float xMax, float zMax)> GetQuadList()
        {
            List <(int y, int xMin, int xMax, int zMin, int zMax)> waters = WaterUtilities.GetWaterLevels();
            List <(float, float, float, float)> quads = new List <(float, float, float, float)>();

            foreach (var water in waters)
            {
                quads.Add((water.xMin, water.xMax, water.zMin, water.zMax));
            }
            return(quads);
        }
예제 #2
0
        protected override List <List <(float x, float y, float z, Color color, bool isHovered)> > GetQuadList(MapObjectHoverData hoverData)
        {
            List <(int y, int xMin, int xMax, int zMin, int zMax)> waters = WaterUtilities.GetWaterLevels();
            List <List <(float x, float y, float z, Color color, bool isHovered)> > quads =
                new List <List <(float x, float y, float z, Color color, bool isHovered)> >();

            for (int i = 0; i < waters.Count; i++)
            {
                bool isHovered = this == hoverData?.MapObject && i == hoverData?.Index;
                var  water     = waters[i];
                List <(float x, float y, float z, Color color, bool isHovered)> quad =
                    new List <(float x, float y, float z, Color color, bool isHovered)>();
                quad.Add((water.xMin, water.y, water.zMin, Color, isHovered));
                quad.Add((water.xMin, water.y, water.zMax, Color, isHovered));
                quad.Add((water.xMax, water.y, water.zMax, Color, isHovered));
                quad.Add((water.xMax, water.y, water.zMin, Color, isHovered));
                quads.Add(quad);
            }
            return(quads);
        }