add vfx config params

master
tigerchen 6 years ago
parent 74dd9bff57
commit 5fc2264d59
  1. 44
      01_ForstCoronation/Unity-19050-01_ForstCoronation/19050-01_ForstCoronation/Assets/Scenes/Ice.unity
  2. 61
      01_ForstCoronation/Unity-19050-01_ForstCoronation/19050-01_ForstCoronation/Assets/Scripts/DebugUI.cs
  3. 18443
      01_ForstCoronation/Unity-19050-01_ForstCoronation/19050-01_ForstCoronation/Assets/Visual Effect Graphs/iceVFX_2018.vfx

@ -1220,6 +1220,24 @@ VisualEffect:
- m_Value: 0 - m_Value: 0
m_Name: Lerp_Val m_Name: Lerp_Val
m_Overridden: 0 m_Overridden: 0
- m_Value: 0.1
m_Name: max_flake_size
m_Overridden: 0
- m_Value: 0.5
m_Name: max_frost_size
m_Overridden: 0
- m_Value: 0.3
m_Name: max_spike_size
m_Overridden: 0
- m_Value: 0
m_Name: min_flake_size
m_Overridden: 0
- m_Value: 0.3
m_Name: min_frost_size
m_Overridden: 0
- m_Value: 0.1
m_Name: min_spike_size
m_Overridden: 0
m_Vector2f: m_Vector2f:
m_Array: [] m_Array: []
m_Vector3f: m_Vector3f:
@ -1239,6 +1257,15 @@ VisualEffect:
m_Array: [] m_Array: []
m_Int: m_Int:
m_Array: m_Array:
- m_Value: 0
m_Name: flying_flake_spawn_rate
m_Overridden: 0
- m_Value: 0
m_Name: ground_flake_spawn_rate
m_Overridden: 0
- m_Value: 0
m_Name: ground_ice_spawn_rate
m_Overridden: 0
- m_Value: 7 - m_Value: 7
m_Name: lifetime m_Name: lifetime
m_Overridden: 0 m_Overridden: 0
@ -1328,9 +1355,9 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_ExecuteInEditor: 1 m_ExecuteInEditor: 1
m_Bindings: m_Bindings:
- {fileID: 1090188930}
- {fileID: 1090188929}
- {fileID: 1090188931} - {fileID: 1090188931}
- {fileID: 1090188929}
- {fileID: 1090188930}
m_VisualEffect: {fileID: 1090188927} m_VisualEffect: {fileID: 1090188927}
--- !u!1 &1216109995 --- !u!1 &1216109995
GameObject: GameObject:
@ -1775,7 +1802,7 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
debugMode: 1 debugMode: 1
debugUI: {fileID: 396373727} canvas: {fileID: 396373727}
vfx: {fileID: 1090188927} vfx: {fileID: 1090188927}
baseEmitter: {fileID: 706372899} baseEmitter: {fileID: 706372899}
target: {fileID: 2032731583} target: {fileID: 2032731583}
@ -1786,7 +1813,16 @@ MonoBehaviour:
Target_x: -3 Target_x: -3
growing_speed: 0.008 growing_speed: 0.008
delay_sec: 2 delay_sec: 2
lifetime: 5 vfx_lifetime: 5
vfx_ground_ice_spawn_rate: 30000
vfx_ground_flake_spawn_rate: 1500
vfx_flying_flake_spawn_rate: 1000
vfx_min_frost_size: 0.3
vfx_max_frost_size: 0.5
vfx_min_spike_size: 0.1
vfx_max_spike_size: 0.3
vfx_min_flake_size: 0
vfx_max_flake_size: 0.1
--- !u!4 &1482770261 --- !u!4 &1482770261
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

@ -9,7 +9,7 @@ using TUIO;
public class DebugUI : MonoBehaviour public class DebugUI : MonoBehaviour
{ {
public bool debugMode = true; public bool debugMode = true;
public GameObject debugUI; public GameObject canvas;
public VisualEffect vfx; public VisualEffect vfx;
public GameObject baseEmitter; public GameObject baseEmitter;
public GameObject target; public GameObject target;
@ -35,7 +35,43 @@ public class DebugUI : MonoBehaviour
[Config] [Config]
[Range(1, 10)] [Range(1, 10)]
public int lifetime = 5; public int vfx_lifetime = 5;
[Config]
[Range(10000, 60000)]
public int vfx_ground_ice_spawn_rate = 30000;
[Config]
[Range(1000, 10000)]
public int vfx_ground_flake_spawn_rate = 5000;
[Config]
[Range(100, 3000)]
public int vfx_flying_flake_spawn_rate = 1000;
[Config]
[Range(0.1f, 0.8f)]
public float vfx_min_frost_size = 0.3f;
[Config]
[Range(0.3f, 1f)]
public float vfx_max_frost_size = 0.5f;
[Config]
[Range(0.01f, 0.5f)]
public float vfx_min_spike_size = 0.1f;
[Config]
[Range(0.1f, 1f)]
public float vfx_max_spike_size = 0.3f;
[Config]
[Range(0f, 0.1f)]
public float vfx_min_flake_size = 0f;
[Config]
[Range(0.05f, 0.3f)]
public float vfx_max_flake_size = 0.1f;
float lerp_val; float lerp_val;
Vector3 final_pos; Vector3 final_pos;
@ -46,7 +82,7 @@ public class DebugUI : MonoBehaviour
{ {
QualitySettings.vSyncCount = 0; QualitySettings.vSyncCount = 0;
stat = "wait"; stat = "wait";
debugUI.SetActive(debugMode); canvas.SetActive(debugMode);
button.GetComponent<Text>().text = stat; button.GetComponent<Text>().text = stat;
lerp_val = 0; lerp_val = 0;
cur_blob_count = 0; cur_blob_count = 0;
@ -75,18 +111,20 @@ public class DebugUI : MonoBehaviour
if (Input.GetKeyDown(KeyCode.F1)) if (Input.GetKeyDown(KeyCode.F1))
{ {
debugMode = !debugMode; debugMode = !debugMode;
debugUI.GetComponent<Canvas>().enabled = debugMode; canvas.GetComponent<Canvas>().enabled = debugMode;
if (debugMode) if (debugMode)
{ {
showObject = true; showObject = true;
setObjectVisible(showObject); setObjectVisible(showObject);
} else }
else
{ {
showObject = false; showObject = false;
setObjectVisible(showObject); setObjectVisible(showObject);
} }
} }
else if (debugMode && Input.GetKeyDown(KeyCode.F2)){ else if (debugMode && Input.GetKeyDown(KeyCode.F2))
{
showObject = !showObject; showObject = !showObject;
setObjectVisible(showObject); setObjectVisible(showObject);
} }
@ -181,6 +219,15 @@ public class DebugUI : MonoBehaviour
void updateVFX() void updateVFX()
{ {
vfx.SetInt("lifetime", lifetime); vfx.SetInt("lifetime", vfx_lifetime);
vfx.SetInt("ground_ice_spawn_rate", vfx_ground_ice_spawn_rate);
vfx.SetInt("ground_flake_spawn_rate", vfx_ground_flake_spawn_rate);
vfx.SetInt("flying_flake_spawn_rate", vfx_flying_flake_spawn_rate);
vfx.SetFloat("min_frost_size", vfx_min_frost_size);
vfx.SetFloat("max_frost_size", vfx_max_frost_size);
vfx.SetFloat("min_spike_size", vfx_min_spike_size);
vfx.SetFloat("max_spike_size", vfx_max_spike_size);
vfx.SetFloat("min_flake_size", vfx_min_flake_size);
vfx.SetFloat("max_flake_size", vfx_max_flake_size);
} }
} }

Loading…
Cancel
Save