From e491e0716d0a745a275ca68657ed23a127d787e3 Mon Sep 17 00:00:00 2001 From: tigerchen Date: Wed, 27 Nov 2019 12:25:46 +0800 Subject: [PATCH] add position config --- .../Assets/Scenes/Ice.unity | 178 +++++++++--------- .../Assets/Scripts/DebugUI.cs | 17 +- .../Assets/Visual Effect Graphs/frozenVFX.vfx | 2 +- 3 files changed, 105 insertions(+), 92 deletions(-) diff --git a/Unity-19050-01_ForstCoronation/Assets/Scenes/Ice.unity b/Unity-19050-01_ForstCoronation/Assets/Scenes/Ice.unity index 14867b7..92e1b80 100644 --- a/Unity-19050-01_ForstCoronation/Assets/Scenes/Ice.unity +++ b/Unity-19050-01_ForstCoronation/Assets/Scenes/Ice.unity @@ -530,7 +530,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 229411701} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -3.09, y: 2.66, z: -5.195} + m_LocalPosition: {x: -3.09, y: 2.66, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -615,7 +615,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 590248846} m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} - m_LocalPosition: {x: -0.21, y: 6.62, z: -4.99} + m_LocalPosition: {x: -0.21, y: 6.62, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -820,7 +820,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 706372899} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 2.46, y: 0, z: -5.01} + m_LocalPosition: {x: 2.46, y: 0, z: 0} m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} m_Children: [] m_Father: {fileID: 0} @@ -880,9 +880,9 @@ MonoBehaviour: m_EditorClassIdentifier: m_ExecuteInEditor: 1 m_Bindings: - - {fileID: 1111578217} - {fileID: 1111578222} - {fileID: 1111578227} + - {fileID: 1111578217} m_VisualEffect: {fileID: 1111578220} --- !u!73398921 &1111578219 VFXRenderer: @@ -944,13 +944,13 @@ VisualEffect: - m_Value: {x: 0, y: 0, z: 0} m_Name: Emitter m_Overridden: 1 - - m_Value: {x: 0.94, y: 0, z: 0} + - m_Value: {x: 0, y: 0, z: 0} m_Name: _Emitter m_Overridden: 1 - - m_Value: {x: -3.32, y: 0, z: -5.12} + - m_Value: {x: -3.32, y: 0, z: 0} m_Name: _Target m_Overridden: 1 - - m_Value: {x: 2.46, y: 0, z: -5.01} + - m_Value: {x: 2.46, y: 0, z: 0} m_Name: _BaseEmitter m_Overridden: 1 m_Vector4f: @@ -1059,6 +1059,82 @@ MonoBehaviour: m_Parameter: m_Name: _Emitter Target: {fileID: 1324214450} +--- !u!114 &1279790688 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3df29e7cc05fbec4aa43e06ea875565d, type: 3} + m_Name: + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + rotation: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + skyIntensityMode: + m_OverrideState: 0 + m_Value: 0 + exposure: + m_OverrideState: 0 + m_Value: 0 + multiplier: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxValue: + m_OverrideState: 0 + m_Value: 1 + min: 0 + desiredLuxValue: + m_OverrideState: 0 + m_Value: 20000 + updateMode: + m_OverrideState: 0 + m_Value: 0 + updatePeriod: + m_OverrideState: 0 + m_Value: 0 + min: 0 + includeSunInBaking: + m_OverrideState: 0 + m_Value: 0 + sunSize: + m_OverrideState: 0 + m_Value: 0.04 + min: 0 + max: 1 + sunSizeConvergence: + m_OverrideState: 0 + m_Value: 5 + min: 1 + max: 10 + atmosphereThickness: + m_OverrideState: 0 + m_Value: 1 + min: 0 + max: 5 + skyTint: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + groundColor: + m_OverrideState: 0 + m_Value: {r: 0.369, g: 0.349, b: 0.341, a: 1} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + enableSunDisk: + m_OverrideState: 0 + m_Value: 1 --- !u!1 &1324214445 GameObject: m_ObjectHideFlags: 0 @@ -1131,8 +1207,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1324214445} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0.94, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.4, y: 0.4, z: 0.4} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 5 @@ -1414,6 +1490,8 @@ MonoBehaviour: emitter: {fileID: 1324214445} button: {fileID: 1859907171} stat: + Emitter_x: 2.5 + Target_x: -2.5 growingSpeed: 0.015 fadeSpeed: 0 smooth: 0 @@ -1431,82 +1509,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1611372839 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3df29e7cc05fbec4aa43e06ea875565d, type: 3} - m_Name: - m_EditorClassIdentifier: - active: 1 - m_AdvancedMode: 0 - rotation: - m_OverrideState: 0 - m_Value: 0 - min: 0 - max: 360 - skyIntensityMode: - m_OverrideState: 0 - m_Value: 0 - exposure: - m_OverrideState: 0 - m_Value: 0 - multiplier: - m_OverrideState: 0 - m_Value: 1 - min: 0 - upperHemisphereLuxValue: - m_OverrideState: 0 - m_Value: 1 - min: 0 - desiredLuxValue: - m_OverrideState: 0 - m_Value: 20000 - updateMode: - m_OverrideState: 0 - m_Value: 0 - updatePeriod: - m_OverrideState: 0 - m_Value: 0 - min: 0 - includeSunInBaking: - m_OverrideState: 0 - m_Value: 0 - sunSize: - m_OverrideState: 0 - m_Value: 0.04 - min: 0 - max: 1 - sunSizeConvergence: - m_OverrideState: 0 - m_Value: 5 - min: 1 - max: 10 - atmosphereThickness: - m_OverrideState: 0 - m_Value: 1 - min: 0 - max: 5 - skyTint: - m_OverrideState: 0 - m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} - hdr: 0 - showAlpha: 1 - showEyeDropper: 1 - groundColor: - m_OverrideState: 0 - m_Value: {r: 0.369, g: 0.349, b: 0.341, a: 1} - hdr: 0 - showAlpha: 1 - showEyeDropper: 1 - enableSunDisk: - m_OverrideState: 0 - m_Value: 1 --- !u!1 &1743590121 GameObject: m_ObjectHideFlags: 0 @@ -1695,7 +1697,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1743590121} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3.78, y: 2.66, z: -4.94} + m_LocalPosition: {x: 3.78, y: 2.66, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -1867,7 +1869,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Profile: {fileID: 11400000, guid: 61403f0eeedb6b84fafb386b66e1edae, type: 2} m_StaticLightingSkyUniqueID: 2 - m_SkySettings: {fileID: 1611372839} + m_SkySettings: {fileID: 1279790688} m_SkySettingsFromProfile: {fileID: -3409118194237871670, guid: 61403f0eeedb6b84fafb386b66e1edae, type: 2} --- !u!114 &1937584651 @@ -1987,7 +1989,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2032731583} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -3.32, y: 0, z: -5.12} + m_LocalPosition: {x: -3.32, y: 0, z: 0} m_LocalScale: {x: 0.7, y: 0.7, z: 0.7} m_Children: [] m_Father: {fileID: 0} diff --git a/Unity-19050-01_ForstCoronation/Assets/Scripts/DebugUI.cs b/Unity-19050-01_ForstCoronation/Assets/Scripts/DebugUI.cs index 0b13202..eeb16c7 100644 --- a/Unity-19050-01_ForstCoronation/Assets/Scripts/DebugUI.cs +++ b/Unity-19050-01_ForstCoronation/Assets/Scripts/DebugUI.cs @@ -16,6 +16,14 @@ public class DebugUI : MonoBehaviour public GameObject button; public string stat = "wait"; + [Config] + [Range(0f, 5f)] + public float Emitter_x = 2.5f; + + [Config] + [Range(-5f, 0f)] + public float Target_x = -2.5f; + [Config] [Range(0f, 0.02f)] public float growingSpeed; @@ -98,9 +106,12 @@ public class DebugUI : MonoBehaviour lerp_val = Mathf.Clamp(lerp_val, 0, 1); vfx.SetFloat("_LerpVal", lerp_val); - Vector3 base_pos = baseEmitter.GetComponent().position; - Vector3 target_pos = target.GetComponent().position; - emitter.GetComponent().position = Vector3.Lerp(base_pos, target_pos, lerp_val); + + Transform base_trans = baseEmitter.GetComponent(); + Transform targ_trans = target.GetComponent(); + base_trans.position = new Vector3(Emitter_x, 0, 0); + targ_trans.position = new Vector3(Target_x, 0, 0); + emitter.GetComponent().position = Vector3.Lerp(base_trans.position, targ_trans.position, lerp_val); } IEnumerator sendCompleted() diff --git a/Unity-19050-01_ForstCoronation/Assets/Visual Effect Graphs/frozenVFX.vfx b/Unity-19050-01_ForstCoronation/Assets/Visual Effect Graphs/frozenVFX.vfx index 7a6f21a..467a9e5 100644 --- a/Unity-19050-01_ForstCoronation/Assets/Visual Effect Graphs/frozenVFX.vfx +++ b/Unity-19050-01_ForstCoronation/Assets/Visual Effect Graphs/frozenVFX.vfx @@ -90,7 +90,7 @@ MonoBehaviour: x: -1346 y: -436 width: 3249 - height: 2835 + height: 2834 --- !u!114 &114350483966674976 MonoBehaviour: m_ObjectHideFlags: 1