| | 1 | | using System.Collections; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using UnityEditor; |
| | 4 | | using UnityEngine; |
| | 5 | |
|
| | 6 | | namespace DCL.Skybox |
| | 7 | | { |
| | 8 | | public static class RenderSatelliteLayer |
| | 9 | | { |
| | 10 | | public static void RenderLayer(ref float timeOfTheDay, EditorToolMeasurements toolSize, TextureLayer layer) |
| | 11 | | { |
| | 12 | | // Texture |
| 0 | 13 | | RenderSimpleValues.RenderTexture(SkyboxEditorLiterals.texture, ref layer.texture); |
| | 14 | |
|
| | 15 | | // Row and Coloumns |
| 0 | 16 | | RenderSimpleValues.RenderVector2Field(SkyboxEditorLiterals.rowsColumns, ref layer.flipbookRowsAndColumns); |
| | 17 | |
|
| | 18 | | // Anim Speed |
| 0 | 19 | | RenderSimpleValues.RenderFloatField(SkyboxEditorLiterals.animSpeed, ref layer.flipbookAnimSpeed); |
| | 20 | |
|
| | 21 | | // Normal Texture |
| 0 | 22 | | RenderSimpleValues.RenderTexture(SkyboxEditorLiterals.normalMap, ref layer.textureNormal); |
| | 23 | |
|
| | 24 | | // Normal Intensity |
| 0 | 25 | | RenderSimpleValues.RenderFloatFieldAsSlider(SkyboxEditorLiterals.normalIntensity, ref layer.normalIntensity, |
| | 26 | |
|
| | 27 | | // Gradient |
| 0 | 28 | | RenderSimpleValues.RenderColorGradientField(layer.color, SkyboxEditorLiterals.color, layer.timeSpan_start, l |
| | 29 | |
|
| 0 | 30 | | EditorGUILayout.Space(10); |
| 0 | 31 | | EditorGUILayout.Space(10); |
| | 32 | |
|
| 0 | 33 | | EditorGUILayout.BeginHorizontal(GUILayout.ExpandWidth(false)); |
| 0 | 34 | | EditorGUILayout.LabelField(SkyboxEditorLiterals.movementType, GUILayout.Width(150), GUILayout.ExpandWidth(fa |
| 0 | 35 | | layer.movementTypeSatellite = (MovementType)EditorGUILayout.EnumPopup(layer.movementTypeSatellite, GUILayout |
| 0 | 36 | | EditorGUILayout.EndHorizontal(); |
| | 37 | |
|
| 0 | 38 | | EditorGUI.indentLevel++; |
| 0 | 39 | | EditorGUILayout.Separator(); |
| | 40 | |
|
| 0 | 41 | | if (layer.movementTypeSatellite == MovementType.Speed) |
| | 42 | | { |
| | 43 | | // Speed |
| 0 | 44 | | RenderSimpleValues.RenderVector2Field(SkyboxEditorLiterals.speed, ref layer.speed_Vector2); |
| 0 | 45 | | } |
| | 46 | | else |
| | 47 | | { |
| | 48 | | // Offset |
| 0 | 49 | | RenderTransitioningVariables.RenderTransitioningVector2(ref timeOfTheDay, layer.offset, SkyboxEditorLite |
| | 50 | | } |
| | 51 | |
|
| 0 | 52 | | EditorGUI.indentLevel--; |
| 0 | 53 | | EditorGUILayout.Space(20); |
| | 54 | |
|
| | 55 | | // Rotation |
| 0 | 56 | | RenderTransitioningVariables.RenderTransitioningFloat(toolSize, ref timeOfTheDay, layer.rotations_float, Sky |
| | 57 | |
|
| 0 | 58 | | EditorGUILayout.Space(12); |
| | 59 | |
|
| | 60 | | // Size |
| 0 | 61 | | RenderTransitioningVariables.RenderTransitioningVector2(ref timeOfTheDay, layer.satelliteWidthHeight, Skybox |
| 0 | 62 | | } |
| | 63 | | } |
| | 64 | | } |