コード例 #1
0
        static LightningBoltParameters()
        {
            string[] names = QualitySettings.names;
            for (int i = 0; i < names.Length; i++)
            {
                switch (i)
                {
                case 0:
                    QualityMaximums[i] = new LightningQualityMaximum {
                        MaximumGenerations = 3, MaximumLightPercent = 0, MaximumShadowPercent = 0.0f
                    };
                    break;

                case 1:
                    QualityMaximums[i] = new LightningQualityMaximum {
                        MaximumGenerations = 4, MaximumLightPercent = 0, MaximumShadowPercent = 0.0f
                    };
                    break;

                case 2:
                    QualityMaximums[i] = new LightningQualityMaximum {
                        MaximumGenerations = 5, MaximumLightPercent = 0.1f, MaximumShadowPercent = 0.0f
                    };
                    break;

                case 3:
                    QualityMaximums[i] = new LightningQualityMaximum {
                        MaximumGenerations = 5, MaximumLightPercent = 0.1f, MaximumShadowPercent = 0.0f
                    };
                    break;

                case 4:
                    QualityMaximums[i] = new LightningQualityMaximum {
                        MaximumGenerations = 6, MaximumLightPercent = 0.05f, MaximumShadowPercent = 0.1f
                    };
                    break;

                case 5:
                    QualityMaximums[i] = new LightningQualityMaximum {
                        MaximumGenerations = 7, MaximumLightPercent = 0.025f, MaximumShadowPercent = 0.05f
                    };
                    break;

                default:
                    QualityMaximums[i] = new LightningQualityMaximum {
                        MaximumGenerations = 8, MaximumLightPercent = 0.025f, MaximumShadowPercent = 0.05f
                    };
                    break;
                }
            }
        }
コード例 #2
0
 static LightningBoltParameters()
 {
     string[] names = QualitySettings.names;
     for (int i = 0; i < names.Length; i++)
     {
         switch (i)
         {
             case 0:
                 QualityMaximums[i] = new LightningQualityMaximum { MaximumGenerations = 3, MaximumLightPercent = 0, MaximumShadowPercent = 0.0f };
                 break;
             case 1:
                 QualityMaximums[i] = new LightningQualityMaximum { MaximumGenerations = 4, MaximumLightPercent = 0, MaximumShadowPercent = 0.0f };
                 break;
             case 2:
                 QualityMaximums[i] = new LightningQualityMaximum { MaximumGenerations = 5, MaximumLightPercent = 0.1f, MaximumShadowPercent = 0.0f };
                 break;
             case 3:
                 QualityMaximums[i] = new LightningQualityMaximum { MaximumGenerations = 5, MaximumLightPercent = 0.1f, MaximumShadowPercent = 0.0f };
                 break;
             case 4:
                 QualityMaximums[i] = new LightningQualityMaximum { MaximumGenerations = 6, MaximumLightPercent = 0.05f, MaximumShadowPercent = 0.1f };
                 break;
             case 5:
                 QualityMaximums[i] = new LightningQualityMaximum { MaximumGenerations = 7, MaximumLightPercent = 0.025f, MaximumShadowPercent = 0.05f };
                 break;
             default:
                 QualityMaximums[i] = new LightningQualityMaximum { MaximumGenerations = 8, MaximumLightPercent = 0.025f, MaximumShadowPercent = 0.05f };
                 break;
         }
     }
 }