Exemplo n.º 1
0
        private void ClearHexMeshes()
        {
            if (standingWater != null)
            {
                standingWater.Clear();
                HexMeshFactory.Destroy(standingWater);

                standingWater = null;
            }

            if (culture != null)
            {
                culture.Clear();
                HexMeshFactory.Destroy(culture);

                culture = null;
            }

            if (roads != null)
            {
                roads.Clear();
                HexMeshFactory.Destroy(roads);

                roads = null;
            }

            if (marshWater != null)
            {
                marshWater.Clear();
                HexMeshFactory.Destroy(marshWater);

                marshWater = null;
            }

            if (oasisWater != null)
            {
                oasisWater.Clear();
                HexMeshFactory.Destroy(oasisWater);

                oasisWater = null;
            }

            if (oasisLand != null)
            {
                oasisLand.Clear();
                HexMeshFactory.Destroy(oasisLand);

                oasisLand = null;
            }
        }
        private void OnDestroy()
        {
            foreach (var orientationData in UnrenderedOrientationData)
            {
                ReleaseOrientationData(orientationData);
            }

            if (orientationMesh != null)
            {
                orientationMesh.Clear();
                HexMeshFactory.Destroy(orientationMesh);
            }

            if (weightsMesh != null)
            {
                weightsMesh.Clear();
                HexMeshFactory.Destroy(weightsMesh);
            }
        }