Exemplo n.º 1
0
        public iAreaRange GetAreaRange(eAreaType areaType)
        {
            WeatherArea area  = m_script.Area;
            iAreaRange  range = area.GetAreaRange(areaType);

            if (range == null)
            {
                switch (areaType)
                {
                case eAreaType.Cube:
                    range = new CubeRange();
                    break;

                case eAreaType.Cylinder:
                    range = new CylinderRange();
                    break;

                case eAreaType.Sphere:
                    range = new SphereRange();
                    break;
                }
                area.SetAreaRange(areaType, range);
            }

            return(range);
        }
Exemplo n.º 2
0
        private void UpdateProperties_Cube()
        {
            CubeRange range = GetAreaRange(eAreaType.Cube) as CubeRange;

            range.AreaSize      = EditorGUILayout.Vector3Field("区域尺寸", range.AreaSize, m_options);
            range.BlendDistance = EditorGUILayout.FloatField("混合距离", range.BlendDistance, m_options);
        }
Exemplo n.º 3
0
        public void SetAreaRange(eAreaType areaType, iAreaRange range)
        {
            switch (areaType)
            {
            case eAreaType.Global:
                m_globalRange = range as GlobalRange;
                break;

            case eAreaType.Cube:
                m_cubeRange = range as CubeRange;
                break;

            case eAreaType.Cylinder:
                m_cylinderRange = range as CylinderRange;
                break;

            case eAreaType.Sphere:
                m_sphereRange = range as SphereRange;
                break;
            }
        }