From cf58771365b5953c6eac548b172aae880d1f0acd Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Sun, 19 May 2024 17:03:57 +0800 Subject: * rename --- Thronefall_1_57/Decompile/Ara/ElectricalArc.cs | 57 -------------------------- 1 file changed, 57 deletions(-) delete mode 100644 Thronefall_1_57/Decompile/Ara/ElectricalArc.cs (limited to 'Thronefall_1_57/Decompile/Ara/ElectricalArc.cs') diff --git a/Thronefall_1_57/Decompile/Ara/ElectricalArc.cs b/Thronefall_1_57/Decompile/Ara/ElectricalArc.cs deleted file mode 100644 index 14ff239..0000000 --- a/Thronefall_1_57/Decompile/Ara/ElectricalArc.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using UnityEngine; - -namespace Ara; - -[RequireComponent(typeof(AraTrail))] -public class ElectricalArc : MonoBehaviour -{ - private AraTrail trail; - - public Transform source; - - public Transform target; - - public int points = 20; - - public float burstInterval = 0.5f; - - public float burstRandom = 0.2f; - - public float speedRandom = 2f; - - public float positionRandom = 0.1f; - - private float accum; - - private void OnEnable() - { - trail = GetComponent(); - trail.emit = false; - } - - private void Update() - { - accum += Time.deltaTime; - if (accum >= burstInterval) - { - ChangeArc(); - accum = (0f - burstInterval) * UnityEngine.Random.value * burstRandom; - } - } - - private void ChangeArc() - { - trail.points.Clear(); - if (source != null && target != null) - { - for (int i = 0; i < points; i++) - { - float num = (float)i / (float)(points - 1); - float num2 = Mathf.Sin(num * MathF.PI); - Vector3 vector = Vector3.Lerp(source.position, target.position, num); - trail.points.Add(new AraTrail.Point(vector + UnityEngine.Random.onUnitSphere * positionRandom * num2, UnityEngine.Random.onUnitSphere * speedRandom * num2, Vector3.up, Vector3.forward, Color.white, 1f, 0f, burstInterval * 2f)); - } - } - } -} -- cgit v1.1-26-g67d0