Exemple #1
0
 public void SetSkyType(SkyType newSkyType)                                       // GENERATED
 {
     if (SetSkyTypeLocal(newSkyType))                                             // GENERATED
     {
         photonView.RPC("SetSkyTypeRPC", PhotonTargets.AllViaServer, newSkyType); // GENERATED
     }
 }
Exemple #2
0
 bool SetSkyTypeLocal(SkyType newSkyType) // GENERATED
 {
     if (skyType == newSkyType)           // GENERATED
     {
         return(false);                   // GENERATED
     }
     this.skyType = newSkyType;           // GENERATED
     UpdateSkyType();                     // GENERATED
     return(true);                        // GENERATED
 }
Exemple #3
0
 protected virtual LightingExplorerTableColumn[] GetVolumeColumns()
 {
     return(new[]
     {
         new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Name, HDStyles.Name, null, 200),                                               // 0: Name
         new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Checkbox, HDStyles.On, "m_Enabled", 25),                                       // 1: Enabled
         new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Checkbox, HDStyles.GlobalVolume, "isGlobal", 60),                              // 2: Is Global
         new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Float, HDStyles.Priority, "priority", 60),                                     // 3: Priority
         new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Custom, HDStyles.VolumeProfile, "sharedProfile", 100, (r, prop, dep) =>        // 4: Profile
         {
             if (prop.objectReferenceValue != null)
             {
                 EditorGUI.PropertyField(r, prop, GUIContent.none);
             }
         }),
         new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Checkbox, HDStyles.HasVisualEnvironment, "sharedProfile", 100, (r, prop, dep) =>// 5: Has Visual environment
         {
             Volume volume = prop.serializedObject.targetObject as Volume;
             bool hasVisualEnvironment = volumeDataPairing[volume].hasVisualEnvironment;
             EditorGUI.BeginDisabledGroup(true);
             EditorGUI.Toggle(r, hasVisualEnvironment);
             EditorGUI.EndDisabledGroup();
         }),
         new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Custom, HDStyles.SkyType, "sharedProfile", 100, (r, prop, dep) =>              // 6: Sky type
         {
             Volume volume = prop.serializedObject.targetObject as Volume;
             if (volumeDataPairing[volume].hasVisualEnvironment)
             {
                 SkyType skyType = volumeDataPairing[volume].skyType;
                 EditorGUI.BeginDisabledGroup(true);
                 EditorGUI.EnumPopup(r, skyType);
                 EditorGUI.EndDisabledGroup();
             }
         }),
         new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Custom, HDStyles.FogType, "sharedProfile", 100, (r, prop, dep) =>              // 7: Fog type
         {
             Volume volume = prop.serializedObject.targetObject as Volume;
             if (volumeDataPairing[volume].hasVisualEnvironment)
             {
                 FogType fogType = volumeDataPairing[volume].fogType;
                 EditorGUI.BeginDisabledGroup(true);
                 EditorGUI.EnumPopup(r, fogType);
                 EditorGUI.EndDisabledGroup();
             }
         }),
         new LightingExplorerTableColumn(LightingExplorerTableColumn.DataType.Checkbox, HDStyles.HasStaticLightingSky, "sharedProfile", 100, (r, prop, dep) =>       // 8: Has Static Lighting Sky
         {
             Volume volume = prop.serializedObject.targetObject as Volume;
             bool hasStaticLightingSky = volumeDataPairing[volume].hasStaticLightingSky;
             EditorGUI.BeginDisabledGroup(true);
             EditorGUI.Toggle(r, hasStaticLightingSky);
             EditorGUI.EndDisabledGroup();
         }),
     });
 }
        private Material GetSkyboxMaterial(TimeZone iTime, SkyType iSkyType)
        {
            Material result;

            if (iSkyType == SkyType.Normal)
            {
                result = ((iTime != TimeZone.DayTime) ? this._listMatSkyboxes.get_Item(1) : this._listMatSkyboxes.get_Item(0));
            }
            else
            {
                result = ((iSkyType != SkyType.FinalArea171 && iSkyType != SkyType.FinalArea172) ? this._listMatSkyboxes.get_Item(3) : this._listMatSkyboxes.get_Item(2));
            }
            return(result);
        }
Exemple #5
0
            public VolumeData(bool isGlobal, VolumeProfile profile)
            {
                this.isGlobal = isGlobal;
                this.profile  = profile;
                VisualEnvironment visualEnvironment = null;

                this.hasVisualEnvironment = profile != null?profile.TryGet <VisualEnvironment>(typeof(VisualEnvironment), out visualEnvironment) : false;

                if (this.hasVisualEnvironment)
                {
                    this.skyType = (SkyType)visualEnvironment.skyType.value;
                    this.fogType = visualEnvironment.fogType.value;
                }
                else
                {
                    this.skyType = (SkyType)1;
                    this.fogType = (FogType)0;
                }
            }
Exemple #6
0
            public VolumeData(bool isGlobal, VolumeProfile profile, bool hasStaticLightingSky)
            {
                this.isGlobal = isGlobal;
                this.profile  = profile;
                VisualEnvironment visualEnvironment = null;

                this.hasVisualEnvironment = profile.TryGet <VisualEnvironment>(typeof(VisualEnvironment), out visualEnvironment);
                if (this.hasVisualEnvironment)
                {
                    this.skyType = (SkyType)visualEnvironment.skyType.value;
                    this.fogType = visualEnvironment.fogType.value;
                }
                else
                {
                    this.skyType = (SkyType)1;
                    this.fogType = (FogType)0;
                }
                this.hasStaticLightingSky = hasStaticLightingSky;
            }
Exemple #7
0
        private Material GetSkyboxMaterial(KCV.Battle.Utils.TimeZone iTime, SkyType iSkyType)
        {
            object result;

            switch (iSkyType)
            {
            case SkyType.Normal:
                return((iTime != 0) ? _listMatSkyboxes[1] : _listMatSkyboxes[0]);

            case SkyType.FinalArea171:
            case SkyType.FinalArea172:
                result = _listMatSkyboxes[2];
                break;

            default:
                result = _listMatSkyboxes[3];
                break;
            }
            return((Material)result);
        }
Exemple #8
0
        public void ReqTimeZone(KCV.Battle.Utils.TimeZone iTime, SkyType iSkyType)
        {
            _fogSettings(iTime);
            Color seaColor = GetSeaColor(iTime, iSkyType);

            foreach (KeyValuePair <FleetType, Water> dicSeaLevel in _dicSeaLevels)
            {
                dicSeaLevel.Value.reflectionColorTexture = _listTexReflectives[(int)iTime];
                dicSeaLevel.Value.GetComponent <MeshRenderer>().material = (dicSeaLevel.Key != 0) ? _listEnemySeaLevels[(int)iTime] : _listFriendSeaLevels[(int)iTime];
                dicSeaLevel.Value.GetComponent <MeshRenderer>().material.SetColor("_PostMultiplyColor", seaColor);
            }
            BattleCameras battleCameras = BattleTaskManager.GetBattleCameras();

            battleCameras.fieldCameras.ForEach(delegate(BattleFieldCamera x)
            {
                x.skybox.material = _listMatSkyboxes[(int)iTime];
            });
            battleCameras.fieldDimCamera.skybox.material = _listMatSkyboxes[(int)iTime];
            _iTimeZone = iTime;
        }
        private Color GetSeaColor(TimeZone iTime, SkyType iSkyType)
        {
            Color result = Color.get_white();

            if (iSkyType == SkyType.Normal)
            {
                result = KCVColor.ConvertColor(90f, 173f, 177f, 255f);
            }
            else
            {
                int     length = Enum.GetValues(typeof(SkyType)).get_Length();
                SkyType skyType;
                switch (iSkyType)
                {
                case SkyType.FinalArea171:
                    skyType = SkyType.FinalArea172;
                    break;

                case SkyType.FinalArea172:
                    skyType = SkyType.FinalArea173;
                    break;

                case SkyType.FinalArea173:
                    skyType = SkyType.FinalArea174;
                    break;

                case SkyType.FinalArea174:
                    skyType = SkyType.FinalArea174;
                    break;

                default:
                    skyType = SkyType.FinalArea174;
                    break;
                }
                float t = (float)skyType / (float)(length - 1);
                result = KCVColor.ConvertColor(Mathe.Lerp(90f, 255f, t), Mathe.Lerp(173f, 68f, t), Mathe.Lerp(177f, 68f, t), 255f);
            }
            return(result);
        }
Exemple #10
0
    public static Color GetFogBaseColor(SkyType sky)
    {
        Color rv = Color.white;

        switch (sky)
        {
        case SkyType.Day:
            ColorUtility.TryParseHtmlString("#65B6FB", out rv);
            return(rv);

        case SkyType.Space:
            ColorUtility.TryParseHtmlString("#3A1A24", out rv);
            return(rv);

        case SkyType.Overcast:
            ColorUtility.TryParseHtmlString("#D2DCF7", out rv);
            return(rv);

        case SkyType.SolidColor:
        default:
            return(Color.white);
        }
    }
Exemple #11
0
        private Color GetSeaColor(KCV.Battle.Utils.TimeZone iTime, SkyType iSkyType)
        {
            Color white = Color.white;

            if (iSkyType == SkyType.Normal)
            {
                return(KCVColor.ConvertColor(90f, 173f, 177f, 255f));
            }
            int     length = Enum.GetValues(typeof(SkyType)).Length;
            SkyType skyType;

            switch (iSkyType)
            {
            case SkyType.FinalArea171:
                skyType = SkyType.FinalArea172;
                break;

            case SkyType.FinalArea172:
                skyType = SkyType.FinalArea173;
                break;

            case SkyType.FinalArea173:
                skyType = SkyType.FinalArea174;
                break;

            case SkyType.FinalArea174:
                skyType = SkyType.FinalArea174;
                break;

            default:
                skyType = SkyType.FinalArea174;
                break;
            }
            float t = (float)skyType / (float)(length - 1);

            return(KCVColor.ConvertColor(Mathe.Lerp(90f, 255f, t), Mathe.Lerp(173f, 68f, t), Mathe.Lerp(177f, 68f, t), 255f));
        }
Exemple #12
0
        private void SetSkyType(BattleManager manager)
        {
            if (manager is PracticeBattleManager)
            {
                _iSkyType = SkyType.Normal;
            }
            else if (manager.Map.AreaId == 17)
            {
                switch (manager.Map.No)
                {
                case 1:
                    _iSkyType = SkyType.FinalArea171;
                    break;

                case 2:
                    _iSkyType = SkyType.FinalArea172;
                    break;

                case 3:
                    _iSkyType = SkyType.FinalArea173;
                    break;

                case 4:
                    _iSkyType = SkyType.FinalArea174;
                    break;

                default:
                    _iSkyType = SkyType.Normal;
                    break;
                }
            }
            else
            {
                _iSkyType = SkyType.Normal;
            }
        }
        public void ReqTimeZone(TimeZone iTime, SkyType iSkyType)
        {
            this._fogSettings(iTime);
            Color seaColor = this.GetSeaColor(iTime, iSkyType);

            using (Dictionary <FleetType, Water> .Enumerator enumerator = this._dicSeaLevels.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    KeyValuePair <FleetType, Water> current = enumerator.get_Current();
                    current.get_Value().set_reflectionColorTexture(this._listTexReflectives.get_Item((int)iTime));
                    current.get_Value().GetComponent <MeshRenderer>().set_material((current.get_Key() != FleetType.Friend) ? this._listEnemySeaLevels.get_Item((int)iTime) : this._listFriendSeaLevels.get_Item((int)iTime));
                    current.get_Value().GetComponent <MeshRenderer>().get_material().SetColor("_PostMultiplyColor", seaColor);
                }
            }
            BattleCameras battleCameras = BattleTaskManager.GetBattleCameras();

            battleCameras.fieldCameras.ForEach(delegate(BattleFieldCamera x)
            {
                x.skybox.set_material(this._listMatSkyboxes.get_Item((int)iTime));
            });
            battleCameras.fieldDimCamera.skybox.set_material(this._listMatSkyboxes.get_Item((int)iTime));
            this._iTimeZone = iTime;
        }
Exemple #14
0
 void SetSkyTypeRPC(SkyType newSkyType) // GENERATED
 {
     SetSkyTypeLocal(newSkyType);       // GENERATED
 }