commit 998cefe867c4132688b2720ddbb617247f308982 Author: wlt233 <1486185683@qq.com> Date: Mon Apr 1 19:32:28 2024 +0800 init (base model view) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..945fa34 --- /dev/null +++ b/.gitignore @@ -0,0 +1,41 @@ + +[Ll]ibrary/ +[Tt]emp/ +[Oo]bj/ +[Bb]uild/ +[Bb]uilds/ +Assets/AssetStoreTools* + +# Visual Studio cache directory +.vs/ + +# Visual Studio Code cache directory +.vscode/ + +# Autogenerated VS/MD/Consulo solution and project files +ExportedObj/ +.consulo/ +Logs/ +*.csproj +*.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb +*.booproj +*.svd +*.pdb +*.opendb + +# Unity3D generated meta files +*.pidb.meta +*.pdb.meta + +# Unity3D Generated File On Crash Reports +sysinfo.txt + +# Builds +*.apk +*.unitypackage \ No newline at end of file diff --git a/Assets/FX.meta b/Assets/FX.meta new file mode 100644 index 0000000..c514ba9 --- /dev/null +++ b/Assets/FX.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ac671c38d25fba146abad4fea0e652d7 +folderAsset: yes +timeCreated: 1711856756 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_Animation_Comment.cs b/Assets/FX/FX_Animation_Comment.cs new file mode 100644 index 0000000..efcf035 --- /dev/null +++ b/Assets/FX/FX_Animation_Comment.cs @@ -0,0 +1,14 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000771 RID: 1905 + public class FX_Animation_Comment : MonoBehaviour + { + // Token: 0x06003074 RID: 12404 RVA: 0x0010477C File Offset: 0x0010477C + private void Comments(string comments) + { + } + } +} diff --git a/Assets/FX/FX_Animation_Comment.cs.meta b/Assets/FX/FX_Animation_Comment.cs.meta new file mode 100644 index 0000000..531a037 --- /dev/null +++ b/Assets/FX/FX_Animation_Comment.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 762272b12eec5e54a940ce67e5f8ddf6 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_Animation_Event_Number.cs b/Assets/FX/FX_Animation_Event_Number.cs new file mode 100644 index 0000000..16f6c63 --- /dev/null +++ b/Assets/FX/FX_Animation_Event_Number.cs @@ -0,0 +1,18 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000776 RID: 1910 + public class FX_Animation_Event_Number : MonoBehaviour + { + // Token: 0x06003082 RID: 12418 RVA: 0x001050C4 File Offset: 0x001050C4 + public void Event_Number(int theValue) + { + this._evtNumber = theValue; + } + + // Token: 0x040056FE RID: 22270 + private int _evtNumber; + } +} diff --git a/Assets/FX/FX_Animation_Event_Number.cs.meta b/Assets/FX/FX_Animation_Event_Number.cs.meta new file mode 100644 index 0000000..9ae6ec5 --- /dev/null +++ b/Assets/FX/FX_Animation_Event_Number.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e22a68c4cdc95e746a98a8828ab010ee +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_CameraCtrl.cs b/Assets/FX/FX_CameraCtrl.cs new file mode 100644 index 0000000..99c1eac --- /dev/null +++ b/Assets/FX/FX_CameraCtrl.cs @@ -0,0 +1,135 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000777 RID: 1911 + [RequireComponent(typeof(Camera))] + public class FX_CameraCtrl : MonoBehaviour + { + // Token: 0x06003084 RID: 12420 RVA: 0x00105110 File Offset: 0x00105110 + private void Start() + { + this.cameraComponent = base.GetComponent(); + this.fov = this.cameraComponent.fieldOfView; + } + + // Token: 0x06003085 RID: 12421 RVA: 0x00105130 File Offset: 0x00105130 + private void Update() + { + this.lookatPos = base.transform.position + base.transform.forward * this.lookatDistance; + this.MouseUpdate(); + } + + // Token: 0x06003086 RID: 12422 RVA: 0x00105164 File Offset: 0x00105164 + private void MouseUpdate() + { + float num = Input.GetAxis("Mouse ScrollWheel") * -this.wheelSpeed; + if (num != 0f) + { + this.CameraFov(num); + } + if (Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1) || Input.GetMouseButtonDown(2)) + { + this.preMousePos = Input.mousePosition; + } + this.MouseDrag(Input.mousePosition); + } + + // Token: 0x06003087 RID: 12423 RVA: 0x001051D0 File Offset: 0x001051D0 + private void MouseDrag(Vector3 mousePos) + { + Vector3 a = mousePos - this.preMousePos; + if (a.magnitude < 1E-05f) + { + return; + } + if (Input.GetMouseButton(2)) + { + base.transform.Translate(-a * Time.deltaTime * this.mouseMiddleSpeed); + } + else if (Input.GetMouseButton(1)) + { + this.CameraTargetRotate(new Vector2(-a.y, a.x) * this.mouseRightSpeed); + } + else if (Input.GetMouseButton(0)) + { + this.CameraMoveForward(a.y * this.mouseLeftSpeed); + } + this.preMousePos = mousePos; + } + + // Token: 0x06003088 RID: 12424 RVA: 0x00105290 File Offset: 0x00105290 + public void CameraTargetRotate(Vector2 angle) + { + base.transform.RotateAround(this.lookatPos, base.transform.right, angle.x); + base.transform.RotateAround(this.lookatPos, Vector3.up, angle.y); + } + + // Token: 0x06003089 RID: 12425 RVA: 0x001052E0 File Offset: 0x001052E0 + public void CameraRotate(Vector2 angle) + { + base.transform.RotateAround(base.transform.position, base.transform.right, angle.x); + base.transform.RotateAround(base.transform.position, Vector3.up, angle.y); + } + + // Token: 0x0600308A RID: 12426 RVA: 0x00105338 File Offset: 0x00105338 + public void CameraFov(float angle) + { + this.fov += angle; + this.fov = Mathf.Clamp(this.fov, 5f, 170f); + this.cameraComponent.fieldOfView = this.fov; + } + + // Token: 0x0600308B RID: 12427 RVA: 0x00105374 File Offset: 0x00105374 + private void CameraMoveForward(float delta) + { + base.transform.position += base.transform.forward * delta * 0.1f; + } + + // Token: 0x0600308C RID: 12428 RVA: 0x001053A8 File Offset: 0x001053A8 + private void OnDrawGizmos() + { + Gizmos.color = new Color(0f, 0f, 0f, 0.5f); + Gizmos.DrawWireSphere(this.lookatPos, 0.01f); + Gizmos.DrawWireSphere(this.lookatPos, 0.02f); + Gizmos.DrawWireSphere(this.lookatPos, 0.03f); + Gizmos.DrawLine(this.lookatPos, base.transform.position); + } + + // Token: 0x040056FF RID: 22271 + [Range(0.1f, 50f)] + [SerializeField] + private float wheelSpeed = 20f; + + // Token: 0x04005700 RID: 22272 + [Range(0.01f, 10f)] + [SerializeField] + private float mouseMiddleSpeed = 1f; + + // Token: 0x04005701 RID: 22273 + [Range(0.01f, 10f)] + [SerializeField] + private float mouseRightSpeed = 0.2f; + + // Token: 0x04005702 RID: 22274 + [Range(0.01f, 10f)] + [SerializeField] + private float mouseLeftSpeed = 0.1f; + + // Token: 0x04005703 RID: 22275 + private Vector3 preMousePos; + + // Token: 0x04005704 RID: 22276 + private Camera cameraComponent; + + // Token: 0x04005705 RID: 22277 + private float fov; + + // Token: 0x04005706 RID: 22278 + private Vector3 lookatPos; + + // Token: 0x04005707 RID: 22279 + private float lookatDistance = 3f; + } +} diff --git a/Assets/FX/FX_CameraCtrl.cs.meta b/Assets/FX/FX_CameraCtrl.cs.meta new file mode 100644 index 0000000..d05afce --- /dev/null +++ b/Assets/FX/FX_CameraCtrl.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ca0d0301f297cb047b3ed3f1de4d83a6 +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_CopyAndShareMat_SetParam.cs b/Assets/FX/FX_CopyAndShareMat_SetParam.cs new file mode 100644 index 0000000..c5332d5 --- /dev/null +++ b/Assets/FX/FX_CopyAndShareMat_SetParam.cs @@ -0,0 +1,53 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000750 RID: 1872 + public class FX_CopyAndShareMat_SetParam : MonoBehaviour + { + // Token: 0x0600300F RID: 12303 RVA: 0x00101C58 File Offset: 0x00101C58 + private void Start() + { + foreach (Renderer renderer in this._renderers) + { + if (renderer != null && renderer.material != null) + { + if (this._sharedMaterial == null) + { + this._sharedMaterial = new Material(renderer.material); + } + renderer.material = this._sharedMaterial; + } + } + this._propertyID_ValueName = Shader.PropertyToID(this.valueName); + } + + // Token: 0x06003010 RID: 12304 RVA: 0x00101CE0 File Offset: 0x00101CE0 + private void Update() + { + if (this._sharedMaterial != null) + { + this._sharedMaterial.SetFloat(this._propertyID_ValueName, this.value); + } + } + + // Token: 0x040055C2 RID: 21954 + [SerializeField] + private string valueName = "_Opacity"; + + // Token: 0x040055C3 RID: 21955 + [SerializeField] + private float value; + + // Token: 0x040055C4 RID: 21956 + [SerializeField] + private Renderer[] _renderers; + + // Token: 0x040055C5 RID: 21957 + private Material _sharedMaterial; + + // Token: 0x040055C6 RID: 21958 + private int _propertyID_ValueName; + } +} diff --git a/Assets/FX/FX_CopyAndShareMat_SetParam.cs.meta b/Assets/FX/FX_CopyAndShareMat_SetParam.cs.meta new file mode 100644 index 0000000..45a60cc --- /dev/null +++ b/Assets/FX/FX_CopyAndShareMat_SetParam.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: befd315d051060041959f6d29b95a1c7 +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_CopyAndShareMat_SetParam2.cs b/Assets/FX/FX_CopyAndShareMat_SetParam2.cs new file mode 100644 index 0000000..f03a81b --- /dev/null +++ b/Assets/FX/FX_CopyAndShareMat_SetParam2.cs @@ -0,0 +1,66 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000751 RID: 1873 + public class FX_CopyAndShareMat_SetParam2 : MonoBehaviour + { + // Token: 0x06003012 RID: 12306 RVA: 0x00101D2C File Offset: 0x00101D2C + private void Start() + { + foreach (Renderer renderer in this._renderers) + { + if (renderer != null && renderer.material != null) + { + if (this._sharedMaterial == null) + { + this._sharedMaterial = new Material(renderer.material); + } + renderer.material = this._sharedMaterial; + } + } + this._propertyID_ValueName1 = Shader.PropertyToID(this.valueName1); + this._propertyID_ValueName2 = Shader.PropertyToID(this.valueName2); + } + + // Token: 0x06003013 RID: 12307 RVA: 0x00101DC8 File Offset: 0x00101DC8 + private void Update() + { + if (this._sharedMaterial != null) + { + this._sharedMaterial.SetFloat(this._propertyID_ValueName1, this.value1); + this._sharedMaterial.SetFloat(this._propertyID_ValueName2, this.value2); + } + } + + // Token: 0x040055C7 RID: 21959 + [SerializeField] + private string valueName1 = "_Exposure"; + + // Token: 0x040055C8 RID: 21960 + [SerializeField] + private float value1; + + // Token: 0x040055C9 RID: 21961 + [SerializeField] + private string valueName2 = "_Opacity"; + + // Token: 0x040055CA RID: 21962 + [SerializeField] + private float value2; + + // Token: 0x040055CB RID: 21963 + [SerializeField] + private Renderer[] _renderers; + + // Token: 0x040055CC RID: 21964 + private Material _sharedMaterial; + + // Token: 0x040055CD RID: 21965 + private int _propertyID_ValueName1; + + // Token: 0x040055CE RID: 21966 + private int _propertyID_ValueName2; + } +} diff --git a/Assets/FX/FX_CopyAndShareMat_SetParam2.cs.meta b/Assets/FX/FX_CopyAndShareMat_SetParam2.cs.meta new file mode 100644 index 0000000..cea7f2c --- /dev/null +++ b/Assets/FX/FX_CopyAndShareMat_SetParam2.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fc7edbe43a650b3478723bbc50d4d6cc +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_CopyAndShareMat_SetParam3.cs b/Assets/FX/FX_CopyAndShareMat_SetParam3.cs new file mode 100644 index 0000000..3e8a0ca --- /dev/null +++ b/Assets/FX/FX_CopyAndShareMat_SetParam3.cs @@ -0,0 +1,79 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000752 RID: 1874 + public class FX_CopyAndShareMat_SetParam3 : MonoBehaviour + { + // Token: 0x06003015 RID: 12309 RVA: 0x00101E40 File Offset: 0x00101E40 + private void Start() + { + foreach (Renderer renderer in this._renderers) + { + if (renderer != null && renderer.material != null) + { + if (this._sharedMaterial == null) + { + this._sharedMaterial = new Material(renderer.material); + } + renderer.material = this._sharedMaterial; + } + } + this._propertyID_ValueName1 = Shader.PropertyToID(this.valueName1); + this._propertyID_ValueName2 = Shader.PropertyToID(this.valueName2); + this._propertyID_ValueName3 = Shader.PropertyToID(this.valueName3); + } + + // Token: 0x06003016 RID: 12310 RVA: 0x00101EEC File Offset: 0x00101EEC + private void Update() + { + if (this._sharedMaterial != null) + { + this._sharedMaterial.SetFloat(this._propertyID_ValueName1, this.value1); + this._sharedMaterial.SetFloat(this._propertyID_ValueName2, this.value2); + this._sharedMaterial.SetFloat(this._propertyID_ValueName3, this.value3); + } + } + + // Token: 0x040055CF RID: 21967 + [SerializeField] + private string valueName1 = "_Exposure"; + + // Token: 0x040055D0 RID: 21968 + [SerializeField] + private float value1; + + // Token: 0x040055D1 RID: 21969 + [SerializeField] + private string valueName2 = "_Opacity"; + + // Token: 0x040055D2 RID: 21970 + [SerializeField] + private float value2; + + // Token: 0x040055D3 RID: 21971 + [SerializeField] + private string valueName3 = string.Empty; + + // Token: 0x040055D4 RID: 21972 + [SerializeField] + private float value3; + + // Token: 0x040055D5 RID: 21973 + [SerializeField] + private Renderer[] _renderers; + + // Token: 0x040055D6 RID: 21974 + private Material _sharedMaterial; + + // Token: 0x040055D7 RID: 21975 + private int _propertyID_ValueName1; + + // Token: 0x040055D8 RID: 21976 + private int _propertyID_ValueName2; + + // Token: 0x040055D9 RID: 21977 + private int _propertyID_ValueName3; + } +} diff --git a/Assets/FX/FX_CopyAndShareMat_SetParam3.cs.meta b/Assets/FX/FX_CopyAndShareMat_SetParam3.cs.meta new file mode 100644 index 0000000..8134923 --- /dev/null +++ b/Assets/FX/FX_CopyAndShareMat_SetParam3.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b1b3785cd1f43f941a2aec6f2817e51f +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_CopyAndShareMat_UVAdd.cs b/Assets/FX/FX_CopyAndShareMat_UVAdd.cs new file mode 100644 index 0000000..a8801e5 --- /dev/null +++ b/Assets/FX/FX_CopyAndShareMat_UVAdd.cs @@ -0,0 +1,66 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000753 RID: 1875 + public class FX_CopyAndShareMat_UVAdd : MonoBehaviour + { + // Token: 0x06003018 RID: 12312 RVA: 0x00101F64 File Offset: 0x00101F64 + private void Start() + { + foreach (Renderer renderer in this._renderers) + { + if (renderer != null && renderer.material != null) + { + if (this._sharedMaterial == null) + { + this._sharedMaterial = new Material(renderer.material); + } + renderer.material = this._sharedMaterial; + } + } + if (this._sharedMaterial != null) + { + this._sharedMaterial.SetTextureOffset(this.TextureName, Vector2.zero); + } + } + + // Token: 0x06003019 RID: 12313 RVA: 0x00102004 File Offset: 0x00102004 + private void Update() + { + if (this._sharedMaterial != null) + { + this._x = Mathf.Repeat(this._x + 60f * Time.deltaTime * this.addSpeedX, 1f); + this._y = Mathf.Repeat(this._y + 60f * Time.deltaTime * this.addSpeedY, 1f); + Vector2 value = new Vector2(this._x, this._y); + this._sharedMaterial.SetTextureOffset(this.TextureName, value); + } + } + + // Token: 0x040055DA RID: 21978 + [SerializeField] + private string TextureName = "_MainTex"; + + // Token: 0x040055DB RID: 21979 + [SerializeField] + private float addSpeedX; + + // Token: 0x040055DC RID: 21980 + [SerializeField] + private float addSpeedY; + + // Token: 0x040055DD RID: 21981 + [SerializeField] + private Renderer[] _renderers; + + // Token: 0x040055DE RID: 21982 + private Material _sharedMaterial; + + // Token: 0x040055DF RID: 21983 + private float _x; + + // Token: 0x040055E0 RID: 21984 + private float _y; + } +} diff --git a/Assets/FX/FX_CopyAndShareMat_UVAdd.cs.meta b/Assets/FX/FX_CopyAndShareMat_UVAdd.cs.meta new file mode 100644 index 0000000..40271f8 --- /dev/null +++ b/Assets/FX/FX_CopyAndShareMat_UVAdd.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a04895643eb64c847be6dd8f4d9c0da4 +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_CopyMat_SetColor.cs b/Assets/FX/FX_CopyMat_SetColor.cs new file mode 100644 index 0000000..14e7e45 --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetColor.cs @@ -0,0 +1,32 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000754 RID: 1876 + public class FX_CopyMat_SetColor : MonoBehaviour + { + // Token: 0x0600301B RID: 12315 RVA: 0x001020DC File Offset: 0x001020DC + private void Start() + { + Renderer component = base.GetComponent(); + if (component != null && component.material != null) + { + component.material.SetColor(this.valueName, this.color); + component.material.SetColor(this.valueName2, this.color); + } + } + + // Token: 0x040055E1 RID: 21985 + [SerializeField] + private string valueName = "_TintColor"; + + // Token: 0x040055E2 RID: 21986 + [SerializeField] + private string valueName2 = "_Color"; + + // Token: 0x040055E3 RID: 21987 + [SerializeField] + private Color color = new Color(1f, 1f, 1f, 1f); + } +} diff --git a/Assets/FX/FX_CopyMat_SetColor.cs.meta b/Assets/FX/FX_CopyMat_SetColor.cs.meta new file mode 100644 index 0000000..d419292 --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetColor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c93c1c0120ffb164083b514f66deb166 +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_CopyMat_SetColor2_Pulse.cs b/Assets/FX/FX_CopyMat_SetColor2_Pulse.cs new file mode 100644 index 0000000..02900f0 --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetColor2_Pulse.cs @@ -0,0 +1,64 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000755 RID: 1877 + public class FX_CopyMat_SetColor2_Pulse : MonoBehaviour + { + // Token: 0x0600301D RID: 12317 RVA: 0x001021A0 File Offset: 0x001021A0 + private void Start() + { + this.renderer_ = base.GetComponent(); + this.propertyID_ValueName_ = Shader.PropertyToID(this.valueName); + this.count_ = this._changeFrames; + } + + // Token: 0x0600301E RID: 12318 RVA: 0x001021CC File Offset: 0x001021CC + private void Update() + { + if (this.count_ >= this._changeFrames) + { + this.count_ = 0; + if (this.switching_) + { + this.renderer_.material.SetColor(this.propertyID_ValueName_, this._color1); + } + else + { + this.renderer_.material.SetColor(this.propertyID_ValueName_, this._color2); + } + this.switching_ = !this.switching_; + } + this.count_++; + } + + // Token: 0x040055E4 RID: 21988 + [SerializeField] + private string valueName = "_TintColor"; + + // Token: 0x040055E5 RID: 21989 + [SerializeField] + private Color _color1 = new Color(1f, 1f, 1f, 1f); + + // Token: 0x040055E6 RID: 21990 + [SerializeField] + private Color _color2 = new Color(1f, 1f, 1f, 1f); + + // Token: 0x040055E7 RID: 21991 + [SerializeField] + private int _changeFrames = 1; + + // Token: 0x040055E8 RID: 21992 + private Renderer renderer_; + + // Token: 0x040055E9 RID: 21993 + private bool switching_; + + // Token: 0x040055EA RID: 21994 + private int count_; + + // Token: 0x040055EB RID: 21995 + private int propertyID_ValueName_; + } +} diff --git a/Assets/FX/FX_CopyMat_SetColor2_Pulse.cs.meta b/Assets/FX/FX_CopyMat_SetColor2_Pulse.cs.meta new file mode 100644 index 0000000..0657cd6 --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetColor2_Pulse.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cf904fa012b2a9a46b0050bd4e342005 +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_CopyMat_SetColor_Child.cs b/Assets/FX/FX_CopyMat_SetColor_Child.cs new file mode 100644 index 0000000..c19ce24 --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetColor_Child.cs @@ -0,0 +1,42 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000756 RID: 1878 + public class FX_CopyMat_SetColor_Child : MonoBehaviour + { + // Token: 0x06003020 RID: 12320 RVA: 0x00102298 File Offset: 0x00102298 + private void Start() + { + int propertyID_ValueName1 = Shader.PropertyToID(this.valueName); + int propertyID_ValueName2 = Shader.PropertyToID(this.valueName2); + GetAllChildren.MapComponentsInChildren(base.transform, delegate(Renderer renderer) + { + if (null == renderer) + { + return; + } + Material[] materials = renderer.materials; + for (int i = 0; i < materials.Length; i++) + { + materials[i].SetColor(propertyID_ValueName1, this.color); + materials[i].SetColor(propertyID_ValueName2, this.color); + } + renderer.materials = materials; + }); + } + + // Token: 0x040055EC RID: 21996 + [SerializeField] + private string valueName = "_TintColor"; + + // Token: 0x040055ED RID: 21997 + [SerializeField] + private string valueName2 = "_Color"; + + // Token: 0x040055EE RID: 21998 + [SerializeField] + private Color color = new Color(1f, 1f, 1f, 1f); + } +} diff --git a/Assets/FX/FX_CopyMat_SetColor_Child.cs.meta b/Assets/FX/FX_CopyMat_SetColor_Child.cs.meta new file mode 100644 index 0000000..a55fa6b --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetColor_Child.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 552d7c8781968c04c9b5a9fd0556ca6c +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_CopyMat_SetParam.cs b/Assets/FX/FX_CopyMat_SetParam.cs new file mode 100644 index 0000000..61bd8d8 --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetParam.cs @@ -0,0 +1,40 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000758 RID: 1880 + public class FX_CopyMat_SetParam : MonoBehaviour + { + // Token: 0x06003024 RID: 12324 RVA: 0x00102378 File Offset: 0x00102378 + private void Start() + { + Renderer component = base.GetComponent(); + this._material = ((!(component != null)) ? null : component.material); + this._propertyID_ValueName = Shader.PropertyToID(this.valueName); + } + + // Token: 0x06003025 RID: 12325 RVA: 0x001023BC File Offset: 0x001023BC + private void Update() + { + if (this._material != null) + { + this._material.SetFloat(this._propertyID_ValueName, this.value); + } + } + + // Token: 0x040055F2 RID: 22002 + [SerializeField] + private string valueName = "_Opacity"; + + // Token: 0x040055F3 RID: 22003 + [SerializeField] + private float value; + + // Token: 0x040055F4 RID: 22004 + private Material _material; + + // Token: 0x040055F5 RID: 22005 + private int _propertyID_ValueName; + } +} diff --git a/Assets/FX/FX_CopyMat_SetParam.cs.meta b/Assets/FX/FX_CopyMat_SetParam.cs.meta new file mode 100644 index 0000000..9162133 --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetParam.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ddebf46f61f23594c98deb4a1353a2eb +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_CopyMat_SetParam2.cs b/Assets/FX/FX_CopyMat_SetParam2.cs new file mode 100644 index 0000000..efade03 --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetParam2.cs @@ -0,0 +1,53 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000759 RID: 1881 + public class FX_CopyMat_SetParam2 : MonoBehaviour + { + // Token: 0x06003027 RID: 12327 RVA: 0x00102408 File Offset: 0x00102408 + private void Start() + { + Renderer component = base.GetComponent(); + this._material = ((!(component != null)) ? null : component.material); + this._propertyID_ValueName1 = Shader.PropertyToID(this.valueName1); + this._propertyID_ValueName2 = Shader.PropertyToID(this.valueName2); + } + + // Token: 0x06003028 RID: 12328 RVA: 0x0010245C File Offset: 0x0010245C + private void Update() + { + if (this._material != null) + { + this._material.SetFloat(this._propertyID_ValueName1, this.value1); + this._material.SetFloat(this._propertyID_ValueName2, this.value2); + } + } + + // Token: 0x040055F6 RID: 22006 + [SerializeField] + private string valueName1 = "_Exposure"; + + // Token: 0x040055F7 RID: 22007 + [SerializeField] + private float value1; + + // Token: 0x040055F8 RID: 22008 + [SerializeField] + private string valueName2 = "_Opacity"; + + // Token: 0x040055F9 RID: 22009 + [SerializeField] + private float value2; + + // Token: 0x040055FA RID: 22010 + private Material _material; + + // Token: 0x040055FB RID: 22011 + private int _propertyID_ValueName1; + + // Token: 0x040055FC RID: 22012 + private int _propertyID_ValueName2; + } +} diff --git a/Assets/FX/FX_CopyMat_SetParam2.cs.meta b/Assets/FX/FX_CopyMat_SetParam2.cs.meta new file mode 100644 index 0000000..fe6b905 --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetParam2.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 810502cc3a628124f94a97bfc7535ba9 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_CopyMat_SetParam3.cs b/Assets/FX/FX_CopyMat_SetParam3.cs new file mode 100644 index 0000000..a4116d1 --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetParam3.cs @@ -0,0 +1,66 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200075A RID: 1882 + public class FX_CopyMat_SetParam3 : MonoBehaviour + { + // Token: 0x0600302A RID: 12330 RVA: 0x001024D4 File Offset: 0x001024D4 + private void Start() + { + Renderer component = base.GetComponent(); + this._material = ((!(component != null)) ? null : component.material); + this._propertyID_ValueName1 = Shader.PropertyToID(this.valueName1); + this._propertyID_ValueName2 = Shader.PropertyToID(this.valueName2); + this._propertyID_ValueName3 = Shader.PropertyToID(this.valueName3); + } + + // Token: 0x0600302B RID: 12331 RVA: 0x0010253C File Offset: 0x0010253C + private void Update() + { + if (this._material != null) + { + this._material.SetFloat(this._propertyID_ValueName1, this.value1); + this._material.SetFloat(this._propertyID_ValueName2, this.value2); + this._material.SetFloat(this._propertyID_ValueName3, this.value3); + } + } + + // Token: 0x040055FD RID: 22013 + [SerializeField] + private string valueName1 = "_Exposure"; + + // Token: 0x040055FE RID: 22014 + [SerializeField] + private float value1; + + // Token: 0x040055FF RID: 22015 + [SerializeField] + private string valueName2 = "_Opacity"; + + // Token: 0x04005600 RID: 22016 + [SerializeField] + private float value2; + + // Token: 0x04005601 RID: 22017 + [SerializeField] + private string valueName3 = string.Empty; + + // Token: 0x04005602 RID: 22018 + [SerializeField] + private float value3; + + // Token: 0x04005603 RID: 22019 + private Material _material; + + // Token: 0x04005604 RID: 22020 + private int _propertyID_ValueName1; + + // Token: 0x04005605 RID: 22021 + private int _propertyID_ValueName2; + + // Token: 0x04005606 RID: 22022 + private int _propertyID_ValueName3; + } +} diff --git a/Assets/FX/FX_CopyMat_SetParam3.cs.meta b/Assets/FX/FX_CopyMat_SetParam3.cs.meta new file mode 100644 index 0000000..a3f3ac2 --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetParam3.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 965c435172d9bcf4a8958fe0068e5354 +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_CopyMat_SetParamCurve.cs b/Assets/FX/FX_CopyMat_SetParamCurve.cs new file mode 100644 index 0000000..fa470f5 --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetParamCurve.cs @@ -0,0 +1,56 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200075B RID: 1883 + public class FX_CopyMat_SetParamCurve : MonoBehaviour + { + // Token: 0x0600302D RID: 12333 RVA: 0x00102628 File Offset: 0x00102628 + private void Start() + { + Renderer component = base.GetComponent(); + this._material = ((!(component != null)) ? null : component.material); + this._propertyID_ValueName = Shader.PropertyToID(this._valueName); + } + + // Token: 0x0600302E RID: 12334 RVA: 0x0010266C File Offset: 0x0010266C + private void Update() + { + if (this._material != null) + { + float value = this._keyValueMagnification * this.CurveX.Evaluate(this.duration); + this._material.SetFloat(this._propertyID_ValueName, value); + } + this.duration += Time.deltaTime / this._keyTimeMagnification; + } + + // Token: 0x04005607 RID: 22023 + [SerializeField] + private string _valueName = "_Opacity"; + + // Token: 0x04005608 RID: 22024 + [SerializeField] + private float _keyValueMagnification = 1f; + + // Token: 0x04005609 RID: 22025 + [SerializeField] + private float _keyTimeMagnification = 1f; + + // Token: 0x0400560A RID: 22026 + private float duration; + + // Token: 0x0400560B RID: 22027 + public AnimationCurve CurveX = new AnimationCurve(new Keyframe[] + { + new Keyframe(0f, 0f, 3f, 3f), + new Keyframe(1f, 1f) + }); + + // Token: 0x0400560C RID: 22028 + private Material _material; + + // Token: 0x0400560D RID: 22029 + private int _propertyID_ValueName; + } +} diff --git a/Assets/FX/FX_CopyMat_SetParamCurve.cs.meta b/Assets/FX/FX_CopyMat_SetParamCurve.cs.meta new file mode 100644 index 0000000..bf3fcce --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetParamCurve.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6d02a7e5c21fc9348bdeb73a893778ae +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_CopyMat_SetParam_ByScale.cs b/Assets/FX/FX_CopyMat_SetParam_ByScale.cs new file mode 100644 index 0000000..bd7fe5f --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetParam_ByScale.cs @@ -0,0 +1,42 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200075C RID: 1884 + public class FX_CopyMat_SetParam_ByScale : MonoBehaviour + { + // Token: 0x06003030 RID: 12336 RVA: 0x001026E4 File Offset: 0x001026E4 + private void Start() + { + Renderer component = base.GetComponent(); + this._materials = ((!(component != null)) ? null : component.materials); + this._propertyID_ValueName = Shader.PropertyToID(this.valueName); + } + + // Token: 0x06003031 RID: 12337 RVA: 0x00102728 File Offset: 0x00102728 + private void Update() + { + if (this._materials.Length != 0) + { + for (int i = this._materials.Length - 1; i >= 0; i--) + { + this._materials[i].SetFloat(this._propertyID_ValueName, base.transform.lossyScale.x); + } + } + } + + // Token: 0x0400560E RID: 22030 + [SerializeField] + private string valueName = "_Opacity"; + + // Token: 0x0400560F RID: 22031 + private Material _material; + + // Token: 0x04005610 RID: 22032 + private Material[] _materials; + + // Token: 0x04005611 RID: 22033 + private int _propertyID_ValueName; + } +} diff --git a/Assets/FX/FX_CopyMat_SetParam_ByScale.cs.meta b/Assets/FX/FX_CopyMat_SetParam_ByScale.cs.meta new file mode 100644 index 0000000..68e6256 --- /dev/null +++ b/Assets/FX/FX_CopyMat_SetParam_ByScale.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ad11cbc065a31c744a131075595da79d +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_CopyMat_UVAdd.cs b/Assets/FX/FX_CopyMat_UVAdd.cs new file mode 100644 index 0000000..20955c6 --- /dev/null +++ b/Assets/FX/FX_CopyMat_UVAdd.cs @@ -0,0 +1,53 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200075D RID: 1885 + public class FX_CopyMat_UVAdd : MonoBehaviour + { + // Token: 0x06003033 RID: 12339 RVA: 0x00102798 File Offset: 0x00102798 + private void Start() + { + Renderer component = base.GetComponent(); + this._material = ((!(component != null)) ? null : component.material); + if (this._material != null) + { + this._material.SetTextureOffset(this.TextureName, Vector2.zero); + } + } + + // Token: 0x06003034 RID: 12340 RVA: 0x001027F4 File Offset: 0x001027F4 + private void Update() + { + if (this._material != null) + { + this._x = Mathf.Repeat(this._x + 60f * Time.deltaTime * this.addSpeedX, 1f); + this._y = Mathf.Repeat(this._y + 60f * Time.deltaTime * this.addSpeedY, 1f); + Vector2 value = new Vector2(this._x, this._y); + this._material.SetTextureOffset(this.TextureName, value); + } + } + + // Token: 0x04005612 RID: 22034 + [SerializeField] + private string TextureName = "_MainTex"; + + // Token: 0x04005613 RID: 22035 + [SerializeField] + private float addSpeedX; + + // Token: 0x04005614 RID: 22036 + [SerializeField] + private float addSpeedY; + + // Token: 0x04005615 RID: 22037 + private Material _material; + + // Token: 0x04005616 RID: 22038 + private float _x; + + // Token: 0x04005617 RID: 22039 + private float _y; + } +} diff --git a/Assets/FX/FX_CopyMat_UVAdd.cs.meta b/Assets/FX/FX_CopyMat_UVAdd.cs.meta new file mode 100644 index 0000000..1576b7d --- /dev/null +++ b/Assets/FX/FX_CopyMat_UVAdd.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 26cb10d9705b5f04993462517fbbb4cf +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_Destroy.cs b/Assets/FX/FX_Destroy.cs new file mode 100644 index 0000000..294f7d8 --- /dev/null +++ b/Assets/FX/FX_Destroy.cs @@ -0,0 +1,18 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000741 RID: 1857 + public class FX_Destroy : MonoBehaviour + { + // Token: 0x06002FEA RID: 12266 RVA: 0x0010083C File Offset: 0x0010083C + private void Start() + { + UnityEngine.Object.Destroy(base.gameObject, this.EndTime); + } + + // Token: 0x0400557B RID: 21883 + public float EndTime = 2f; + } +} diff --git a/Assets/FX/FX_Destroy.cs.meta b/Assets/FX/FX_Destroy.cs.meta new file mode 100644 index 0000000..5f401a0 --- /dev/null +++ b/Assets/FX/FX_Destroy.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 84eb4f200cc05404b93d53b9f5471746 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_GenerateFan.cs b/Assets/FX/FX_GenerateFan.cs new file mode 100644 index 0000000..b26a321 --- /dev/null +++ b/Assets/FX/FX_GenerateFan.cs @@ -0,0 +1,37 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000742 RID: 1858 + public class FX_GenerateFan : MonoBehaviour + { + // Token: 0x06002FEC RID: 12268 RVA: 0x00100888 File Offset: 0x00100888 + private void Start() + { + for (int i = this.ObjNumber; i >= 1; i--) + { + Vector3 vector = new Vector3(base.gameObject.transform.eulerAngles.x + this.RotateFanEnd[0] * (float)(i - 1) / (float)(this.ObjNumber - 1), base.gameObject.transform.eulerAngles.y + this.RotateFanEnd[1] * (float)(i - 1) / (float)(this.ObjNumber - 1), base.gameObject.transform.eulerAngles.z + this.RotateFanEnd[2] * (float)(i - 1) / (float)(this.ObjNumber - 1)); + GameObject gameObject = UnityEngine.Object.Instantiate(this.GenerateObject); + gameObject.transform.position = new Vector3(base.gameObject.transform.position.x + Mathf.Sin(vector[1] * 0.017453292f) * (float)this.ObjRadius, base.gameObject.transform.position.y, base.gameObject.transform.position.z + Mathf.Cos(vector[1] * 0.017453292f) * (float)this.ObjRadius); + gameObject.transform.eulerAngles = new Vector3(vector[0], vector[1], vector[2]); + gameObject.transform.parent = base.transform; + } + } + + // Token: 0x0400557C RID: 21884 + public GameObject GenerateObject; + + // Token: 0x0400557D RID: 21885 + public int ObjNumber = 6; + + // Token: 0x0400557E RID: 21886 + public int ObjRadius = 1; + + // Token: 0x0400557F RID: 21887 + public bool SaveRotate = true; + + // Token: 0x04005580 RID: 21888 + public Vector3 RotateFanEnd = new Vector3(0f, 0f, 0f); + } +} diff --git a/Assets/FX/FX_GenerateFan.cs.meta b/Assets/FX/FX_GenerateFan.cs.meta new file mode 100644 index 0000000..e943370 --- /dev/null +++ b/Assets/FX/FX_GenerateFan.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4cab9615a22db034284c1f74ee26e3f2 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_GenerateLine.cs b/Assets/FX/FX_GenerateLine.cs new file mode 100644 index 0000000..ae6c4ca --- /dev/null +++ b/Assets/FX/FX_GenerateLine.cs @@ -0,0 +1,29 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000743 RID: 1859 + public class FX_GenerateLine : MonoBehaviour + { + // Token: 0x06002FEE RID: 12270 RVA: 0x00100A58 File Offset: 0x00100A58 + private void Start() + { + for (int i = this.ObjNumber - 1; i >= 0; i--) + { + GameObject gameObject = UnityEngine.Object.Instantiate(this.GenerateObject); + gameObject.transform.position = new Vector3(base.gameObject.transform.position.x + this.CoordinateDistance[0] * (float)i, base.gameObject.transform.position.y + this.CoordinateDistance[1] * (float)i, base.gameObject.transform.position.z + this.CoordinateDistance[2] * (float)i); + gameObject.transform.parent = base.transform; + } + } + + // Token: 0x04005581 RID: 21889 + public GameObject GenerateObject; + + // Token: 0x04005582 RID: 21890 + public int ObjNumber = 1; + + // Token: 0x04005583 RID: 21891 + public Vector3 CoordinateDistance = new Vector3(0f, 0f, 0f); + } +} diff --git a/Assets/FX/FX_GenerateLine.cs.meta b/Assets/FX/FX_GenerateLine.cs.meta new file mode 100644 index 0000000..1ea7c57 --- /dev/null +++ b/Assets/FX/FX_GenerateLine.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 38b5453195f48684f83925b63b9bdeb2 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_GenerateSingle.cs b/Assets/FX/FX_GenerateSingle.cs new file mode 100644 index 0000000..a3b294e --- /dev/null +++ b/Assets/FX/FX_GenerateSingle.cs @@ -0,0 +1,19 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000744 RID: 1860 + public class FX_GenerateSingle : MonoBehaviour + { + // Token: 0x06002FF0 RID: 12272 RVA: 0x00100B2C File Offset: 0x00100B2C + private void Start() + { + GameObject gameObject = UnityEngine.Object.Instantiate(this.GenerateObject); + gameObject.transform.SetParent(base.transform, false); + } + + // Token: 0x04005584 RID: 21892 + public GameObject GenerateObject; + } +} diff --git a/Assets/FX/FX_GenerateSingle.cs.meta b/Assets/FX/FX_GenerateSingle.cs.meta new file mode 100644 index 0000000..9a270fa --- /dev/null +++ b/Assets/FX/FX_GenerateSingle.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3ae76ad966038d74a94a3eee501e54a8 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_GenerateToParents.cs b/Assets/FX/FX_GenerateToParents.cs new file mode 100644 index 0000000..8f1f9cd --- /dev/null +++ b/Assets/FX/FX_GenerateToParents.cs @@ -0,0 +1,31 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000745 RID: 1861 + public class FX_GenerateToParents : MonoBehaviour + { + // Token: 0x06002FF2 RID: 12274 RVA: 0x00100B60 File Offset: 0x00100B60 + private void Start() + { + if (this._parent.Length > 0) + { + for (int i = this._parent.Length - 1; i >= 0; i--) + { + GameObject gameObject = UnityEngine.Object.Instantiate(this.GenerateObject); + gameObject.transform.position = this._parent[i].transform.position; + gameObject.transform.parent = this._parent[i].transform; + } + } + } + + // Token: 0x04005585 RID: 21893 + [SerializeField] + private GameObject GenerateObject; + + // Token: 0x04005586 RID: 21894 + [SerializeField] + private GameObject[] _parent; + } +} diff --git a/Assets/FX/FX_GenerateToParents.cs.meta b/Assets/FX/FX_GenerateToParents.cs.meta new file mode 100644 index 0000000..a1b00c7 --- /dev/null +++ b/Assets/FX/FX_GenerateToParents.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c045ed78d1a0d7d46b8fc73176c1b792 +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_LensFlare_Move.cs b/Assets/FX/FX_LensFlare_Move.cs new file mode 100644 index 0000000..ad8ccef --- /dev/null +++ b/Assets/FX/FX_LensFlare_Move.cs @@ -0,0 +1,40 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000746 RID: 1862 + public class FX_LensFlare_Move : MonoBehaviour + { + // Token: 0x06002FF4 RID: 12276 RVA: 0x00100BE0 File Offset: 0x00100BE0 + private void Start() + { + if (this._centerPosition == null) + { + this._centerPosition = base.transform; + } + this.OriginalScale = new Vector3(1f / base.transform.lossyScale.x, 1f / base.transform.lossyScale.y, 1f / base.transform.lossyScale.z); + } + + // Token: 0x06002FF5 RID: 12277 RVA: 0x00100C60 File Offset: 0x00100C60 + private void Update() + { + float x = this._targetPosition.position.x - this._centerPosition.position.x; + float y = this._targetPosition.position.y - this._centerPosition.position.y; + float num = Mathf.Atan2(y, x) * 57.29578f; + base.transform.localEulerAngles = new Vector3(0f, 0f, num - 90f); + float num2 = Vector3.Distance(this._centerPosition.position, this._targetPosition.position); + base.transform.localScale = new Vector3(num2 * this.OriginalScale.x, num2 * this.OriginalScale.y, num2 * this.OriginalScale.z); + } + + // Token: 0x04005587 RID: 21895 + [SerializeField] + private Transform _targetPosition; + + // Token: 0x04005588 RID: 21896 + private Transform _centerPosition; + + // Token: 0x04005589 RID: 21897 + private Vector3 OriginalScale; + } +} diff --git a/Assets/FX/FX_LensFlare_Move.cs.meta b/Assets/FX/FX_LensFlare_Move.cs.meta new file mode 100644 index 0000000..32374e6 --- /dev/null +++ b/Assets/FX/FX_LensFlare_Move.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dd8030c16fd44f147bb7997e1891fd39 +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_MotionEffects.cs b/Assets/FX/FX_MotionEffects.cs new file mode 100644 index 0000000..6245c1a --- /dev/null +++ b/Assets/FX/FX_MotionEffects.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000778 RID: 1912 + public class FX_MotionEffects : MonoBehaviour + { + // Token: 0x0600308E RID: 12430 RVA: 0x00105424 File Offset: 0x00105424 + private void Start() + { + } + + // Token: 0x0600308F RID: 12431 RVA: 0x00105428 File Offset: 0x00105428 + private void Effect(int Element) + { + GameObject gameObject = UnityEngine.Object.Instantiate(this.FXPrefabs[Element]); + gameObject.transform.SetParent(this.pos_fx.transform, false); + } + + // Token: 0x04005708 RID: 22280 + [Tooltip("1.『pos_fx』に、子階層の pos_fx を\r\n\tドラッグして入れてください。\r\n2.『FX Prefabs』を開いて種類分の個数を指定し、空欄に\r\nエフェクトのPrefabをドラッグして入れてください。\r\n3.エフェクトを発生させたいモーションのフレームに、\r\nAdd event ボタンでイベントを追加してください。\r\n4.3のイベントのインスペクターから、『Function』に\r\nFX_Muzzle()』を設定してください。\r\nエフェクトを複数設定した場合は\r\n『int』に、Element番号を指定してください。")] + [SerializeField] + private Transform pos_fx; + + // Token: 0x04005709 RID: 22281 + public List FXPrefabs; + } +} diff --git a/Assets/FX/FX_MotionEffects.cs.meta b/Assets/FX/FX_MotionEffects.cs.meta new file mode 100644 index 0000000..8de608d --- /dev/null +++ b/Assets/FX/FX_MotionEffects.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a72edb9993586884d8a254f52ec9f67c +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_Polygon_Flag.cs b/Assets/FX/FX_Polygon_Flag.cs new file mode 100644 index 0000000..eae3d03 --- /dev/null +++ b/Assets/FX/FX_Polygon_Flag.cs @@ -0,0 +1,133 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000766 RID: 1894 + [RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))] + public class FX_Polygon_Flag : MonoBehaviour + { + // Token: 0x06003054 RID: 12372 RVA: 0x001038F8 File Offset: 0x001038F8 + private void Start() + { + this._renderer = base.GetComponent(); + this._meshFilter = base.GetComponent(); + this._mesh = new Mesh(); + this._mesh.vertices = this._vertices; + this._mesh.uv = this._uv; + this._prevPosition = base.transform.position; + } + + // Token: 0x06003055 RID: 12373 RVA: 0x0010395C File Offset: 0x0010395C + private void Update() + { + if (this._renderer != null && this._renderer.material != null) + { + Vector3 a = this._prevPosition + this._nowChaser; + this._nowChaser = Vector3.Lerp(a, base.transform.position, this._tailDamper) - base.transform.position; + this._nowChaser_Rot = Quaternion.Lerp(this._nowChaser_Rot, base.transform.parent.rotation, this._tailDamper); + this._vertices[1] = base.transform.parent.rotation * this._topPosition; + this._vertices[2] = this._nowChaser; + this._vertices[3] = this._nowChaser + this._nowChaser_Rot * this._topPosition; + float num = Vector3.Distance(Vector3.zero, this._nowChaser); + float num2 = Vector3.Distance(this._vertices[1], this._vertices[3]); + float num3 = (num <= num2) ? num2 : num; + float a2 = Mathf.Clamp01((num3 - this._minLength) / this._visibleLength); + this._colors[0].a = a2; + this._colors[1].a = a2; + this._colors[2].a = a2; + this._colors[3].a = a2; + if (num3 > this._minLength) + { + this._mesh.vertices = this._vertices; + this._mesh.colors = this._colors; + this._mesh.triangles = this._triangles; + this._meshFilter.sharedMesh = this._mesh; + } + else + { + this._meshFilter.sharedMesh = null; + } + this._prevPosition = base.transform.position; + base.transform.rotation = Quaternion.identity; + } + } + + // Token: 0x04005698 RID: 22168 + [SerializeField] + [Range(0f, 1f)] + [Tooltip("この値が高い程 短くなります")] + private float _tailDamper = 0.2f; + + // Token: 0x04005699 RID: 22169 + [Tooltip("先端の位置(相対)")] + [SerializeField] + private Vector3 _topPosition = new Vector3(0f, 0f, 0.6f); + + // Token: 0x0400569A RID: 22170 + [Tooltip("描画される最短距離")] + [SerializeField] + private float _minLength = 0.2f; + + // Token: 0x0400569B RID: 22171 + [SerializeField] + [Tooltip("minLengthから頂点アルファが1になるまでの距離(初期値固定)")] + private float _visibleLength = 0.3f; + + // Token: 0x0400569C RID: 22172 + private Renderer _renderer; + + // Token: 0x0400569D RID: 22173 + private Vector3 _nowChaser; + + // Token: 0x0400569E RID: 22174 + private Vector3 _prevPosition; + + // Token: 0x0400569F RID: 22175 + private Quaternion _nowChaser_Rot; + + // Token: 0x040056A0 RID: 22176 + private Mesh _mesh; + + // Token: 0x040056A1 RID: 22177 + private int[] _triangles = new int[] + { + 0, + 1, + 2, + 2, + 1, + 3 + }; + + // Token: 0x040056A2 RID: 22178 + private Vector2[] _uv = new Vector2[] + { + Vector2.zero, + Vector2.up, + Vector2.right, + Vector2.one + }; + + // Token: 0x040056A3 RID: 22179 + private Color[] _colors = new Color[] + { + Color.white, + Color.white, + Color.white, + Color.white + }; + + // Token: 0x040056A4 RID: 22180 + private Vector3[] _vertices = new Vector3[] + { + Vector3.zero, + Vector3.zero, + Vector3.zero, + Vector3.zero + }; + + // Token: 0x040056A5 RID: 22181 + private MeshFilter _meshFilter; + } +} diff --git a/Assets/FX/FX_Polygon_Flag.cs.meta b/Assets/FX/FX_Polygon_Flag.cs.meta new file mode 100644 index 0000000..b178e26 --- /dev/null +++ b/Assets/FX/FX_Polygon_Flag.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 450aba2634b16fc42a578bafe33ca0f9 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_PositionAdd.cs b/Assets/FX/FX_PositionAdd.cs new file mode 100644 index 0000000..a38dc79 --- /dev/null +++ b/Assets/FX/FX_PositionAdd.cs @@ -0,0 +1,59 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000747 RID: 1863 + public class FX_PositionAdd : MonoBehaviour + { + // Token: 0x06002FF7 RID: 12279 RVA: 0x00100DE4 File Offset: 0x00100DE4 + private void Start() + { + this.localPosition_ = this.transform_.localPosition; + } + + // Token: 0x06002FF8 RID: 12280 RVA: 0x00100DF8 File Offset: 0x00100DF8 + private void OnEnable() + { + this.transform_ = base.transform; + this.transform_.localPosition = this.localPosition_; + this.posStartRandom_Rate = new Vector3(UnityEngine.Random.Range(-1f, 1f), UnityEngine.Random.Range(-1f, 1f), UnityEngine.Random.Range(-1f, 1f)); + this.transform_.Translate(this.posStart[0] + this.posStartRandom[0] * this.posStartRandom_Rate[0], this.posStart[1] + this.posStartRandom[1] * this.posStartRandom_Rate[1], this.posStart[2] + this.posStartRandom[2] * this.posStartRandom_Rate[2]); + this.posAddRandom_Rate = new Vector3(UnityEngine.Random.Range(-1f, 1f), UnityEngine.Random.Range(-1f, 1f), UnityEngine.Random.Range(-1f, 1f)); + } + + // Token: 0x06002FF9 RID: 12281 RVA: 0x00100F10 File Offset: 0x00100F10 + private void Update() + { + this.transform_.Translate(this.posAdd[0] + this.posAddRandom[0] * this.posAddRandom_Rate[0] * 60f * Time.deltaTime, this.posAdd[1] + this.posAddRandom[1] * this.posAddRandom_Rate[1] * 60f * Time.deltaTime, this.posAdd[2] + this.posAddRandom[2] * this.posAddRandom_Rate[2] * 60f * Time.deltaTime); + } + + // Token: 0x0400558A RID: 21898 + [SerializeField] + private Vector3 posStart = new Vector3(0f, 0f, 0f); + + // Token: 0x0400558B RID: 21899 + [SerializeField] + private Vector3 posStartRandom = new Vector3(0f, 0f, 0f); + + // Token: 0x0400558C RID: 21900 + [SerializeField] + private Vector3 posAdd = new Vector3(0f, 0f, 0f); + + // Token: 0x0400558D RID: 21901 + [SerializeField] + private Vector3 posAddRandom = new Vector3(0f, 0f, 0f); + + // Token: 0x0400558E RID: 21902 + private Vector3 posStartRandom_Rate = default(Vector3); + + // Token: 0x0400558F RID: 21903 + private Vector3 posAddRandom_Rate = default(Vector3); + + // Token: 0x04005590 RID: 21904 + private Transform transform_; + + // Token: 0x04005591 RID: 21905 + private Vector3 localPosition_; + } +} diff --git a/Assets/FX/FX_PositionAdd.cs.meta b/Assets/FX/FX_PositionAdd.cs.meta new file mode 100644 index 0000000..9854114 --- /dev/null +++ b/Assets/FX/FX_PositionAdd.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8379ab3c200277e499755ff81ba2b3d3 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_PositionCurve.cs b/Assets/FX/FX_PositionCurve.cs new file mode 100644 index 0000000..2591a88 --- /dev/null +++ b/Assets/FX/FX_PositionCurve.cs @@ -0,0 +1,59 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000748 RID: 1864 + public class FX_PositionCurve : MonoBehaviour + { + // Token: 0x06002FFB RID: 12283 RVA: 0x001010D8 File Offset: 0x001010D8 + private void Update() + { + float x = this.keyValueMagnification * this.CurveX.Evaluate(this.duration); + float y = this.keyValueMagnification * this.CurveY.Evaluate(this.duration); + float z = this.keyValueMagnification * this.CurveZ.Evaluate(this.duration); + this.animState = new Vector3(x, y, z); + base.transform.Translate(this.animState - this.preState); + this.preState = this.animState; + this.duration += Time.deltaTime / this.keyTimeMagnification; + } + + // Token: 0x04005592 RID: 21906 + [SerializeField] + private float keyValueMagnification = 1f; + + // Token: 0x04005593 RID: 21907 + [SerializeField] + private float keyTimeMagnification = 1f; + + // Token: 0x04005594 RID: 21908 + private float duration; + + // Token: 0x04005595 RID: 21909 + private Vector3 preState = new Vector3(0f, 0f, 0f); + + // Token: 0x04005596 RID: 21910 + private Vector3 animState; + + // Token: 0x04005597 RID: 21911 + public AnimationCurve CurveX = new AnimationCurve(new Keyframe[] + { + new Keyframe(0f, 0f), + new Keyframe(0f, 0f) + }); + + // Token: 0x04005598 RID: 21912 + public AnimationCurve CurveY = new AnimationCurve(new Keyframe[] + { + new Keyframe(0f, 0f), + new Keyframe(0f, 0f) + }); + + // Token: 0x04005599 RID: 21913 + public AnimationCurve CurveZ = new AnimationCurve(new Keyframe[] + { + new Keyframe(0f, 0f), + new Keyframe(0f, 0f) + }); + } +} diff --git a/Assets/FX/FX_PositionCurve.cs.meta b/Assets/FX/FX_PositionCurve.cs.meta new file mode 100644 index 0000000..701fddf --- /dev/null +++ b/Assets/FX/FX_PositionCurve.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 28af38bed538b1b4f8b00f5d05b68dd6 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_RotationAdd.cs b/Assets/FX/FX_RotationAdd.cs new file mode 100644 index 0000000..f3e77d3 --- /dev/null +++ b/Assets/FX/FX_RotationAdd.cs @@ -0,0 +1,64 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000749 RID: 1865 + public class FX_RotationAdd : MonoBehaviour + { + // Token: 0x06002FFD RID: 12285 RVA: 0x0010121C File Offset: 0x0010121C + private void Start() + { + this.rotStartRandom_Rate = new Vector3(UnityEngine.Random.Range(-1f, 1f), UnityEngine.Random.Range(-1f, 1f), UnityEngine.Random.Range(-1f, 1f)); + base.transform.Rotate(this.rotStart[0] + this.rotStartRandom[0] * this.rotStartRandom_Rate[0], this.rotStart[1] + this.rotStartRandom[1] * this.rotStartRandom_Rate[1], this.rotStart[2] + this.rotStartRandom[2] * this.rotStartRandom_Rate[2]); + this.rotAddRandom_Rate = new Vector3(UnityEngine.Random.Range(-1f, 1f), UnityEngine.Random.Range(-1f, 1f), UnityEngine.Random.Range(-1f, 1f)); + } + + // Token: 0x06002FFE RID: 12286 RVA: 0x00101318 File Offset: 0x00101318 + private void Update() + { + float num = Time.deltaTime * 60f; + if (!this._individualXYZ) + { + base.transform.Rotate(this.rotAdd[0] * num + this.rotAddRandom[0] * this.rotAddRandom_Rate[0] * num, this.rotAdd[1] * num + this.rotAddRandom[1] * this.rotAddRandom_Rate[1] * num, this.rotAdd[2] * num + this.rotAddRandom[2] * this.rotAddRandom_Rate[2] * num); + } + else + { + float x = this.rotStart[0] + this.rotStartRandom[0] * this.rotStartRandom_Rate[0] + (this.rotAdd[0] * this._timeCount + this.rotAddRandom[0] * this.rotAddRandom_Rate[0] * this._timeCount); + float y = this.rotStart[1] + this.rotStartRandom[1] * this.rotStartRandom_Rate[1] + (this.rotAdd[1] * this._timeCount + this.rotAddRandom[1] * this.rotAddRandom_Rate[1] * this._timeCount); + float z = this.rotStart[2] + this.rotStartRandom[2] * this.rotStartRandom_Rate[2] + (this.rotAdd[2] * this._timeCount + this.rotAddRandom[2] * this.rotAddRandom_Rate[2] * this._timeCount); + base.transform.localEulerAngles = new Vector3(x, y, z); + this._timeCount += num; + } + } + + // Token: 0x0400559A RID: 21914 + [SerializeField] + private Vector3 rotStart = new Vector3(0f, 0f, 0f); + + // Token: 0x0400559B RID: 21915 + [SerializeField] + private Vector3 rotStartRandom = new Vector3(0f, 0f, 0f); + + // Token: 0x0400559C RID: 21916 + [SerializeField] + private Vector3 rotAdd = new Vector3(0f, 0f, 0f); + + // Token: 0x0400559D RID: 21917 + [SerializeField] + private Vector3 rotAddRandom = new Vector3(0f, 0f, 0f); + + // Token: 0x0400559E RID: 21918 + private Vector3 rotStartRandom_Rate = default(Vector3); + + // Token: 0x0400559F RID: 21919 + private Vector3 rotAddRandom_Rate = default(Vector3); + + // Token: 0x040055A0 RID: 21920 + [SerializeField] + private bool _individualXYZ; + + // Token: 0x040055A1 RID: 21921 + private float _timeCount; + } +} diff --git a/Assets/FX/FX_RotationAdd.cs.meta b/Assets/FX/FX_RotationAdd.cs.meta new file mode 100644 index 0000000..66f28da --- /dev/null +++ b/Assets/FX/FX_RotationAdd.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 90d23c251f2eb0648b26067d9ba26e65 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_RotationCurve.cs b/Assets/FX/FX_RotationCurve.cs new file mode 100644 index 0000000..1d0ad01 --- /dev/null +++ b/Assets/FX/FX_RotationCurve.cs @@ -0,0 +1,59 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200074A RID: 1866 + public class FX_RotationCurve : MonoBehaviour + { + // Token: 0x06003000 RID: 12288 RVA: 0x00101618 File Offset: 0x00101618 + private void Update() + { + float x = this.keyValueMagnification * this.CurveX.Evaluate(this.duration); + float y = this.keyValueMagnification * this.CurveY.Evaluate(this.duration); + float z = this.keyValueMagnification * this.CurveZ.Evaluate(this.duration); + this.animState = new Vector3(x, y, z); + base.transform.Rotate(this.animState - this.preState); + this.preState = this.animState; + this.duration += Time.deltaTime / this.keyTimeMagnification; + } + + // Token: 0x040055A2 RID: 21922 + [SerializeField] + private float keyValueMagnification = 1f; + + // Token: 0x040055A3 RID: 21923 + [SerializeField] + private float keyTimeMagnification = 1f; + + // Token: 0x040055A4 RID: 21924 + private float duration; + + // Token: 0x040055A5 RID: 21925 + private Vector3 preState = new Vector3(0f, 0f, 0f); + + // Token: 0x040055A6 RID: 21926 + private Vector3 animState; + + // Token: 0x040055A7 RID: 21927 + public AnimationCurve CurveX = new AnimationCurve(new Keyframe[] + { + new Keyframe(0f, 0f), + new Keyframe(0f, 0f) + }); + + // Token: 0x040055A8 RID: 21928 + public AnimationCurve CurveY = new AnimationCurve(new Keyframe[] + { + new Keyframe(0f, 0f), + new Keyframe(0f, 0f) + }); + + // Token: 0x040055A9 RID: 21929 + public AnimationCurve CurveZ = new AnimationCurve(new Keyframe[] + { + new Keyframe(0f, 0f), + new Keyframe(0f, 0f) + }); + } +} diff --git a/Assets/FX/FX_RotationCurve.cs.meta b/Assets/FX/FX_RotationCurve.cs.meta new file mode 100644 index 0000000..f3006f4 --- /dev/null +++ b/Assets/FX/FX_RotationCurve.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 51df3c6b59fed9a4b87a7f9c26c02d14 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_ScaleCurve.cs b/Assets/FX/FX_ScaleCurve.cs new file mode 100644 index 0000000..b7dc0e6 --- /dev/null +++ b/Assets/FX/FX_ScaleCurve.cs @@ -0,0 +1,70 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200074B RID: 1867 + public class FX_ScaleCurve : MonoBehaviour + { + // Token: 0x06003002 RID: 12290 RVA: 0x001017DC File Offset: 0x001017DC + private void Update() + { + if (!(this.resetTime & this.toggleResetTime)) + { + if (this.resetTime & !this.toggleResetTime) + { + this.duration = 0f; + this.toggleResetTime = true; + } + else + { + this.toggleResetTime = false; + } + } + float x = this.keyValueMagnification * this.CurveX.Evaluate(this.duration); + float y = this.keyValueMagnification * this.CurveY.Evaluate(this.duration); + float z = this.keyValueMagnification * this.CurveZ.Evaluate(this.duration); + this.duration += Time.deltaTime / this.keyTimeMagnification; + base.transform.localScale = new Vector3(x, y, z); + } + + // Token: 0x040055AA RID: 21930 + [SerializeField] + private float keyValueMagnification = 1f; + + // Token: 0x040055AB RID: 21931 + [SerializeField] + private float keyTimeMagnification = 1f; + + // Token: 0x040055AC RID: 21932 + private float duration; + + // Token: 0x040055AD RID: 21933 + [SerializeField] + private bool resetTime; + + // Token: 0x040055AE RID: 21934 + private bool toggleResetTime; + + // Token: 0x040055AF RID: 21935 + public AnimationCurve CurveX = new AnimationCurve(new Keyframe[] + { + new Keyframe(0f, 0f, 3f, 3f), + new Keyframe(1f, 1f) + }); + + // Token: 0x040055B0 RID: 21936 + public AnimationCurve CurveY = new AnimationCurve(new Keyframe[] + { + new Keyframe(0f, 0f, 3f, 3f), + new Keyframe(1f, 1f) + }); + + // Token: 0x040055B1 RID: 21937 + public AnimationCurve CurveZ = new AnimationCurve(new Keyframe[] + { + new Keyframe(0f, 0f, 3f, 3f), + new Keyframe(1f, 1f) + }); + } +} diff --git a/Assets/FX/FX_ScaleCurve.cs.meta b/Assets/FX/FX_ScaleCurve.cs.meta new file mode 100644 index 0000000..e140593 --- /dev/null +++ b/Assets/FX/FX_ScaleCurve.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e7f27ec87f7d88f43974c2ff825af187 +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_ScaleCurve_incremental.cs b/Assets/FX/FX_ScaleCurve_incremental.cs new file mode 100644 index 0000000..2243908 --- /dev/null +++ b/Assets/FX/FX_ScaleCurve_incremental.cs @@ -0,0 +1,59 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200074C RID: 1868 + public class FX_ScaleCurve_incremental : MonoBehaviour + { + // Token: 0x06003004 RID: 12292 RVA: 0x001019EC File Offset: 0x001019EC + private void Update() + { + float x = this.keyValueMagnification * this.CurveX.Evaluate(this.duration); + float y = this.keyValueMagnification * this.CurveY.Evaluate(this.duration); + float z = this.keyValueMagnification * this.CurveZ.Evaluate(this.duration); + this.animState = new Vector3(x, y, z); + base.transform.localScale += this.animState - this.preState; + this.preState = this.animState; + this.duration += Time.deltaTime / this.keyTimeMagnification; + } + + // Token: 0x040055B2 RID: 21938 + [SerializeField] + private float keyValueMagnification = 1f; + + // Token: 0x040055B3 RID: 21939 + [SerializeField] + private float keyTimeMagnification = 1f; + + // Token: 0x040055B4 RID: 21940 + private float duration; + + // Token: 0x040055B5 RID: 21941 + private Vector3 preState = new Vector3(1f, 1f, 1f); + + // Token: 0x040055B6 RID: 21942 + private Vector3 animState; + + // Token: 0x040055B7 RID: 21943 + public AnimationCurve CurveX = new AnimationCurve(new Keyframe[] + { + new Keyframe(0f, 0f, 3f, 3f), + new Keyframe(1f, 1f) + }); + + // Token: 0x040055B8 RID: 21944 + public AnimationCurve CurveY = new AnimationCurve(new Keyframe[] + { + new Keyframe(0f, 0f, 3f, 3f), + new Keyframe(1f, 1f) + }); + + // Token: 0x040055B9 RID: 21945 + public AnimationCurve CurveZ = new AnimationCurve(new Keyframe[] + { + new Keyframe(0f, 0f, 3f, 3f), + new Keyframe(1f, 1f) + }); + } +} diff --git a/Assets/FX/FX_ScaleCurve_incremental.cs.meta b/Assets/FX/FX_ScaleCurve_incremental.cs.meta new file mode 100644 index 0000000..944ab5e --- /dev/null +++ b/Assets/FX/FX_ScaleCurve_incremental.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 58e81f6cb88567347b943998c40950ee +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_Trail_ScaleToWidth.cs b/Assets/FX/FX_Trail_ScaleToWidth.cs new file mode 100644 index 0000000..3b29105 --- /dev/null +++ b/Assets/FX/FX_Trail_ScaleToWidth.cs @@ -0,0 +1,28 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000760 RID: 1888 + public class FX_Trail_ScaleToWidth : MonoBehaviour + { + // Token: 0x0600303B RID: 12347 RVA: 0x00102924 File Offset: 0x00102924 + private void Start() + { + this.tRenderer = base.GetComponent(); + } + + // Token: 0x0600303C RID: 12348 RVA: 0x00102934 File Offset: 0x00102934 + private void Update() + { + this.tRenderer.widthMultiplier = base.transform.lossyScale.x; + if (base.transform.lossyScale.x == 0f) + { + this.tRenderer.Clear(); + } + } + + // Token: 0x0400561A RID: 22042 + private TrailRenderer tRenderer; + } +} diff --git a/Assets/FX/FX_Trail_ScaleToWidth.cs.meta b/Assets/FX/FX_Trail_ScaleToWidth.cs.meta new file mode 100644 index 0000000..b335368 --- /dev/null +++ b/Assets/FX/FX_Trail_ScaleToWidth.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0d30fdb0863b5694db44c007203ace9c +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_Trail_SetRenderer.cs b/Assets/FX/FX_Trail_SetRenderer.cs new file mode 100644 index 0000000..322dc68 --- /dev/null +++ b/Assets/FX/FX_Trail_SetRenderer.cs @@ -0,0 +1,17 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000761 RID: 1889 + public class FX_Trail_SetRenderer : MonoBehaviour + { + // Token: 0x0400561B RID: 22043 + [Tooltip("Order in Layerの値")] + [SerializeField] + private int _order_in_Layer; + + // Token: 0x0400561C RID: 22044 + private TrailRenderer tRenderer; + } +} diff --git a/Assets/FX/FX_Trail_SetRenderer.cs.meta b/Assets/FX/FX_Trail_SetRenderer.cs.meta new file mode 100644 index 0000000..9e553b3 --- /dev/null +++ b/Assets/FX/FX_Trail_SetRenderer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 204e2a3c0979d69449af8788664c798b +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_TransformReset.cs b/Assets/FX/FX_TransformReset.cs new file mode 100644 index 0000000..affef1a --- /dev/null +++ b/Assets/FX/FX_TransformReset.cs @@ -0,0 +1,51 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200074D RID: 1869 + public class FX_TransformReset : MonoBehaviour + { + // Token: 0x06003006 RID: 12294 RVA: 0x00101AA8 File Offset: 0x00101AA8 + private void Start() + { + if (this._resetLocalPosition) + { + base.transform.localPosition = Vector3.zero; + } + if (this._resetLocalRotation) + { + base.transform.rotation = new Quaternion(0f, 0f, 0f, 0f); + } + if (this._resetLocalScale) + { + base.transform.localScale = Vector3.one; + } + } + + // Token: 0x06003007 RID: 12295 RVA: 0x00101B1C File Offset: 0x00101B1C + private void LateUpdate() + { + if (this._setRotationWorldIdentity) + { + base.transform.rotation = Quaternion.identity; + } + } + + // Token: 0x040055BA RID: 21946 + [SerializeField] + private bool _resetLocalPosition; + + // Token: 0x040055BB RID: 21947 + [SerializeField] + private bool _resetLocalRotation; + + // Token: 0x040055BC RID: 21948 + [SerializeField] + private bool _resetLocalScale; + + // Token: 0x040055BD RID: 21949 + [SerializeField] + private bool _setRotationWorldIdentity; + } +} diff --git a/Assets/FX/FX_TransformReset.cs.meta b/Assets/FX/FX_TransformReset.cs.meta new file mode 100644 index 0000000..e651c26 --- /dev/null +++ b/Assets/FX/FX_TransformReset.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5e65c7411423b714cb0d06857329d04b +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_TurnCamera.cs b/Assets/FX/FX_TurnCamera.cs new file mode 100644 index 0000000..d49e201 --- /dev/null +++ b/Assets/FX/FX_TurnCamera.cs @@ -0,0 +1,40 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200074E RID: 1870 + public class FX_TurnCamera : MonoBehaviour + { + // Token: 0x06003009 RID: 12297 RVA: 0x00101B44 File Offset: 0x00101B44 + private void Start() + { + if (this.targetCamera == null) + { + this.targetCamera = Camera.main; + } + } + + // Token: 0x0600300A RID: 12298 RVA: 0x00101B64 File Offset: 0x00101B64 + private void Update() + { + if (!this.alignCamera) + { + base.transform.LookAt(this.targetCamera.transform.position); + base.transform.Rotate(Vector3.up, 180f); + } + else + { + base.transform.rotation = this.targetCamera.transform.rotation; + } + } + + // Token: 0x040055BE RID: 21950 + [SerializeField] + private Camera targetCamera; + + // Token: 0x040055BF RID: 21951 + [SerializeField] + private bool alignCamera; + } +} diff --git a/Assets/FX/FX_TurnCamera.cs.meta b/Assets/FX/FX_TurnCamera.cs.meta new file mode 100644 index 0000000..af5ee3c --- /dev/null +++ b/Assets/FX/FX_TurnCamera.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 255dbe81a06d87545b645693c54c8940 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_TurnTranslate.cs b/Assets/FX/FX_TurnTranslate.cs new file mode 100644 index 0000000..4ffcdf7 --- /dev/null +++ b/Assets/FX/FX_TurnTranslate.cs @@ -0,0 +1,34 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200074F RID: 1871 + public class FX_TurnTranslate : MonoBehaviour + { + // Token: 0x0600300C RID: 12300 RVA: 0x00101BD4 File Offset: 0x00101BD4 + private void OnEnable() + { + this.prePos = base.transform.position; + } + + // Token: 0x0600300D RID: 12301 RVA: 0x00101BE8 File Offset: 0x00101BE8 + private void Update() + { + Transform transform = base.transform; + Vector3 position = transform.position; + this.newPos = position - this.prePos; + if (0.0001f < this.newPos.sqrMagnitude) + { + transform.rotation = Quaternion.LookRotation(this.newPos); + } + this.prePos = position; + } + + // Token: 0x040055C0 RID: 21952 + private Vector3 prePos; + + // Token: 0x040055C1 RID: 21953 + private Vector3 newPos; + } +} diff --git a/Assets/FX/FX_TurnTranslate.cs.meta b/Assets/FX/FX_TurnTranslate.cs.meta new file mode 100644 index 0000000..81cfe0b --- /dev/null +++ b/Assets/FX/FX_TurnTranslate.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 794d8fa694ad5de47bcd3dadf822f393 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_UI_CMN_BG_V115_TitleLogo.cs b/Assets/FX/FX_UI_CMN_BG_V115_TitleLogo.cs new file mode 100644 index 0000000..adf02ea --- /dev/null +++ b/Assets/FX/FX_UI_CMN_BG_V115_TitleLogo.cs @@ -0,0 +1,220 @@ +using System; +using UnityEngine; +using UnityEngine.UI; + +namespace FX +{ + // Token: 0x02000763 RID: 1891 + [ExecuteInEditMode] + [RequireComponent(typeof(Image))] + public class FX_UI_CMN_BG_V115_TitleLogo : MonoBehaviour + { + // Token: 0x06003042 RID: 12354 RVA: 0x00102AC8 File Offset: 0x00102AC8 + private void Start() + { + if (null == this.material_) + { + this.material_ = new Material(this._shader); + this.material_.hideFlags = (HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor | HideFlags.NotEditable | HideFlags.DontSaveInBuild); + } + this.reset(); + } + + // Token: 0x06003043 RID: 12355 RVA: 0x00102B00 File Offset: 0x00102B00 + private void OnDidApplyAnimationProperties() + { + this.reset(); + } + + // Token: 0x06003044 RID: 12356 RVA: 0x00102B08 File Offset: 0x00102B08 + private void OnDestroy() + { + if (null != this.material_) + { + UnityEngine.Object.DestroyImmediate(this.material_); + this.material_ = null; + } + } + + // Token: 0x06003045 RID: 12357 RVA: 0x00102B30 File Offset: 0x00102B30 + private void reset() + { + Image component = base.transform.GetComponent(); + if (component == null) + { + return; + } + this.initPropertyId(); + component.material = this.material_; + component.material.SetColor(this.id_TintColor, this.TintColor_); + component.material.SetFloat(this.id_Exposure, this.Exposure_); + component.material.SetFloat(this.id_Opacity, this.Opacity_); + component.material.SetFloat(this.id_OverExposure_MulToOpacity, (float)(this.OverExposure_MulToOpacity_ ? 1 : 0)); + component.material.SetFloat(this.id_OverExposure_ClampEmission, (float)(this.OverExposure_ClampEmission_ ? 1 : 0)); + component.material.SetTexture(this.id_Tex2, this.Tex2_); + component.material.SetFloat(this.id_Cutoff, this.Cutoff_); + component.material.SetFloat(this.id_Border_Rotate, this.Border_Rotate_); + component.material.SetFloat(this.id_Scrool_Time, this.Scrool_Time_); + component.material.SetFloat(this.id_Specular_Offset, this.Specular_Offset_); + component.material.SetFloat(this.id_Holo, this.Holo_); + component.material.SetTexture(this.id_Mask, this.Mask_); + component.material.SetFloat(this.id_Steps, this.Steps_); + component.material.SetTexture(this.id_Steps_Tex, this.Steps_Tex_); + component.material.SetFloat(this.id_Step_Blend, this.Step_Blend_); + component.material.SetFloat(this.id_SystemTime, this.SystemTime_); + } + + // Token: 0x06003046 RID: 12358 RVA: 0x00102CF4 File Offset: 0x00102CF4 + private void initPropertyId() + { + if (this.id_Opacity != 0) + { + return; + } + this.id_TintColor = Shader.PropertyToID("_TintColor"); + this.id_Exposure = Shader.PropertyToID("_Exposure"); + this.id_Opacity = Shader.PropertyToID("_Opacity"); + this.id_OverExposure_MulToOpacity = Shader.PropertyToID("_OverExposure_MulToOpacity"); + this.id_OverExposure_ClampEmission = Shader.PropertyToID("_OverExposure_ClampEmission"); + this.id_Tex2 = Shader.PropertyToID("_Tex2"); + this.id_Cutoff = Shader.PropertyToID("_Cutoff"); + this.id_Border_Rotate = Shader.PropertyToID("_Border_Rotate"); + this.id_Scrool_Time = Shader.PropertyToID("_Scrool_Time"); + this.id_Specular_Offset = Shader.PropertyToID("_Specular_Offset"); + this.id_Holo = Shader.PropertyToID("_Holo"); + this.id_Mask = Shader.PropertyToID("_Mask"); + this.id_Steps = Shader.PropertyToID("_Steps"); + this.id_Steps_Tex = Shader.PropertyToID("_Steps_Tex"); + this.id_Step_Blend = Shader.PropertyToID("_Step_Blend"); + this.id_SystemTime = Shader.PropertyToID("_SystemTime"); + } + + // Token: 0x04005625 RID: 22053 + [SerializeField] + private Shader _shader; + + // Token: 0x04005626 RID: 22054 + [SerializeField] + private Color TintColor_ = Color.white; + + // Token: 0x04005627 RID: 22055 + [Range(-20f, 20f)] + [SerializeField] + private float Exposure_; + + // Token: 0x04005628 RID: 22056 + [SerializeField] + private float Opacity_ = 1f; + + // Token: 0x04005629 RID: 22057 + [SerializeField] + private bool OverExposure_MulToOpacity_ = true; + + // Token: 0x0400562A RID: 22058 + [SerializeField] + private bool OverExposure_ClampEmission_ = true; + + // Token: 0x0400562B RID: 22059 + [SerializeField] + private Texture2D Tex2_; + + // Token: 0x0400562C RID: 22060 + [SerializeField] + private float Cutoff_ = 0.5f; + + // Token: 0x0400562D RID: 22061 + [SerializeField] + private float Border_Rotate_; + + // Token: 0x0400562E RID: 22062 + [Range(-1f, 1f)] + [SerializeField] + private float Scrool_Time_ = 1f; + + // Token: 0x0400562F RID: 22063 + [Range(0f, 5f)] + [SerializeField] + private float Specular_Offset_ = 2.5f; + + // Token: 0x04005630 RID: 22064 + [Range(0f, 1f)] + [SerializeField] + private float Holo_ = 1.5f; + + // Token: 0x04005631 RID: 22065 + [SerializeField] + private Texture2D Mask_; + + // Token: 0x04005632 RID: 22066 + [Range(0f, 5f)] + [SerializeField] + private float Steps_ = 4f; + + // Token: 0x04005633 RID: 22067 + [SerializeField] + private Texture2D Steps_Tex_; + + // Token: 0x04005634 RID: 22068 + [Range(0f, 1f)] + [SerializeField] + private float Step_Blend_ = 1f; + + // Token: 0x04005635 RID: 22069 + [SerializeField] + private float SystemTime_ = 1f; + + // Token: 0x04005636 RID: 22070 + private Material material_; + + // Token: 0x04005637 RID: 22071 + private int id_TintColor; + + // Token: 0x04005638 RID: 22072 + private int id_Exposure; + + // Token: 0x04005639 RID: 22073 + private int id_Opacity; + + // Token: 0x0400563A RID: 22074 + private int id_OverExposure_MulToOpacity; + + // Token: 0x0400563B RID: 22075 + private int id_OverExposure_ClampEmission; + + // Token: 0x0400563C RID: 22076 + private int id_Tex2; + + // Token: 0x0400563D RID: 22077 + private int id_Cutoff; + + // Token: 0x0400563E RID: 22078 + private int id_Border_Rotate; + + // Token: 0x0400563F RID: 22079 + private int id_Scrool_Time; + + // Token: 0x04005640 RID: 22080 + private int id_Specular_Offset; + + // Token: 0x04005641 RID: 22081 + private int id_Holo; + + // Token: 0x04005642 RID: 22082 + private int id_Mask; + + // Token: 0x04005643 RID: 22083 + private int id_Steps; + + // Token: 0x04005644 RID: 22084 + private int id_Steps_Tex; + + // Token: 0x04005645 RID: 22085 + private int id_Step_Blend; + + // Token: 0x04005646 RID: 22086 + private int id_SystemTime; + + // Token: 0x04005647 RID: 22087 + private const HideFlags HideAndDontSave = HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor | HideFlags.NotEditable | HideFlags.DontSaveInBuild; + } +} diff --git a/Assets/FX/FX_UI_CMN_BG_V115_TitleLogo.cs.meta b/Assets/FX/FX_UI_CMN_BG_V115_TitleLogo.cs.meta new file mode 100644 index 0000000..4172b3d --- /dev/null +++ b/Assets/FX/FX_UI_CMN_BG_V115_TitleLogo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0466883dc56f09f4cb19564c9a35829b +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_UI_SummerLine.cs b/Assets/FX/FX_UI_SummerLine.cs new file mode 100644 index 0000000..1988699 --- /dev/null +++ b/Assets/FX/FX_UI_SummerLine.cs @@ -0,0 +1,285 @@ +using System; +using UnityEngine; +using UnityEngine.UI; + +namespace FX +{ + // Token: 0x02000764 RID: 1892 + [RequireComponent(typeof(Image))] + [ExecuteInEditMode] + public class FX_UI_SummerLine : MonoBehaviour + { + // Token: 0x06003048 RID: 12360 RVA: 0x00102FAC File Offset: 0x00102FAC + private void Start() + { + if (null == this.material_) + { + this.material_ = new Material(this._summerLine_Shader); + this.material_.hideFlags = (HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor | HideFlags.NotEditable | HideFlags.DontSaveInBuild); + } + this.reset(); + } + + // Token: 0x06003049 RID: 12361 RVA: 0x00102FE4 File Offset: 0x00102FE4 + private void OnDidApplyAnimationProperties() + { + this.reset(); + } + + // Token: 0x0600304A RID: 12362 RVA: 0x00102FEC File Offset: 0x00102FEC + private void OnDestroy() + { + if (null != this.material_) + { + UnityEngine.Object.DestroyImmediate(this.material_); + this.material_ = null; + } + } + + // Token: 0x0600304B RID: 12363 RVA: 0x00103014 File Offset: 0x00103014 + private void reset() + { + Image component = base.transform.GetComponent(); + if (component == null) + { + return; + } + this.initPropertyId(); + component.material = this.material_; + component.material.SetFloat(this.id_Opacity, this.Opacity_); + component.material.SetFloat(this.id_Use_Color_BG, (float)(this.Use_Color_BG_ ? 1 : 0)); + component.material.SetColor(this.id_Color_A, this.Color_A_); + component.material.SetColor(this.id_Color_B, this.Color_B_); + component.material.SetColor(this.id_Color_C, this.Color_C_); + component.material.SetColor(this.id_Color_D, this.Color_D_); + component.material.SetColor(this.id_Color_E, this.Color_E_); + component.material.SetVector(this.id_ColorA_MinToMax, this.ColorA_MinToMax_); + component.material.SetVector(this.id_ColorB_MinToMax, this.ColorB_MinToMax_); + component.material.SetVector(this.id_ColorC_MinToMax, this.ColorC_MinToMax_); + component.material.SetVector(this.id_ColorD_MinToMax, this.ColorD_MinToMax_); + component.material.SetVector(this.id_ColorE_MinToMax, this.ColorE_MinToMax_); + component.material.SetFloat(this.id_Move_Distance, this.move_Distance_); + component.material.SetFloat(this.id_Move_Speed, this.move_Speed_); + component.material.SetFloat(this.id_Edge_Softness, this.edge_Softness_); + component.material.SetFloat(this.id_All_Polar_Cutout_Angle, this.all_Polar_Cutout_Angle_); + component.material.SetFloat(this.id_All_Polar_Cutout_Reverce, (float)(this.All_Polar_Cutout_Reverce_ ? 1 : 0)); + component.material.SetFloat(this.id_All_Radius, this.all_Radius_); + component.material.SetFloat(this.id_All_Thickness, this.all_Thickness_); + component.material.SetFloat(this.id_All_MoonShape, this.all_MoonShape_); + component.material.SetFloat(this.id_All_RotateAngle, this.all_RotateAngle_); + component.material.SetVector(this.id_Offset_Center, this.offset_Center_); + component.material.SetVector(this.id_Offset_Scale, this.offset_Scale_); + } + + // Token: 0x0600304C RID: 12364 RVA: 0x0010329C File Offset: 0x0010329C + private void initPropertyId() + { + if (this.id_Opacity != 0) + { + return; + } + this.id_Opacity = Shader.PropertyToID("_Opacity"); + this.id_Use_Color_BG = Shader.PropertyToID("_Use_Color_BG"); + this.id_Color_A = Shader.PropertyToID("_Color_A"); + this.id_Color_B = Shader.PropertyToID("_Color_B"); + this.id_Color_C = Shader.PropertyToID("_Color_C"); + this.id_Color_D = Shader.PropertyToID("_Color_D"); + this.id_Color_E = Shader.PropertyToID("_Color_E"); + this.id_ColorA_MinToMax = Shader.PropertyToID("_ColorA_MinToMax"); + this.id_ColorB_MinToMax = Shader.PropertyToID("_ColorB_MinToMax"); + this.id_ColorC_MinToMax = Shader.PropertyToID("_ColorC_MinToMax"); + this.id_ColorD_MinToMax = Shader.PropertyToID("_ColorD_MinToMax"); + this.id_ColorE_MinToMax = Shader.PropertyToID("_ColorE_MinToMax"); + this.id_Move_Distance = Shader.PropertyToID("_Move_Distance"); + this.id_Move_Speed = Shader.PropertyToID("_Move_Speed"); + this.id_Edge_Softness = Shader.PropertyToID("_Edge_Softness"); + this.id_All_Polar_Cutout_Angle = Shader.PropertyToID("_All_Polar_Cutout_Angle"); + this.id_All_Polar_Cutout_Reverce = Shader.PropertyToID("_All_Polar_Cutout_Reverce"); + this.id_All_Radius = Shader.PropertyToID("_All_Radius"); + this.id_All_Thickness = Shader.PropertyToID("_All_Thickness"); + this.id_All_MoonShape = Shader.PropertyToID("_All_MoonShape"); + this.id_All_RotateAngle = Shader.PropertyToID("_All_RotateAngle"); + this.id_Offset_Center = Shader.PropertyToID("_Offset_Center"); + this.id_Offset_Scale = Shader.PropertyToID("_Offset_Scale"); + } + + // Token: 0x04005648 RID: 22088 + [SerializeField] + private Shader _summerLine_Shader; + + // Token: 0x04005649 RID: 22089 + [Range(0f, 1f)] + [SerializeField] + private float Opacity_ = 1f; + + // Token: 0x0400564A RID: 22090 + [SerializeField] + private bool Use_Color_BG_; + + // Token: 0x0400564B RID: 22091 + [SerializeField] + private Color Color_A_ = new Color(0.3924569f, 0.8274511f, 1f, 1f); + + // Token: 0x0400564C RID: 22092 + [SerializeField] + private Color Color_B_ = new Color(1f, 0.09803922f, 0.6705883f, 1f); + + // Token: 0x0400564D RID: 22093 + [SerializeField] + private Color Color_C_ = new Color(1f, 0.9450981f, 0f, 1f); + + // Token: 0x0400564E RID: 22094 + [SerializeField] + private Color Color_D_ = new Color(0.05882353f, 0.6431373f, 0.937255f, 1f); + + // Token: 0x0400564F RID: 22095 + [SerializeField] + private Color Color_E_ = new Color(0f, 0.9843138f, 0.9960785f, 1f); + + // Token: 0x04005650 RID: 22096 + [SerializeField] + private Vector2 ColorA_MinToMax_ = new Vector2(0.1f, 0.3f); + + // Token: 0x04005651 RID: 22097 + [SerializeField] + private Vector2 ColorB_MinToMax_ = new Vector2(0.2f, 0.45f); + + // Token: 0x04005652 RID: 22098 + [SerializeField] + private Vector2 ColorC_MinToMax_ = new Vector2(0.55f, 0.7f); + + // Token: 0x04005653 RID: 22099 + [SerializeField] + private Vector2 ColorD_MinToMax_ = new Vector2(0.75f, 0.83f); + + // Token: 0x04005654 RID: 22100 + [SerializeField] + private Vector2 ColorE_MinToMax_ = new Vector2(0.82f, 0.9f); + + // Token: 0x04005655 RID: 22101 + [Range(0f, 0.1f)] + [SerializeField] + private float move_Distance_ = 0.1f; + + // Token: 0x04005656 RID: 22102 + [Range(0f, 1f)] + [SerializeField] + private float move_Speed_ = 0.08f; + + // Token: 0x04005657 RID: 22103 + [Range(0f, 0.1f)] + [SerializeField] + private float edge_Softness_ = 0.0165f; + + // Token: 0x04005658 RID: 22104 + [Range(0f, 360f)] + [SerializeField] + private float all_Polar_Cutout_Angle_ = 240f; + + // Token: 0x04005659 RID: 22105 + [SerializeField] + private bool All_Polar_Cutout_Reverce_; + + // Token: 0x0400565A RID: 22106 + [Range(-1f, 2f)] + [SerializeField] + private float all_Radius_ = 0.5f; + + // Token: 0x0400565B RID: 22107 + [Range(0f, 1f)] + [SerializeField] + private float all_Thickness_ = 0.5f; + + // Token: 0x0400565C RID: 22108 + [Range(-1f, 1f)] + [SerializeField] + private float all_MoonShape_ = 0.25f; + + // Token: 0x0400565D RID: 22109 + [SerializeField] + private float all_RotateAngle_; + + // Token: 0x0400565E RID: 22110 + [SerializeField] + private Vector2 offset_Center_ = new Vector2(0f, 0f); + + // Token: 0x0400565F RID: 22111 + [SerializeField] + private Vector2 offset_Scale_ = new Vector2(1f, 1f); + + // Token: 0x04005660 RID: 22112 + private Material material_; + + // Token: 0x04005661 RID: 22113 + private int id_Opacity; + + // Token: 0x04005662 RID: 22114 + private int id_Use_Color_BG; + + // Token: 0x04005663 RID: 22115 + private int id_Color_A; + + // Token: 0x04005664 RID: 22116 + private int id_Color_B; + + // Token: 0x04005665 RID: 22117 + private int id_Color_C; + + // Token: 0x04005666 RID: 22118 + private int id_Color_D; + + // Token: 0x04005667 RID: 22119 + private int id_Color_E; + + // Token: 0x04005668 RID: 22120 + private int id_ColorA_MinToMax; + + // Token: 0x04005669 RID: 22121 + private int id_ColorB_MinToMax; + + // Token: 0x0400566A RID: 22122 + private int id_ColorC_MinToMax; + + // Token: 0x0400566B RID: 22123 + private int id_ColorD_MinToMax; + + // Token: 0x0400566C RID: 22124 + private int id_ColorE_MinToMax; + + // Token: 0x0400566D RID: 22125 + private int id_Move_Distance; + + // Token: 0x0400566E RID: 22126 + private int id_Move_Speed; + + // Token: 0x0400566F RID: 22127 + private int id_Edge_Softness; + + // Token: 0x04005670 RID: 22128 + private int id_All_Polar_Cutout_Angle; + + // Token: 0x04005671 RID: 22129 + private int id_All_Polar_Cutout_Reverce; + + // Token: 0x04005672 RID: 22130 + private int id_All_Radius; + + // Token: 0x04005673 RID: 22131 + private int id_All_Thickness; + + // Token: 0x04005674 RID: 22132 + private int id_All_MoonShape; + + // Token: 0x04005675 RID: 22133 + private int id_All_RotateAngle; + + // Token: 0x04005676 RID: 22134 + private int id_Offset_Center; + + // Token: 0x04005677 RID: 22135 + private int id_Offset_Scale; + + // Token: 0x04005678 RID: 22136 + private const HideFlags HideAndDontSave = HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor | HideFlags.NotEditable | HideFlags.DontSaveInBuild; + } +} diff --git a/Assets/FX/FX_UI_SummerLine.cs.meta b/Assets/FX/FX_UI_SummerLine.cs.meta new file mode 100644 index 0000000..bd6b43f --- /dev/null +++ b/Assets/FX/FX_UI_SummerLine.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 92d27f3d1e1be0f498d9697342522c6c +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_UVAnimation.cs b/Assets/FX/FX_UVAnimation.cs new file mode 100644 index 0000000..27b0691 --- /dev/null +++ b/Assets/FX/FX_UVAnimation.cs @@ -0,0 +1,57 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000762 RID: 1890 + public class FX_UVAnimation : MonoBehaviour + { + // Token: 0x0600303F RID: 12351 RVA: 0x00102998 File Offset: 0x00102998 + public void Start() + { + this.thisMaterial = base.GetComponent().material; + } + + // Token: 0x06003040 RID: 12352 RVA: 0x001029AC File Offset: 0x001029AC + public void Update() + { + this.rate = (this.timeCount - this._timeToStart) / this._timeToGoal; + this.rate = Mathf.Clamp(this.rate, 0f, 1f); + this.resultUV = this._startUVOffset + (this._goalUVOffset - this._startUVOffset) * this.rate; + this.thisMaterial.SetTextureOffset("_MainTex", this.resultUV); + this.timeCount += Time.deltaTime; + } + + // Token: 0x0400561D RID: 22045 + [Tooltip("アニメーション開始時のUVオフセット")] + [SerializeField] + private Vector2 _startUVOffset; + + // Token: 0x0400561E RID: 22046 + [Tooltip("アニメーション終了時のUVオフセット")] + [SerializeField] + private Vector2 _goalUVOffset; + + // Token: 0x0400561F RID: 22047 + [Tooltip("アニメーション開始までのウェイト(秒数)")] + [SerializeField] + private float _timeToStart; + + // Token: 0x04005620 RID: 22048 + [Tooltip("アニメーション開始から終了までの長さ(秒数)")] + [SerializeField] + private float _timeToGoal; + + // Token: 0x04005621 RID: 22049 + private Vector2 resultUV; + + // Token: 0x04005622 RID: 22050 + private Material thisMaterial; + + // Token: 0x04005623 RID: 22051 + private float timeCount; + + // Token: 0x04005624 RID: 22052 + private float rate; + } +} diff --git a/Assets/FX/FX_UVAnimation.cs.meta b/Assets/FX/FX_UVAnimation.cs.meta new file mode 100644 index 0000000..56b49ce --- /dev/null +++ b/Assets/FX/FX_UVAnimation.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 013f3fe32ce04e945901c20eef975325 +timeCreated: 1711856756 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_Unlit_Rate_2Tex_PolarCoordinate.cs b/Assets/FX/FX_Unlit_Rate_2Tex_PolarCoordinate.cs new file mode 100644 index 0000000..11c7d08 --- /dev/null +++ b/Assets/FX/FX_Unlit_Rate_2Tex_PolarCoordinate.cs @@ -0,0 +1,200 @@ +using System; +using UnityEngine; +using UnityEngine.UI; + +namespace FX +{ + // Token: 0x02000765 RID: 1893 + [RequireComponent(typeof(Image))] + [ExecuteInEditMode] + public class FX_Unlit_Rate_2Tex_PolarCoordinate : MonoBehaviour + { + // Token: 0x0600304E RID: 12366 RVA: 0x0010348C File Offset: 0x0010348C + private void Start() + { + if (null == this.material_) + { + this.material_ = new Material(this._shader); + this.material_.hideFlags = (HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor | HideFlags.NotEditable | HideFlags.DontSaveInBuild); + } + this.reset(); + } + + // Token: 0x0600304F RID: 12367 RVA: 0x001034C4 File Offset: 0x001034C4 + private void OnDidApplyAnimationProperties() + { + this.reset(); + } + + // Token: 0x06003050 RID: 12368 RVA: 0x001034CC File Offset: 0x001034CC + private void OnDestroy() + { + if (null != this.material_) + { + UnityEngine.Object.DestroyImmediate(this.material_); + this.material_ = null; + } + } + + // Token: 0x06003051 RID: 12369 RVA: 0x001034F4 File Offset: 0x001034F4 + private void reset() + { + Image component = base.transform.GetComponent(); + if (component == null) + { + return; + } + this.initPropertyId(); + component.material = this.material_; + component.material.SetColor(this.id_TintColor, this.TintColor_); + component.material.SetFloat(this.id_Exposure, this.Exposure_); + component.material.SetFloat(this.id_Opacity, this.Opacity_); + component.material.SetFloat(this.id_OverExposure_MulToOpacity, (float)(this.OverExposure_MulToOpacity_ ? 1 : 0)); + component.material.SetFloat(this.id_OverExposure_ClampEmission, (float)(this.OverExposure_ClampEmission_ ? 1 : 0)); + component.material.SetTexture(this.id_Tex2, this.Tex2_); + component.material.SetFloat(this.id_Switch_uv, (float)(this.Switch_uv_ ? 1 : 0)); + component.material.SetFloat(this.id_Exp_Radial_easing, this.Exp_Radial_easing_); + component.material.SetFloat(this.id_Use_CircleMask, (float)(this.Use_CircleMask_ ? 1 : 0)); + component.material.SetFloat(this.id_Exp_CircleMask, this.Exp_CircleMask_); + component.material.SetFloat(this.id_Cutoff, this.Cutoff_); + component.material.SetFloat(this.id_Border_Rotate, this.Border_Rotate_); + component.material.SetFloat(this.id_Border_Amount, this.Border_Amount_); + component.material.SetFloat(this.id_Border_Thickness, this.Border_Thickness_); + } + + // Token: 0x06003052 RID: 12370 RVA: 0x001036A4 File Offset: 0x001036A4 + private void initPropertyId() + { + if (this.id_Opacity != 0) + { + return; + } + this.id_TintColor = Shader.PropertyToID("_TintColor"); + this.id_Exposure = Shader.PropertyToID("_Exposure"); + this.id_Opacity = Shader.PropertyToID("_Opacity"); + this.id_OverExposure_MulToOpacity = Shader.PropertyToID("_OverExposure_MulToOpacity"); + this.id_OverExposure_ClampEmission = Shader.PropertyToID("_OverExposure_ClampEmission"); + this.id_Tex2 = Shader.PropertyToID("_Tex2"); + this.id_Switch_uv = Shader.PropertyToID("_Switch_uv"); + this.id_Exp_Radial_easing = Shader.PropertyToID("_Exp_Radial_easing"); + this.id_Use_CircleMask = Shader.PropertyToID("_Use_CircleMask"); + this.id_Exp_CircleMask = Shader.PropertyToID("_Exp_CircleMask"); + this.id_Cutoff = Shader.PropertyToID("_Cutoff"); + this.id_Border_Rotate = Shader.PropertyToID("_Border_Rotate"); + this.id_Border_Amount = Shader.PropertyToID("_Border_Amount"); + this.id_Border_Thickness = Shader.PropertyToID("_Border_Thickness"); + } + + // Token: 0x04005679 RID: 22137 + [SerializeField] + private Shader _shader; + + // Token: 0x0400567A RID: 22138 + [SerializeField] + private Color TintColor_ = Color.white; + + // Token: 0x0400567B RID: 22139 + [Range(-20f, 20f)] + [SerializeField] + private float Exposure_; + + // Token: 0x0400567C RID: 22140 + [SerializeField] + private float Opacity_ = 1f; + + // Token: 0x0400567D RID: 22141 + [SerializeField] + private bool OverExposure_MulToOpacity_ = true; + + // Token: 0x0400567E RID: 22142 + [SerializeField] + private bool OverExposure_ClampEmission_ = true; + + // Token: 0x0400567F RID: 22143 + [SerializeField] + private Texture2D Tex2_; + + // Token: 0x04005680 RID: 22144 + [SerializeField] + private bool Switch_uv_; + + // Token: 0x04005681 RID: 22145 + [Range(-5f, 5f)] + [SerializeField] + private float Exp_Radial_easing_; + + // Token: 0x04005682 RID: 22146 + [SerializeField] + private bool Use_CircleMask_; + + // Token: 0x04005683 RID: 22147 + [SerializeField] + [Range(-5f, 5f)] + private float Exp_CircleMask_ = -5f; + + // Token: 0x04005684 RID: 22148 + private float Cutoff_ = 0.5f; + + // Token: 0x04005685 RID: 22149 + [SerializeField] + private float Border_Rotate_; + + // Token: 0x04005686 RID: 22150 + [Range(0.0001f, 1f)] + [SerializeField] + private float Border_Amount_ = 0.05f; + + // Token: 0x04005687 RID: 22151 + [SerializeField] + [Range(0f, 1f)] + private float Border_Thickness_ = 1f; + + // Token: 0x04005688 RID: 22152 + private Material material_; + + // Token: 0x04005689 RID: 22153 + private int id_TintColor; + + // Token: 0x0400568A RID: 22154 + private int id_Exposure; + + // Token: 0x0400568B RID: 22155 + private int id_Opacity; + + // Token: 0x0400568C RID: 22156 + private int id_OverExposure_MulToOpacity; + + // Token: 0x0400568D RID: 22157 + private int id_OverExposure_ClampEmission; + + // Token: 0x0400568E RID: 22158 + private int id_Tex2; + + // Token: 0x0400568F RID: 22159 + private int id_Switch_uv; + + // Token: 0x04005690 RID: 22160 + private int id_Exp_Radial_easing; + + // Token: 0x04005691 RID: 22161 + private int id_Use_CircleMask; + + // Token: 0x04005692 RID: 22162 + private int id_Exp_CircleMask; + + // Token: 0x04005693 RID: 22163 + private int id_Cutoff; + + // Token: 0x04005694 RID: 22164 + private int id_Border_Rotate; + + // Token: 0x04005695 RID: 22165 + private int id_Border_Amount; + + // Token: 0x04005696 RID: 22166 + private int id_Border_Thickness; + + // Token: 0x04005697 RID: 22167 + private const HideFlags HideAndDontSave = HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor | HideFlags.NotEditable | HideFlags.DontSaveInBuild; + } +} diff --git a/Assets/FX/FX_Unlit_Rate_2Tex_PolarCoordinate.cs.meta b/Assets/FX/FX_Unlit_Rate_2Tex_PolarCoordinate.cs.meta new file mode 100644 index 0000000..852ba43 --- /dev/null +++ b/Assets/FX/FX_Unlit_Rate_2Tex_PolarCoordinate.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 583f1b08bbcb2f0469f560dadedaa637 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_ch_000006.cs b/Assets/FX/FX_ch_000006.cs new file mode 100644 index 0000000..bf854ee --- /dev/null +++ b/Assets/FX/FX_ch_000006.cs @@ -0,0 +1,37 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000767 RID: 1895 + public class FX_ch_000006 : MonoBehaviour + { + // Token: 0x06003057 RID: 12375 RVA: 0x00103B9C File Offset: 0x00103B9C + private void Start() + { + if (this._skinnedMeshRenderer && this._FX_Prefab && this._FX_Parent) + { + GameObject gameObject = UnityEngine.Object.Instantiate(this._FX_Prefab); + gameObject.transform.position = this._FX_Parent.transform.position; + gameObject.transform.parent = this._FX_Parent.transform; + FX_ch_000006_ps component = gameObject.GetComponent(); + if (component) + { + component.SetSR(this._skinnedMeshRenderer); + } + } + } + + // Token: 0x040056A6 RID: 22182 + [SerializeField] + private SkinnedMeshRenderer _skinnedMeshRenderer; + + // Token: 0x040056A7 RID: 22183 + [SerializeField] + private GameObject _FX_Prefab; + + // Token: 0x040056A8 RID: 22184 + [SerializeField] + private GameObject _FX_Parent; + } +} diff --git a/Assets/FX/FX_ch_000006.cs.meta b/Assets/FX/FX_ch_000006.cs.meta new file mode 100644 index 0000000..77c9ee3 --- /dev/null +++ b/Assets/FX/FX_ch_000006.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2850cfc0bee8ce34ab28fe82e83c78f6 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_ch_000006_ps.cs b/Assets/FX/FX_ch_000006_ps.cs new file mode 100644 index 0000000..d8e6206 --- /dev/null +++ b/Assets/FX/FX_ch_000006_ps.cs @@ -0,0 +1,28 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000768 RID: 1896 + public class FX_ch_000006_ps : MonoBehaviour + { + // Token: 0x06003059 RID: 12377 RVA: 0x00103C3C File Offset: 0x00103C3C + public void SetSR(SkinnedMeshRenderer skinnedMeshRenderer) + { + for (int i = 0; i < this._particleSystems.Length; i++) + { + if (this._particleSystems[i]) + { + ParticleSystem.ShapeModule shape = this._particleSystems[i].shape; + shape.enabled = true; + shape.shapeType = ParticleSystemShapeType.SkinnedMeshRenderer; + shape.skinnedMeshRenderer = skinnedMeshRenderer; + } + } + } + + // Token: 0x040056A9 RID: 22185 + [SerializeField] + private ParticleSystem[] _particleSystems; + } +} diff --git a/Assets/FX/FX_ch_000006_ps.cs.meta b/Assets/FX/FX_ch_000006_ps.cs.meta new file mode 100644 index 0000000..5282ae4 --- /dev/null +++ b/Assets/FX/FX_ch_000006_ps.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4d10a7b75bcb97347b1011dafa5118f9 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_ch_002009.cs b/Assets/FX/FX_ch_002009.cs new file mode 100644 index 0000000..7704085 --- /dev/null +++ b/Assets/FX/FX_ch_002009.cs @@ -0,0 +1,93 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000769 RID: 1897 + public class FX_ch_002009 : MonoBehaviour + { + // Token: 0x0600305B RID: 12379 RVA: 0x00103CD4 File Offset: 0x00103CD4 + private void Start() + { + if (this._parent != null) + { + GameObject gameObject = UnityEngine.Object.Instantiate(this.GenerateObject); + gameObject.transform.position = this._parent.transform.position + gameObject.transform.position; + gameObject.transform.parent = this._parent.transform; + this.animator = gameObject.GetComponent(); + Renderer component = gameObject.GetComponent(); + this._material = ((!(component != null)) ? null : component.material); + this._propertyID_ValueName1 = Shader.PropertyToID(this.valueName1); + this._propertyID_ValueName2 = Shader.PropertyToID(this.valueName2); + } + } + + // Token: 0x0600305C RID: 12380 RVA: 0x00103D94 File Offset: 0x00103D94 + private void Update() + { + this.talePosition[0] = (this.talePosition[0] + this.previousWorldPosition - base.gameObject.transform.position) * this.sk; + if (Mathf.Abs(this.talePosition[0].x) >= 1f) + { + this.talePosition[0].x = Mathf.Sign(this.talePosition[0].x); + } + this.talePosition[1].x = Mathf.Abs(this.talePosition[0].x) - Mathf.Abs(this.talePosition[1].x); + if (Mathf.Abs(this.talePosition[0].x) <= 0.001f) + { + this.talePosition[0].x = 0f; + } + if (Mathf.Abs(this.talePosition[1].x) <= 0.001f) + { + this.talePosition[1].x = 0f; + } + if (this._material != null) + { + this._material.SetFloat(this._propertyID_ValueName1, this.talePosition[0].x); + this._material.SetFloat(this._propertyID_ValueName2, this.talePosition[1].x); + } + this.previousWorldPosition = base.gameObject.transform.position; + this.talePosition[1] = this.talePosition[0]; + } + + // Token: 0x0600305D RID: 12381 RVA: 0x00103F6C File Offset: 0x00103F6C + private void TriggerEffectMotion(string _string) + { + this.animator.SetTrigger(_string); + } + + // Token: 0x040056AA RID: 22186 + [SerializeField] + private GameObject GenerateObject; + + // Token: 0x040056AB RID: 22187 + [SerializeField] + private GameObject _parent; + + // Token: 0x040056AC RID: 22188 + private Vector3 previousWorldPosition; + + // Token: 0x040056AD RID: 22189 + private Vector3[] talePosition = new Vector3[2]; + + // Token: 0x040056AE RID: 22190 + [SerializeField] + private float sk = 0.97f; + + // Token: 0x040056AF RID: 22191 + private string valueName1 = "_talePosition1"; + + // Token: 0x040056B0 RID: 22192 + private string valueName2 = "_talePosition2"; + + // Token: 0x040056B1 RID: 22193 + private Material _material; + + // Token: 0x040056B2 RID: 22194 + private int _propertyID_ValueName1; + + // Token: 0x040056B3 RID: 22195 + private int _propertyID_ValueName2; + + // Token: 0x040056B4 RID: 22196 + private Animator animator; + } +} diff --git a/Assets/FX/FX_ch_002009.cs.meta b/Assets/FX/FX_ch_002009.cs.meta new file mode 100644 index 0000000..e22b5e8 --- /dev/null +++ b/Assets/FX/FX_ch_002009.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6d6aab9001b63d5428925d5c1daf6efc +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_ch_002010.cs b/Assets/FX/FX_ch_002010.cs new file mode 100644 index 0000000..f13f14c --- /dev/null +++ b/Assets/FX/FX_ch_002010.cs @@ -0,0 +1,32 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200076A RID: 1898 + public class FX_ch_002010 : MonoBehaviour + { + // Token: 0x0600305F RID: 12383 RVA: 0x00103F84 File Offset: 0x00103F84 + private void Start() + { + if (this._parent.Length > 0) + { + for (int i = this._parent.Length - 1; i >= 0; i--) + { + GameObject gameObject = UnityEngine.Object.Instantiate(this.GenerateObject); + gameObject.transform.position = this._parent[i].transform.position; + gameObject.transform.parent = this._parent[i].transform; + gameObject.transform.localRotation = this.GenerateObject.transform.localRotation; + } + } + } + + // Token: 0x040056B5 RID: 22197 + [SerializeField] + private GameObject GenerateObject; + + // Token: 0x040056B6 RID: 22198 + [SerializeField] + private GameObject[] _parent; + } +} diff --git a/Assets/FX/FX_ch_002010.cs.meta b/Assets/FX/FX_ch_002010.cs.meta new file mode 100644 index 0000000..40486dd --- /dev/null +++ b/Assets/FX/FX_ch_002010.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9b3d1cbcc5a0b45489914fe81fb57aac +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_ch_002022.cs b/Assets/FX/FX_ch_002022.cs new file mode 100644 index 0000000..5fcf4db --- /dev/null +++ b/Assets/FX/FX_ch_002022.cs @@ -0,0 +1,33 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200076B RID: 1899 + public class FX_ch_002022 : MonoBehaviour + { + // Token: 0x06003061 RID: 12385 RVA: 0x0010402C File Offset: 0x0010402C + private void Start() + { + this.pID = Shader.PropertyToID(this.valueName); + this.tr = base.GetComponent(); + } + + // Token: 0x06003062 RID: 12386 RVA: 0x0010404C File Offset: 0x0010404C + private void Update() + { + Vector3 position = base.transform.position; + this.tr.materials[0].SetVector(this.pID, position); + } + + // Token: 0x040056B7 RID: 22199 + private int pID; + + // Token: 0x040056B8 RID: 22200 + private Renderer tr; + + // Token: 0x040056B9 RID: 22201 + [SerializeField] + private string valueName = "_AbsPos"; + } +} diff --git a/Assets/FX/FX_ch_002022.cs.meta b/Assets/FX/FX_ch_002022.cs.meta new file mode 100644 index 0000000..502a126 --- /dev/null +++ b/Assets/FX/FX_ch_002022.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f47c9de1895610b42813066486c0be28 +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_ch_035001.cs b/Assets/FX/FX_ch_035001.cs new file mode 100644 index 0000000..ca9a3a0 --- /dev/null +++ b/Assets/FX/FX_ch_035001.cs @@ -0,0 +1,50 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200076C RID: 1900 + public class FX_ch_035001 : MonoBehaviour + { + // Token: 0x06003064 RID: 12388 RVA: 0x0010408C File Offset: 0x0010408C + private void Start() + { + if (this._parent.Length > 0) + { + for (int i = 0; i < this._parent.Length; i++) + { + GameObject gameObject = UnityEngine.Object.Instantiate(this.GenerateObject); + gameObject.transform.position = this._parent[i].transform.position; + gameObject.transform.parent = this._parent[i].transform; + gameObject.transform.localRotation = this.GenerateObject.transform.localRotation; + } + } + } + + // Token: 0x06003065 RID: 12389 RVA: 0x0010411C File Offset: 0x0010411C + private void Update() + { + GetAllChildren.MapComponentsInChildren(base.transform, delegate(FX_ch_035001_Trail targetComponent) + { + if (null == targetComponent) + { + return; + } + targetComponent.value = this._value; + }); + } + + // Token: 0x040056BA RID: 22202 + [SerializeField] + private GameObject GenerateObject; + + // Token: 0x040056BB RID: 22203 + [SerializeField] + private GameObject[] _parent; + + // Token: 0x040056BC RID: 22204 + [SerializeField] + [Range(0f, 1f)] + private float _value; + } +} diff --git a/Assets/FX/FX_ch_035001.cs.meta b/Assets/FX/FX_ch_035001.cs.meta new file mode 100644 index 0000000..842a870 --- /dev/null +++ b/Assets/FX/FX_ch_035001.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 69d0cd0e17b82f849b762cf368555338 +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_ch_035001_Trail.cs b/Assets/FX/FX_ch_035001_Trail.cs new file mode 100644 index 0000000..df7ab2c --- /dev/null +++ b/Assets/FX/FX_ch_035001_Trail.cs @@ -0,0 +1,46 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200076D RID: 1901 + public class FX_ch_035001_Trail : MonoBehaviour + { + // Token: 0x06003068 RID: 12392 RVA: 0x00104180 File Offset: 0x00104180 + private void Start() + { + this.pID = Shader.PropertyToID(this.valueName); + this.pID2 = Shader.PropertyToID(this.valueName2); + this.tr = base.GetComponent(); + } + + // Token: 0x06003069 RID: 12393 RVA: 0x001041B0 File Offset: 0x001041B0 + private void Update() + { + this.tr.materials[0].SetFloat(this.pID, this.value); + float x = base.transform.position.x; + this.tr.materials[0].SetFloat(this.pID2, x); + } + + // Token: 0x040056BD RID: 22205 + private int pID; + + // Token: 0x040056BE RID: 22206 + private int pID2; + + // Token: 0x040056BF RID: 22207 + private TrailRenderer tr; + + // Token: 0x040056C0 RID: 22208 + [NonSerialized] + public float value = 1f; + + // Token: 0x040056C1 RID: 22209 + [SerializeField] + private string valueName = "_Opacity"; + + // Token: 0x040056C2 RID: 22210 + [SerializeField] + private string valueName2 = "_AbsPosX"; + } +} diff --git a/Assets/FX/FX_ch_035001_Trail.cs.meta b/Assets/FX/FX_ch_035001_Trail.cs.meta new file mode 100644 index 0000000..086e901 --- /dev/null +++ b/Assets/FX/FX_ch_035001_Trail.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ebaf04af715f2a642840773ab9f800f1 +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_we_000006.cs b/Assets/FX/FX_we_000006.cs new file mode 100644 index 0000000..da0c11b --- /dev/null +++ b/Assets/FX/FX_we_000006.cs @@ -0,0 +1,95 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200076E RID: 1902 + public class FX_we_000006 : MonoBehaviour + { + // Token: 0x0600306B RID: 12395 RVA: 0x00104210 File Offset: 0x00104210 + private void SwitchCards(string tempCard) + { + if (tempCard != null) + { + if (tempCard == "off") + { + this._mesh_card.enabled = true; + this._mesh_illust.enabled = true; + this._mesh_card_Temp.enabled = false; + this._mesh_illust_Temp.enabled = false; + this._mesh_card_Temp2.enabled = false; + this._mesh_illust_Temp2.enabled = false; + return; + } + if (tempCard == "turn") + { + this.passedBattlestart = 1; + this._mesh_card.enabled = false; + this._mesh_illust.enabled = false; + this._mesh_card_Temp.enabled = true; + this._mesh_illust_Temp.enabled = true; + this._mesh_card_Temp2.enabled = false; + this._mesh_illust_Temp2.enabled = false; + return; + } + if (tempCard == "battlestart") + { + this._mesh_card.enabled = false; + this._mesh_illust.enabled = false; + this._mesh_card_Temp.enabled = false; + this._mesh_illust_Temp.enabled = false; + this._mesh_card_Temp2.enabled = true; + this._mesh_illust_Temp2.enabled = true; + return; + } + if (tempCard == "skipped_wait") + { + if (this.passedBattlestart == 1) + { + this.passedBattlestart = 0; + this._mesh_card.enabled = true; + this._mesh_illust.enabled = true; + this._mesh_card_Temp.enabled = false; + this._mesh_illust_Temp.enabled = false; + this._mesh_card_Temp2.enabled = false; + this._mesh_illust_Temp2.enabled = false; + } + return; + } + } + this._mesh_card.enabled = true; + this._mesh_illust.enabled = true; + this._mesh_card_Temp.enabled = false; + this._mesh_illust_Temp.enabled = false; + this._mesh_card_Temp2.enabled = false; + this._mesh_illust_Temp2.enabled = false; + } + + // Token: 0x040056C3 RID: 22211 + [SerializeField] + private SkinnedMeshRenderer _mesh_card; + + // Token: 0x040056C4 RID: 22212 + [SerializeField] + private SkinnedMeshRenderer _mesh_illust; + + // Token: 0x040056C5 RID: 22213 + [SerializeField] + private MeshRenderer _mesh_card_Temp; + + // Token: 0x040056C6 RID: 22214 + [SerializeField] + private MeshRenderer _mesh_illust_Temp; + + // Token: 0x040056C7 RID: 22215 + [SerializeField] + private MeshRenderer _mesh_card_Temp2; + + // Token: 0x040056C8 RID: 22216 + [SerializeField] + private MeshRenderer _mesh_illust_Temp2; + + // Token: 0x040056C9 RID: 22217 + private int passedBattlestart; + } +} diff --git a/Assets/FX/FX_we_000006.cs.meta b/Assets/FX/FX_we_000006.cs.meta new file mode 100644 index 0000000..fc70e60 --- /dev/null +++ b/Assets/FX/FX_we_000006.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 45bca0bb92e2bd245a25216d27e1116d +timeCreated: 1711856757 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/FX_we_001012.cs b/Assets/FX/FX_we_001012.cs new file mode 100644 index 0000000..4063f43 --- /dev/null +++ b/Assets/FX/FX_we_001012.cs @@ -0,0 +1,88 @@ +using System; +using UnityEngine; + +namespace FX +{ + // Token: 0x0200076F RID: 1903 + public class FX_we_001012 : MonoBehaviour + { + // Token: 0x0600306D RID: 12397 RVA: 0x0010440C File Offset: 0x0010440C + private void Start() + { + GameObject gameObject = UnityEngine.Object.Instantiate(this._fX_we_001012_1); + gameObject.transform.position = this._sw_1_weapon_b.position; + this.animator_1 = gameObject.GetComponent(); + gameObject.transform.parent = this._sw_1_weapon_b; + GameObject gameObject2 = UnityEngine.Object.Instantiate(this._fX_we_001012); + gameObject2.transform.position = this._sw_2_weapon_b.position; + this.animator_2 = gameObject2.GetComponent(); + gameObject2.transform.parent = this._sw_2_weapon_b; + GameObject gameObject3 = UnityEngine.Object.Instantiate(this._fX_we_001012); + gameObject3.transform.position = this._sw_3_weapon_b.position; + this.animator_3 = gameObject3.GetComponent(); + gameObject3.transform.parent = this._sw_3_weapon_b; + GameObject gameObject4 = UnityEngine.Object.Instantiate(this._fX_we_001012); + gameObject4.transform.position = this._sw_4_weapon_b.position; + this.animator_4 = gameObject4.GetComponent(); + gameObject4.transform.parent = this._sw_4_weapon_b; + GameObject gameObject5 = UnityEngine.Object.Instantiate(this._fX_we_001012); + gameObject5.transform.position = this._sw_5_weapon_b.position; + this.animator_5 = gameObject5.GetComponent(); + gameObject5.transform.parent = this._sw_5_weapon_b; + } + + // Token: 0x0600306E RID: 12398 RVA: 0x00104558 File Offset: 0x00104558 + private void Update() + { + if (this.count >= 120f) + { + this.animator_1.SetInteger("Form_Number", (int)UnityEngine.Random.Range(0f, 2.99f)); + this.animator_2.SetInteger("Form_Number", (int)UnityEngine.Random.Range(0f, 2.99f)); + this.animator_3.SetInteger("Form_Number", (int)UnityEngine.Random.Range(0f, 2.99f)); + this.animator_4.SetInteger("Form_Number", (int)UnityEngine.Random.Range(0f, 2.99f)); + this.animator_5.SetInteger("Form_Number", (int)UnityEngine.Random.Range(0f, 2.99f)); + this.count = 0f; + } + this.count += Time.deltaTime * 60f; + } + + // Token: 0x040056CA RID: 22218 + public GameObject _fX_we_001012; + + // Token: 0x040056CB RID: 22219 + public GameObject _fX_we_001012_1; + + // Token: 0x040056CC RID: 22220 + public Transform _sw_1_weapon_b; + + // Token: 0x040056CD RID: 22221 + public Transform _sw_2_weapon_b; + + // Token: 0x040056CE RID: 22222 + public Transform _sw_3_weapon_b; + + // Token: 0x040056CF RID: 22223 + public Transform _sw_4_weapon_b; + + // Token: 0x040056D0 RID: 22224 + public Transform _sw_5_weapon_b; + + // Token: 0x040056D1 RID: 22225 + private float count; + + // Token: 0x040056D2 RID: 22226 + private Animator animator_1; + + // Token: 0x040056D3 RID: 22227 + private Animator animator_2; + + // Token: 0x040056D4 RID: 22228 + private Animator animator_3; + + // Token: 0x040056D5 RID: 22229 + private Animator animator_4; + + // Token: 0x040056D6 RID: 22230 + private Animator animator_5; + } +} diff --git a/Assets/FX/FX_we_001012.cs.meta b/Assets/FX/FX_we_001012.cs.meta new file mode 100644 index 0000000..57f874a --- /dev/null +++ b/Assets/FX/FX_we_001012.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a5d99f123ce4ac64481a86d280167bd3 +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FX/GetAllChildren.cs b/Assets/FX/GetAllChildren.cs new file mode 100644 index 0000000..b36bac2 --- /dev/null +++ b/Assets/FX/GetAllChildren.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace FX +{ + // Token: 0x02000770 RID: 1904 + public static class GetAllChildren + { + // Token: 0x0600306F RID: 12399 RVA: 0x00104638 File Offset: 0x00104638 + public static List GetAll(this GameObject obj) + { + List result = new List(); + GetAllChildren.GetChildren(obj, ref result); + return result; + } + + // Token: 0x06003070 RID: 12400 RVA: 0x00104654 File Offset: 0x00104654 + public static void GetChildren(GameObject obj, ref List allChildren) + { + Transform componentInChildren = obj.GetComponentInChildren(); + if (componentInChildren.childCount == 0) + { + return; + } + IEnumerator enumerator = componentInChildren.GetEnumerator(); + try + { + while (enumerator.MoveNext()) + { + object obj2 = enumerator.Current; + Transform transform = (Transform)obj2; + allChildren.Add(transform.gameObject); + GetAllChildren.GetChildren(transform.gameObject, ref allChildren); + } + } + finally + { + IDisposable disposable; + if ((disposable = (enumerator as IDisposable)) != null) + { + disposable.Dispose(); + } + } + } + + // Token: 0x06003071 RID: 12401 RVA: 0x001046DC File Offset: 0x001046DC + public static void GetComponentsInChildren(Transform trans, List components) where T : class + { + for (int i = 0; i < trans.childCount; i++) + { + Transform child = trans.GetChild(i); + T component = child.GetComponent(); + if (component != null) + { + components.Add(component); + } + GetAllChildren.GetComponentsInChildren(child, components); + } + } + + // Token: 0x06003072 RID: 12402 RVA: 0x00104728 File Offset: 0x00104728 + public static void MapComponentsInChildren(Transform trans, Action func) where T : class + { + for (int i = 0; i < trans.childCount; i++) + { + Transform child = trans.GetChild(i); + T component = child.GetComponent(); + if (component != null) + { + func(component); + } + GetAllChildren.MapComponentsInChildren(child, func); + } + } + } +} diff --git a/Assets/FX/GetAllChildren.cs.meta b/Assets/FX/GetAllChildren.cs.meta new file mode 100644 index 0000000..0e6a782 --- /dev/null +++ b/Assets/FX/GetAllChildren.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: df165315ba5cd6045b3c556d54bbda3c +timeCreated: 1711856758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3.meta b/Assets/MU3.meta new file mode 100644 index 0000000..2ecaa7e --- /dev/null +++ b/Assets/MU3.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ac2b4d00623d1274aac5aaae9f512511 +folderAsset: yes +timeCreated: 1711000757 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/AutoPushToCache.meta b/Assets/MU3/AutoPushToCache.meta new file mode 100644 index 0000000..1d7a118 --- /dev/null +++ b/Assets/MU3/AutoPushToCache.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 48e7d2c1326acfd4e8dae447f6064cdb +folderAsset: yes +timeCreated: 1711856167 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/AutoPushToCache/AutoPushToCache.cs b/Assets/MU3/AutoPushToCache/AutoPushToCache.cs new file mode 100644 index 0000000..4c5a0c9 --- /dev/null +++ b/Assets/MU3/AutoPushToCache/AutoPushToCache.cs @@ -0,0 +1,42 @@ +using System; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x02000723 RID: 1827 + public class AutoPushToCache : MonoBehaviour + { + // Token: 0x06002F4A RID: 12106 RVA: 0x000FC540 File Offset: 0x000FC540 + private void OnEnable() + { + this.time_ = 0f; + } + + // Token: 0x06002F4B RID: 12107 RVA: 0x000FC550 File Offset: 0x000FC550 + private void Update() + { + this.time_ += Time.deltaTime; + if (this.duration_ <= this.time_) + { + if (this.objectCache_ == null) + { + UnityEngine.Object.Destroy(base.gameObject); + } + else + { + this.objectCache_.push(base.gameObject); + } + } + } + + // Token: 0x040054C9 RID: 21705 + [SerializeField] + private float duration_ = 2f; + + // Token: 0x040054CA RID: 21706 + public ObjectCache objectCache_; + + // Token: 0x040054CB RID: 21707 + private float time_; + } +} diff --git a/Assets/MU3/AutoPushToCache/AutoPushToCache.cs.meta b/Assets/MU3/AutoPushToCache/AutoPushToCache.cs.meta new file mode 100644 index 0000000..e273272 --- /dev/null +++ b/Assets/MU3/AutoPushToCache/AutoPushToCache.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b023086c91c525948890c2d90c8fa5b3 +timeCreated: 1711856167 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/AutoPushToCache/AutoPushToCacheParticle.cs b/Assets/MU3/AutoPushToCache/AutoPushToCacheParticle.cs new file mode 100644 index 0000000..e7cd664 --- /dev/null +++ b/Assets/MU3/AutoPushToCache/AutoPushToCacheParticle.cs @@ -0,0 +1,64 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x02000724 RID: 1828 + public class AutoPushToCacheParticle : MonoBehaviour + { + // Token: 0x06002F4D RID: 12109 RVA: 0x000FC5B4 File Offset: 0x000FC5B4 + private void OnEnable() + { + this.particleSystems_ = EffectListResource.popParticleSystems(); + base.GetComponentsInChildren(this.particleSystems_); + this.time_ = 0f; + } + + // Token: 0x06002F4E RID: 12110 RVA: 0x000FC5D8 File Offset: 0x000FC5D8 + private void OnDisable() + { + EffectListResource.pushParticleSystems(ref this.particleSystems_); + } + + // Token: 0x06002F4F RID: 12111 RVA: 0x000FC5E8 File Offset: 0x000FC5E8 + private void Update() + { + this.time_ += Time.deltaTime; + if (this.time_ < this.duration_) + { + return; + } + int num = 0; + for (int i = 0; i < this.particleSystems_.Count; i++) + { + num += this.particleSystems_[i].particleCount; + } + if (num <= 0) + { + if (this.objectCache_ == null) + { + UnityEngine.Object.Destroy(base.gameObject); + } + else + { + this.objectCache_.push(base.gameObject); + } + } + } + + // Token: 0x040054CC RID: 21708 + [Header("↓時間後に、パーティクル個数が0個になるとGameObjectを消滅させます")] + [SerializeField] + private float duration_; + + // Token: 0x040054CD RID: 21709 + public ObjectCache objectCache_; + + // Token: 0x040054CE RID: 21710 + private float time_; + + // Token: 0x040054CF RID: 21711 + private List particleSystems_; + } +} diff --git a/Assets/MU3/AutoPushToCache/AutoPushToCacheParticle.cs.meta b/Assets/MU3/AutoPushToCache/AutoPushToCacheParticle.cs.meta new file mode 100644 index 0000000..b406984 --- /dev/null +++ b/Assets/MU3/AutoPushToCache/AutoPushToCacheParticle.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 130b48fa93a69e849acfae542aa054bc +timeCreated: 1711856629 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/AutoPushToCache/AutoPushToCacheParticle_Off.cs b/Assets/MU3/AutoPushToCache/AutoPushToCacheParticle_Off.cs new file mode 100644 index 0000000..2c64588 --- /dev/null +++ b/Assets/MU3/AutoPushToCache/AutoPushToCacheParticle_Off.cs @@ -0,0 +1,92 @@ +using System; +using System.Collections.Generic; +using FX; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x02000725 RID: 1829 + public class AutoPushToCacheParticle_Off : MonoBehaviour + { + // Token: 0x06002F51 RID: 12113 RVA: 0x000FC688 File Offset: 0x000FC688 + private void OnEnable() + { + this.time_ = 0f; + this.particleSystems_ = EffectListResource.popParticleSystems(); + this.particleSystemsAutoDistroy_ = EffectListResource.popParticleSystems(); + base.GetComponentsInChildren(this.particleSystems_); + int num = this.particleSystems_.Count - 1; + while (0 <= num) + { + this.particleSystems_[num].Stop(true, ParticleSystemStopBehavior.StopEmitting); + FX_Destroy component = this.particleSystems_[num].GetComponent(); + if (null != component) + { + component.enabled = false; + this.particleSystems_[num].gameObject.SetActive(false); + this.particleSystemsAutoDistroy_.Add(this.particleSystems_[num]); + this.particleSystems_.RemoveAt(num); + } + num--; + } + } + + // Token: 0x06002F52 RID: 12114 RVA: 0x000FC754 File Offset: 0x000FC754 + private void OnDisable() + { + EffectListResource.pushParticleSystems(ref this.particleSystems_); + EffectListResource.pushParticleSystems(ref this.particleSystemsAutoDistroy_); + } + + // Token: 0x06002F53 RID: 12115 RVA: 0x000FC76C File Offset: 0x000FC76C + private void Update() + { + if (this.time_ < this.duration_) + { + this.time_ += Time.deltaTime; + return; + } + int num = 0; + for (int i = 0; i < this.particleSystems_.Count; i++) + { + num += this.particleSystems_[i].particleCount; + } + if (num <= 0) + { + if (this.objectCache_ == null) + { + UnityEngine.Object.Destroy(base.gameObject); + } + else + { + for (int j = 0; j < this.particleSystems_.Count; j++) + { + this.particleSystems_[j].Play(true); + } + for (int k = 0; k < this.particleSystemsAutoDistroy_.Count; k++) + { + this.particleSystemsAutoDistroy_[k].gameObject.SetActive(true); + } + base.enabled = false; + this.objectCache_.push(base.gameObject); + } + } + } + + // Token: 0x040054D0 RID: 21712 + [SerializeField] + private float duration_; + + // Token: 0x040054D1 RID: 21713 + public ObjectCache objectCache_; + + // Token: 0x040054D2 RID: 21714 + private float time_; + + // Token: 0x040054D3 RID: 21715 + private List particleSystems_; + + // Token: 0x040054D4 RID: 21716 + private List particleSystemsAutoDistroy_; + } +} diff --git a/Assets/MU3/AutoPushToCache/AutoPushToCacheParticle_Off.cs.meta b/Assets/MU3/AutoPushToCache/AutoPushToCacheParticle_Off.cs.meta new file mode 100644 index 0000000..33d81fb --- /dev/null +++ b/Assets/MU3/AutoPushToCache/AutoPushToCacheParticle_Off.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ae23c468cfb626c4b96db4b21dcecfab +timeCreated: 1711856629 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/CustomMath.cs b/Assets/MU3/CustomMath.cs new file mode 100644 index 0000000..cade5ee --- /dev/null +++ b/Assets/MU3/CustomMath.cs @@ -0,0 +1,81 @@ +using System; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x02000482 RID: 1154 + public static class CustomMath + { + // Token: 0x06001C1E RID: 7198 RVA: 0x000B4DB4 File Offset: 0x000B4DB4 + public static bool isZero(float x, float delta = 1E-05f) + { + return (x >= 0f) ? (x < delta) : (delta < x); + } + + // Token: 0x06001C1F RID: 7199 RVA: 0x000B4DD0 File Offset: 0x000B4DD0 + public static bool equals(float x0, float x1, float delta = 1E-05f) + { + return Mathf.Abs(x0 - x1) < delta; + } + + // Token: 0x06001C20 RID: 7200 RVA: 0x000B4DE0 File Offset: 0x000B4DE0 + public static bool equals2(Vector2 x0, Vector2 x1, float delta = 1E-05f) + { + return Mathf.Abs(x0.x - x1.x) < delta && Mathf.Abs(x0.y - x1.y) < delta; + } + + // Token: 0x06001C21 RID: 7201 RVA: 0x000B4E18 File Offset: 0x000B4E18 + public static bool equals3(Vector3 x0, Vector3 x1, float delta = 1E-05f) + { + return Mathf.Abs(x0.x - x1.x) < delta && Mathf.Abs(x0.y - x1.y) < delta && Mathf.Abs(x0.z - x1.z) < delta; + } + + // Token: 0x06001C22 RID: 7202 RVA: 0x000B4E74 File Offset: 0x000B4E74 + public static bool equals4(Vector4 x0, Vector4 x1, float delta = 1E-05f) + { + return Mathf.Abs(x0.x - x1.x) < delta && Mathf.Abs(x0.y - x1.y) < delta && Mathf.Abs(x0.z - x1.z) < delta && Mathf.Abs(x0.w - x1.w) < delta; + } + + // Token: 0x06001C23 RID: 7203 RVA: 0x000B4EEC File Offset: 0x000B4EEC + public static int floatToInt32(float value) + { + return (int)value; + } + + // Token: 0x06001C24 RID: 7204 RVA: 0x000B4EF4 File Offset: 0x000B4EF4 + public static float int32ToFloat(int value) + { + return (float)value; + } + + // Token: 0x06001C25 RID: 7205 RVA: 0x000B4EFC File Offset: 0x000B4EFC + public static float Abs(float x) + { + // return x & (float)int.MaxValue; + return (int)x & int.MaxValue; + } + + // Token: 0x06001C26 RID: 7206 RVA: 0x000B4F18 File Offset: 0x000B4F18 + public static Vector3 normalize(Vector3 v) + { + float num = Mathf.Sqrt(v.x * v.x + v.y * v.y + v.z * v.z); + if (num <= 1E-06f) + { + return Vector3.zero; + } + num = 1f / num; + return v * num; + } + + // Token: 0x06001C27 RID: 7207 RVA: 0x000B4F7C File Offset: 0x000B4F7C + public static Vector3 normalizeNoCheck(Vector3 v) + { + float num = Mathf.Sqrt(v.x * v.x + v.y * v.y + v.z * v.z); + num = 1f / num; + return v * num; + } + + // Token: 0x04004731 RID: 18225 + public const float float_delta_ = 1E-05f; + } +} diff --git a/Assets/MU3/CustomMath.cs.meta b/Assets/MU3/CustomMath.cs.meta new file mode 100644 index 0000000..04d889b --- /dev/null +++ b/Assets/MU3/CustomMath.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 38b70a0aab147884991c9cb19bd37e83 +timeCreated: 1711000758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/EffectListResource.cs b/Assets/MU3/EffectListResource.cs new file mode 100644 index 0000000..fec81a5 --- /dev/null +++ b/Assets/MU3/EffectListResource.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x0200072C RID: 1836 + public static class EffectListResource + { + // Token: 0x06002F78 RID: 12152 RVA: 0x000FD588 File Offset: 0x000FD588 + public static List popParticleSystems() + { + if (EffectListResource.particleSystemList_ == null) + { + EffectListResource.particleSystemList_ = new List>(8); + return new List(4); + } + if (EffectListResource.particleSystemList_.Count <= 0) + { + return new List(4); + } + int index = EffectListResource.particleSystemList_.Count - 1; + List result = EffectListResource.particleSystemList_[index]; + EffectListResource.particleSystemList_.RemoveAt(index); + return result; + } + + // Token: 0x06002F79 RID: 12153 RVA: 0x000FD5F0 File Offset: 0x000FD5F0 + public static void pushParticleSystems(ref List particleSystems) + { + if (particleSystems == null) + { + return; + } + particleSystems.Clear(); + if (EffectListResource.particleSystemList_ != null) + { + EffectListResource.particleSystemList_.Add(particleSystems); + } + } + + // Token: 0x06002F7A RID: 12154 RVA: 0x000FD618 File Offset: 0x000FD618 + public static void clear() + { + EffectListResource.particleSystemList_ = null; + } + + // Token: 0x040054F6 RID: 21750 + private static List> particleSystemList_; + } +} diff --git a/Assets/MU3/EffectListResource.cs.meta b/Assets/MU3/EffectListResource.cs.meta new file mode 100644 index 0000000..1daaeaf --- /dev/null +++ b/Assets/MU3/EffectListResource.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7374fae671b7f1c4d93fe2d79fc576c3 +timeCreated: 1711856946 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/MU3HairHighlight.cs b/Assets/MU3/MU3HairHighlight.cs new file mode 100644 index 0000000..9aea26c --- /dev/null +++ b/Assets/MU3/MU3HairHighlight.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using MU3.Sys; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x0200073D RID: 1853 + public class MU3HairHighlight : MonoBehaviour + { + // Token: 0x06002FDA RID: 12250 RVA: 0x00100440 File Offset: 0x00100440 + private void Start() + { + if (null == this.targetRenderer_) + { + List list = new List(16); + base.GetComponentsInChildren(true, list); + for (int i = 0; i < list.Count; i++) + { + Material[] materials = list[i].materials; + for (int j = 0; j < materials.Length; j++) + { + if ("MU3/ToonEdge/Hair" == materials[j].shader.name) + { + this.targetRenderer_ = list[i]; + this.targetMaterialIndex_ = j; + this.materials_ = materials; + i = list.Count; + break; + } + } + } + } + } + + // Token: 0x06002FDB RID: 12251 RVA: 0x001004EC File Offset: 0x001004EC + private static Transform findNode(Transform root, string name) + { + int childCount = root.childCount; + for (int i = 0; i < childCount; i++) + { + Transform child = root.GetChild(i); + if (name == child.name) + { + return child; + } + Transform transform = MU3HairHighlight.findNode(child, name); + if (null != transform) + { + return transform; + } + } + return null; + } + + // Token: 0x06002FDC RID: 12252 RVA: 0x00100544 File Offset: 0x00100544 + private void OnEnable() + { + if (null == this.targetNode_) + { + this.targetNode_ = MU3HairHighlight.findNode(base.transform, "head"); + } + } + + // Token: 0x06002FDD RID: 12253 RVA: 0x00100570 File Offset: 0x00100570 + private void Update() + { + if (null == this.targetNode_ || null == this.targetRenderer_) + { + return; + } + int shaderPropertyID_HightlightSphere = Const.ShaderPropertyID_HightlightSphere; + int shaderPropertyID_HightlightUp = Const.ShaderPropertyID_HightlightUp; + Vector3 vector = this.targetNode_.rotation * MU3HairHighlight.Rotation * Vector3.up; + Vector3 vector2 = this.targetNode_.transform.TransformPoint(MU3HairHighlight.Position); + this.materials_[this.targetMaterialIndex_].SetVector(shaderPropertyID_HightlightSphere, vector2); + this.materials_[this.targetMaterialIndex_].SetVector(shaderPropertyID_HightlightUp, vector); + } + + // Token: 0x04005562 RID: 21858 + public const float SpecularSphereSize = 0.2f; + + // Token: 0x04005563 RID: 21859 + public const string TargetShaderName = "MU3/ToonEdge/Hair"; + + // Token: 0x04005564 RID: 21860 + public const string HeadNullName = "head"; + + // Token: 0x04005565 RID: 21861 + private static readonly Vector3 Position = new Vector3(-0.2f, 0.053f, 0f); + + // Token: 0x04005566 RID: 21862 + private static readonly Quaternion Rotation = Quaternion.Euler(90f, 0f, 90f); + + // Token: 0x04005567 RID: 21863 + public Renderer targetRenderer_; + + // Token: 0x04005568 RID: 21864 + public int targetMaterialIndex_; + + // Token: 0x04005569 RID: 21865 + private Transform targetNode_; + + // Token: 0x0400556A RID: 21866 + private Material[] materials_; + } +} diff --git a/Assets/MU3/MU3HairHighlight.cs.meta b/Assets/MU3/MU3HairHighlight.cs.meta new file mode 100644 index 0000000..8f68c3f --- /dev/null +++ b/Assets/MU3/MU3HairHighlight.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6a6bd3aa3e3535d4381bc65e2eed8692 +timeCreated: 1711008081 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/MotionEffect.meta b/Assets/MU3/MotionEffect.meta new file mode 100644 index 0000000..0486a74 --- /dev/null +++ b/Assets/MU3/MotionEffect.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8b8c7285d778b8944a8bd85b3a8d0c08 +folderAsset: yes +timeCreated: 1711689062 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/MotionEffect/MotionEffectBase.cs b/Assets/MU3/MotionEffect/MotionEffectBase.cs new file mode 100644 index 0000000..746c1fe --- /dev/null +++ b/Assets/MU3/MotionEffect/MotionEffectBase.cs @@ -0,0 +1,27 @@ +using System; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x02000736 RID: 1846 + public abstract class MotionEffectBase + { + // Token: 0x06002F9D RID: 12189 + public abstract void start(); + + // Token: 0x06002F9E RID: 12190 + public abstract void stop(); + + // Token: 0x06002F9F RID: 12191 + public abstract bool isFinished(); + + // Token: 0x06002FA0 RID: 12192 + public abstract void destroy(); + + // Token: 0x06002FA1 RID: 12193 + public abstract void setPosition(Vector3 position); + + // Token: 0x06002FA2 RID: 12194 + public abstract void setRotation(Quaternion rotatoin); + } +} diff --git a/Assets/MU3/MotionEffect/MotionEffectBase.cs.meta b/Assets/MU3/MotionEffect/MotionEffectBase.cs.meta new file mode 100644 index 0000000..9058f9a --- /dev/null +++ b/Assets/MU3/MotionEffect/MotionEffectBase.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 72d84c4ba94536d4e9997f18e5c5fc85 +timeCreated: 1711689062 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/MotionEffect/MotionEffectDefine.cs b/Assets/MU3/MotionEffect/MotionEffectDefine.cs new file mode 100644 index 0000000..146df18 --- /dev/null +++ b/Assets/MU3/MotionEffect/MotionEffectDefine.cs @@ -0,0 +1,143 @@ +using System; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x02000735 RID: 1845 + [Serializable] + public class MotionEffectDefine + { + // Token: 0x170006FF RID: 1791 + // (get) Token: 0x06002F96 RID: 12182 RVA: 0x000FE2D8 File Offset: 0x000FE2D8 + // (set) Token: 0x06002F97 RID: 12183 RVA: 0x000FE2E0 File Offset: 0x000FE2E0 + public int nameHash { get; private set; } + + // Token: 0x06002F98 RID: 12184 RVA: 0x000FE2EC File Offset: 0x000FE2EC + public void copyFrom(MotionEffectDefine src) + { + this.name = src.name; + this.prefab = src.prefab; + this.transform = src.transform; + this.positionOffset = src.positionOffset; + this.rotationOffset = src.rotationOffset; + this.isFollow = src.isFollow; + this.isSetPosition = src.isSetPosition; + this.isSetRotation = src.isSetRotation; + this.isSingleton = src.isSingleton; + this.isSingletonName = src.isSingletonName; + this.minimumLife = src.minimumLife; + this.scaleTransform = src.scaleTransform; + this.scaleThreashold = src.scaleThreashold; + this.isDestoryByScale = src.isDestoryByScale; + this.nameHash = src.nameHash; + } + + // Token: 0x17000700 RID: 1792 + // (get) Token: 0x06002F99 RID: 12185 RVA: 0x000FE3B0 File Offset: 0x000FE3B0 + public Vector3 positionToFollow + { + get + { + if (this.transform == null) + { + return this.positionOffset; + } + return this.transform.TransformPoint(this.positionOffset); + } + } + + // Token: 0x17000701 RID: 1793 + // (get) Token: 0x06002F9A RID: 12186 RVA: 0x000FE3DC File Offset: 0x000FE3DC + public Quaternion rotationToFollow + { + get + { + if (this.transform == null) + { + return this._quaternionOffset; + } + return this.transform.rotation * this._quaternionOffset; + } + } + + // Token: 0x06002F9B RID: 12187 RVA: 0x000FE40C File Offset: 0x000FE40C + public void initialize() + { + this._quaternionOffset = Quaternion.Euler(this.rotationOffset); + this.nameHash = this.name.GetHashCode(); + } + + // Token: 0x04005522 RID: 21794 + [SerializeField] + [Tooltip("名前")] + public string name; + + // Token: 0x04005523 RID: 21795 + [Tooltip("プレハブ")] + [SerializeField] + public GameObject prefab; + + // Token: 0x04005524 RID: 21796 + [Tooltip("発生・追従位置")] + [SerializeField] + public Transform transform; + + // Token: 0x04005525 RID: 21797 + [Tooltip("位置オフセット")] + [SerializeField] + public Vector3 positionOffset; + + // Token: 0x04005526 RID: 21798 + [Tooltip("回転オフセット")] + [SerializeField] + public Vector3 rotationOffset; + + // Token: 0x04005527 RID: 21799 + [Tooltip("発生位置に追従するか")] + [SerializeField] + public bool isFollow; + + // Token: 0x04005528 RID: 21800 + [Tooltip("位置をセットするか")] + [SerializeField] + public bool isSetPosition; + + // Token: 0x04005529 RID: 21801 + [Tooltip("回転をセットするか")] + [SerializeField] + public bool isSetRotation; + + // Token: 0x0400552A RID: 21802 + [Tooltip("再生中の同じエフェクトがあった場合それをDestroyするか")] + [SerializeField] + public bool isSingleton; + + // Token: 0x0400552B RID: 21803 + [Tooltip("再生中の同じ名前のエフェクトがあった場合それをDestroyするか")] + [SerializeField] + public bool isSingletonName; + + // Token: 0x0400552C RID: 21804 + [Tooltip("再生が終了した場合のDestoryチェックを開始するまでの時間")] + [SerializeField] + public float minimumLife; + + // Token: 0x0400552D RID: 21805 + [Tooltip("スケールを参照するtransform")] + [SerializeField] + public Transform scaleTransform; + + // Token: 0x0400552E RID: 21806 + [Tooltip("スケールを参照してDestoryする場合の閾値")] + [SerializeField] + public float scaleThreashold; + + // Token: 0x0400552F RID: 21807 + [Tooltip("スケールが閾値を超えたらDestoryするか")] + [SerializeField] + public bool isDestoryByScale; + + // Token: 0x04005531 RID: 21809 + private Quaternion _quaternionOffset; + } +} diff --git a/Assets/MU3/MotionEffect/MotionEffectDefine.cs.meta b/Assets/MU3/MotionEffect/MotionEffectDefine.cs.meta new file mode 100644 index 0000000..81f0352 --- /dev/null +++ b/Assets/MU3/MotionEffect/MotionEffectDefine.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 884a7338242fdf846b141cc233750911 +timeCreated: 1711689062 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/MotionEffect/MotionEffectDefineList.cs b/Assets/MU3/MotionEffect/MotionEffectDefineList.cs new file mode 100644 index 0000000..f9385b1 --- /dev/null +++ b/Assets/MU3/MotionEffect/MotionEffectDefineList.cs @@ -0,0 +1,29 @@ +using System; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x0200073A RID: 1850 + [Serializable] + public class MotionEffectDefineList + { + // Token: 0x17000705 RID: 1797 + // (get) Token: 0x06002FC0 RID: 12224 RVA: 0x000FE894 File Offset: 0x000FE894 + // (set) Token: 0x06002FC1 RID: 12225 RVA: 0x000FE89C File Offset: 0x000FE89C + public MotionEffectDefine[] EffectDefines + { + get + { + return this._effectDefines; + } + set + { + this._effectDefines = value; + } + } + + // Token: 0x0400553E RID: 21822 + [SerializeField] + private MotionEffectDefine[] _effectDefines; + } +} diff --git a/Assets/MU3/MotionEffect/MotionEffectDefineList.cs.meta b/Assets/MU3/MotionEffect/MotionEffectDefineList.cs.meta new file mode 100644 index 0000000..fe5ff6a --- /dev/null +++ b/Assets/MU3/MotionEffect/MotionEffectDefineList.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3396d4e1c6ed0b24897a3d16cd8e3b54 +timeCreated: 1711689155 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/MotionEffect/MotionEffectInstance.cs b/Assets/MU3/MotionEffect/MotionEffectInstance.cs new file mode 100644 index 0000000..2515925 --- /dev/null +++ b/Assets/MU3/MotionEffect/MotionEffectInstance.cs @@ -0,0 +1,129 @@ +using System; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x02000739 RID: 1849 + public class MotionEffectInstance + { + // Token: 0x06002FB3 RID: 12211 RVA: 0x000FE618 File Offset: 0x000FE618 + public MotionEffectInstance(MotionEffectDefine effectDefine, MotionEffectBase effectInstance) + { + this.effectDefine = effectDefine; + this._effectInstance = effectInstance; + if (effectDefine.isSetPosition) + { + this._effectInstance.setPosition(effectDefine.positionToFollow); + } + if (effectDefine.isSetRotation) + { + this._effectInstance.setRotation(effectDefine.rotationToFollow); + } + } + + // Token: 0x06002FB4 RID: 12212 RVA: 0x000FE674 File Offset: 0x000FE674 + public static MotionEffectInstance create(MotionEffectDefine effectDefine) + { + MotionEffectInstance result = null; + GameObject gameObject = UnityEngine.Object.Instantiate(effectDefine.prefab); + if (gameObject != null) + { + ParticleSystem componentInChildren = gameObject.GetComponentInChildren(); + if (componentInChildren != null) + { + MotionEffectShuriken motionEffectShuriken = new MotionEffectShuriken(); + motionEffectShuriken.initialize(gameObject); + result = new MotionEffectInstance(effectDefine, motionEffectShuriken); + } + else + { + MotionEffectSimple motionEffectSimple = new MotionEffectSimple(); + motionEffectSimple.initialize(gameObject); + result = new MotionEffectInstance(effectDefine, motionEffectSimple); + } + } + return result; + } + + // Token: 0x06002FB5 RID: 12213 RVA: 0x000FE6E4 File Offset: 0x000FE6E4 + public void play() + { + this._effectInstance.start(); + this.isPlaying = true; + } + + // Token: 0x06002FB6 RID: 12214 RVA: 0x000FE6F8 File Offset: 0x000FE6F8 + public void stop() + { + this._effectInstance.stop(); + this.isPlaying = false; + } + + // Token: 0x06002FB7 RID: 12215 RVA: 0x000FE70C File Offset: 0x000FE70C + public void destroy() + { + this._effectInstance.destroy(); + this.isDestroyed = true; + this.isPlaying = false; + } + + // Token: 0x06002FB8 RID: 12216 RVA: 0x000FE728 File Offset: 0x000FE728 + public void execute() + { + this._duration += Time.deltaTime; + if (this.effectDefine.isFollow) + { + if (this.effectDefine.isSetPosition) + { + this._effectInstance.setPosition(this.effectDefine.positionToFollow); + } + if (this.effectDefine.isSetRotation) + { + this._effectInstance.setRotation(this.effectDefine.rotationToFollow); + } + } + if (this.isPlaying && this._duration > this.effectDefine.minimumLife && this._effectInstance.isFinished()) + { + this.destroy(); + } + else if (this.effectDefine.isDestoryByScale && this.effectDefine.scaleTransform != null) + { + if (this.effectDefine.scaleTransform.lossyScale.magnitude * 0.57735026f < this.effectDefine.scaleThreashold) + { + this._isOnceBelowScaleThreashold = true; + } + else if (this._isOnceBelowScaleThreashold) + { + this.destroy(); + } + } + } + + // Token: 0x17000702 RID: 1794 + // (get) Token: 0x06002FB9 RID: 12217 RVA: 0x000FE850 File Offset: 0x000FE850 + // (set) Token: 0x06002FBA RID: 12218 RVA: 0x000FE858 File Offset: 0x000FE858 + public MotionEffectDefine effectDefine { get; private set; } + + // Token: 0x17000703 RID: 1795 + // (get) Token: 0x06002FBB RID: 12219 RVA: 0x000FE864 File Offset: 0x000FE864 + // (set) Token: 0x06002FBC RID: 12220 RVA: 0x000FE86C File Offset: 0x000FE86C + public bool isPlaying { get; private set; } + + // Token: 0x17000704 RID: 1796 + // (get) Token: 0x06002FBD RID: 12221 RVA: 0x000FE878 File Offset: 0x000FE878 + // (set) Token: 0x06002FBE RID: 12222 RVA: 0x000FE880 File Offset: 0x000FE880 + public bool isDestroyed { get; private set; } + + // Token: 0x04005537 RID: 21815 + private const float ScaleCoeff = 0.57735026f; + + // Token: 0x0400553B RID: 21819 + private MotionEffectBase _effectInstance; + + // Token: 0x0400553C RID: 21820 + private float _duration; + + // Token: 0x0400553D RID: 21821 + private bool _isOnceBelowScaleThreashold; + } +} diff --git a/Assets/MU3/MotionEffect/MotionEffectInstance.cs.meta b/Assets/MU3/MotionEffect/MotionEffectInstance.cs.meta new file mode 100644 index 0000000..9e76731 --- /dev/null +++ b/Assets/MU3/MotionEffect/MotionEffectInstance.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 76b01a6d4d4ed864282d55b7663503ef +timeCreated: 1711689062 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/MotionEffect/MotionEffectManager.cs b/Assets/MU3/MotionEffect/MotionEffectManager.cs new file mode 100644 index 0000000..94e3999 --- /dev/null +++ b/Assets/MU3/MotionEffect/MotionEffectManager.cs @@ -0,0 +1,241 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x0200073B RID: 1851 + public class MotionEffectManager : MonoBehaviour + { + // Token: 0x06002FC3 RID: 12227 RVA: 0x000FE8E8 File Offset: 0x000FE8E8 + public void copyFrom(MotionEffectManager src) + { + this._effectDefines = new MotionEffectDefine[src._effectDefines.Length]; + for (int i = 0; i < src._effectDefines.Length; i++) + { + this._effectDefines[i] = new MotionEffectDefine(); + this._effectDefines[i].copyFrom(src._effectDefines[i]); + } + this._attachmentEffectDefinesList = new MotionEffectDefineList[src._attachmentEffectDefinesList.Length]; + for (int j = 0; j < src._attachmentEffectDefinesList.Length; j++) + { + MotionEffectDefine[] effectDefines = src._attachmentEffectDefinesList[j].EffectDefines; + for (int k = 0; k < effectDefines.Length; k++) + { + this._attachmentEffectDefinesList[j].EffectDefines[k] = new MotionEffectDefine(); + this._attachmentEffectDefinesList[j].EffectDefines[k].copyFrom(effectDefines[k]); + } + } + } + + // Token: 0x17000706 RID: 1798 + // (set) Token: 0x06002FC4 RID: 12228 RVA: 0x000FE9BC File Offset: 0x000FE9BC + public bool isAttached + { + set + { + this._isAttached = value; + } + } + + // Token: 0x17000707 RID: 1799 + // (set) Token: 0x06002FC5 RID: 12229 RVA: 0x000FE9C8 File Offset: 0x000FE9C8 + public int attachmentMotionIndex + { + set + { + this._attachmentMotionIndex = value; + } + } + + // Token: 0x06002FC6 RID: 12230 RVA: 0x000FE9D4 File Offset: 0x000FE9D4 + private void Start() + { + this.initialize(); + } + + // Token: 0x06002FC7 RID: 12231 RVA: 0x000FE9DC File Offset: 0x000FE9DC + private void LateUpdate() + { + this._removeInstanceNameList.Clear(); + foreach (KeyValuePair keyValuePair in this._effectInstanceDictionary) + { + keyValuePair.Value.execute(); + if (keyValuePair.Value.isDestroyed) + { + this._removeInstanceNameList.Add(keyValuePair.Key); + } + } + foreach (string key in this._removeInstanceNameList) + { + this._effectInstanceDictionary.Remove(key); + } + } + + // Token: 0x06002FC8 RID: 12232 RVA: 0x000FEABC File Offset: 0x000FEABC + private void TriggerEffect(string text) + { + if (text.StartsWith("Start")) + { + string name = text.Substring(this.CommandStartLength); + this.startEffect(name); + } + else if (text.StartsWith("End")) + { + string key = text.Substring(this.CommandEndLength); + MotionEffectInstance motionEffectInstance; + if (this._effectInstanceDictionary.TryGetValue(key, out motionEffectInstance)) + { + motionEffectInstance.stop(); + } + } + else if (text.StartsWith("Destroy")) + { + string key2 = text.Substring(this.CommandDestroyLength); + MotionEffectInstance motionEffectInstance2; + if (this._effectInstanceDictionary.TryGetValue(key2, out motionEffectInstance2)) + { + motionEffectInstance2.destroy(); + } + } + else + { + this.startEffect(text); + } + } + + // Token: 0x06002FC9 RID: 12233 RVA: 0x000FEB70 File Offset: 0x000FEB70 + private void initialize() + { + this._effectDefineDictionary = new Dictionary(); + MotionEffectDefine[] array; + if (!this._isAttached) + { + array = this._effectDefines; + } + else + { + MotionEffectDefine[] array2 = (this._attachmentEffectDefinesList.Length <= 0) ? null : this._attachmentEffectDefinesList[this._attachmentMotionIndex].EffectDefines; + if (array2 == null || array2.Length < 1) + { + array = this._effectDefines; + } + else + { + array = array2; + } + } + if (array == null) + { + array = new MotionEffectDefine[0]; + } + foreach (MotionEffectDefine motionEffectDefine in array) + { + motionEffectDefine.initialize(); + if (!string.IsNullOrEmpty(motionEffectDefine.name)) + { + this._effectDefineDictionary.Add(motionEffectDefine.name, motionEffectDefine); + } + } + this._effectInstanceDictionary = new Dictionary(); + this._removeInstanceNameList = new List(); + } + + // Token: 0x06002FCA RID: 12234 RVA: 0x000FEC54 File Offset: 0x000FEC54 + private MotionEffectInstance createEffect(MotionEffectDefine effectDefine) + { + MotionEffectInstance motionEffectInstance = MotionEffectInstance.create(effectDefine); + if (motionEffectInstance != null) + { + if (effectDefine.isSingleton) + { + foreach (KeyValuePair keyValuePair in this._effectInstanceDictionary) + { + if (keyValuePair.Value != null && keyValuePair.Value.effectDefine.isSingleton) + { + keyValuePair.Value.destroy(); + } + } + } + if (effectDefine.isSingletonName) + { + foreach (KeyValuePair keyValuePair2 in this._effectInstanceDictionary) + { + if (keyValuePair2.Value != null && keyValuePair2.Value.effectDefine.nameHash == effectDefine.nameHash) + { + keyValuePair2.Value.destroy(); + } + } + } + MotionEffectInstance value; + if (this._effectInstanceDictionary.TryGetValue(effectDefine.name, out value)) + { + this._effectInstanceDictionary.Remove(effectDefine.name); + string key = effectDefine.name + this._copyIndex.ToString("000"); + this._effectInstanceDictionary.Add(key, value); + this._copyIndex++; + } + this._effectInstanceDictionary.Add(effectDefine.name, motionEffectInstance); + } + return motionEffectInstance; + } + + // Token: 0x06002FCB RID: 12235 RVA: 0x000FEDEC File Offset: 0x000FEDEC + private void startEffect(string name) + { + MotionEffectDefine effectDefine; + if (this._effectDefineDictionary.TryGetValue(name, out effectDefine)) + { + MotionEffectInstance motionEffectInstance = this.createEffect(effectDefine); + if (motionEffectInstance != null) + { + motionEffectInstance.play(); + } + } + } + + // Token: 0x0400553F RID: 21823 + [SerializeField] + private MotionEffectDefine[] _effectDefines; + + // Token: 0x04005540 RID: 21824 + [SerializeField] + private MotionEffectDefineList[] _attachmentEffectDefinesList; + + // Token: 0x04005541 RID: 21825 + private const string CommandStart = "Start"; + + // Token: 0x04005542 RID: 21826 + private const string CommandEnd = "End"; + + // Token: 0x04005543 RID: 21827 + private const string CommandDestroy = "Destroy"; + + // Token: 0x04005544 RID: 21828 + private int CommandStartLength = "Start".Length; + + // Token: 0x04005545 RID: 21829 + private int CommandEndLength = "End".Length; + + // Token: 0x04005546 RID: 21830 + private int CommandDestroyLength = "Destroy".Length; + + // Token: 0x04005547 RID: 21831 + private Dictionary _effectDefineDictionary; + + // Token: 0x04005548 RID: 21832 + private Dictionary _effectInstanceDictionary; + + // Token: 0x04005549 RID: 21833 + private List _removeInstanceNameList; + + // Token: 0x0400554A RID: 21834 + private int _copyIndex; + + // Token: 0x0400554B RID: 21835 + private bool _isAttached; + + // Token: 0x0400554C RID: 21836 + private int _attachmentMotionIndex = -1; + } +} diff --git a/Assets/MU3/MotionEffect/MotionEffectManager.cs.meta b/Assets/MU3/MotionEffect/MotionEffectManager.cs.meta new file mode 100644 index 0000000..5d53dbd --- /dev/null +++ b/Assets/MU3/MotionEffect/MotionEffectManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e25b4fa2fa1b4874aa96dc46db858b68 +timeCreated: 1711689062 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/MotionEffect/MotionEffectShuriken.cs b/Assets/MU3/MotionEffect/MotionEffectShuriken.cs new file mode 100644 index 0000000..221afa7 --- /dev/null +++ b/Assets/MU3/MotionEffect/MotionEffectShuriken.cs @@ -0,0 +1,89 @@ +using System; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x02000737 RID: 1847 + public class MotionEffectShuriken : MotionEffectBase + { + // Token: 0x06002FA4 RID: 12196 RVA: 0x000FE440 File Offset: 0x000FE440 + public void initialize(GameObject gameObject) + { + this._gameObject = gameObject; + this._particleSystem = gameObject.GetComponentInChildren(); + this._isGameObjectValid = (this._gameObject != null); + } + + // Token: 0x06002FA5 RID: 12197 RVA: 0x000FE468 File Offset: 0x000FE468 + public override void destroy() + { + if (this._gameObject != null) + { + UnityEngine.Object.Destroy(this._gameObject); + } + } + + // Token: 0x06002FA6 RID: 12198 RVA: 0x000FE488 File Offset: 0x000FE488 + public override void start() + { + if (this._particleSystem != null) + { + this._particleSystem.Play(); + } + } + + // Token: 0x06002FA7 RID: 12199 RVA: 0x000FE4A8 File Offset: 0x000FE4A8 + public override void stop() + { + if (this._particleSystem != null) + { + this._particleSystem.Stop(); + } + } + + // Token: 0x06002FA8 RID: 12200 RVA: 0x000FE4C8 File Offset: 0x000FE4C8 + public override bool isFinished() + { + return !(this._particleSystem != null) || this._particleSystem.IsAlive(); + } + + // Token: 0x06002FA9 RID: 12201 RVA: 0x000FE4E8 File Offset: 0x000FE4E8 + public override void setPosition(Vector3 position) + { + if (!this._isGameObjectValid) + { + return; + } + if (this._gameObject == null) + { + this._isGameObjectValid = false; + return; + } + this._gameObject.transform.position = position; + } + + // Token: 0x06002FAA RID: 12202 RVA: 0x000FE520 File Offset: 0x000FE520 + public override void setRotation(Quaternion rotation) + { + if (!this._isGameObjectValid) + { + return; + } + if (this._gameObject == null) + { + this._isGameObjectValid = false; + return; + } + this._gameObject.transform.rotation = rotation; + } + + // Token: 0x04005532 RID: 21810 + private GameObject _gameObject; + + // Token: 0x04005533 RID: 21811 + private ParticleSystem _particleSystem; + + // Token: 0x04005534 RID: 21812 + private bool _isGameObjectValid; + } +} diff --git a/Assets/MU3/MotionEffect/MotionEffectShuriken.cs.meta b/Assets/MU3/MotionEffect/MotionEffectShuriken.cs.meta new file mode 100644 index 0000000..fac84f2 --- /dev/null +++ b/Assets/MU3/MotionEffect/MotionEffectShuriken.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 78e8c6d7fa7d75d4eb454f8624344e75 +timeCreated: 1711689062 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/MotionEffect/MotionEffectSimple.cs b/Assets/MU3/MotionEffect/MotionEffectSimple.cs new file mode 100644 index 0000000..99511b5 --- /dev/null +++ b/Assets/MU3/MotionEffect/MotionEffectSimple.cs @@ -0,0 +1,77 @@ +using System; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x02000738 RID: 1848 + public class MotionEffectSimple : MotionEffectBase + { + // Token: 0x06002FAC RID: 12204 RVA: 0x000FE560 File Offset: 0x000FE560 + public void initialize(GameObject gameObject) + { + this._gameObject = gameObject; + this._isGameObjectValid = (this._gameObject != null); + } + + // Token: 0x06002FAD RID: 12205 RVA: 0x000FE57C File Offset: 0x000FE57C + public override void destroy() + { + if (this._gameObject != null) + { + UnityEngine.Object.Destroy(this._gameObject); + } + } + + // Token: 0x06002FAE RID: 12206 RVA: 0x000FE59C File Offset: 0x000FE59C + public override void start() + { + } + + // Token: 0x06002FAF RID: 12207 RVA: 0x000FE5A0 File Offset: 0x000FE5A0 + public override void stop() + { + } + + // Token: 0x06002FB0 RID: 12208 RVA: 0x000FE5A4 File Offset: 0x000FE5A4 + public override bool isFinished() + { + return true; + } + + // Token: 0x06002FB1 RID: 12209 RVA: 0x000FE5A8 File Offset: 0x000FE5A8 + public override void setPosition(Vector3 position) + { + if (!this._isGameObjectValid) + { + return; + } + if (this._gameObject == null) + { + this._isGameObjectValid = false; + return; + } + this._gameObject.transform.position = position; + } + + // Token: 0x06002FB2 RID: 12210 RVA: 0x000FE5E0 File Offset: 0x000FE5E0 + public override void setRotation(Quaternion rotation) + { + if (!this._isGameObjectValid) + { + return; + } + if (this._gameObject == null) + { + this._isGameObjectValid = false; + return; + } + this._gameObject.transform.rotation = rotation; + } + + // Token: 0x04005535 RID: 21813 + private GameObject _gameObject; + + // Token: 0x04005536 RID: 21814 + private bool _isGameObjectValid; + } +} diff --git a/Assets/MU3/MotionEffect/MotionEffectSimple.cs.meta b/Assets/MU3/MotionEffect/MotionEffectSimple.cs.meta new file mode 100644 index 0000000..317366e --- /dev/null +++ b/Assets/MU3/MotionEffect/MotionEffectSimple.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6de120f3aca6196439b04ef85973ba3d +timeCreated: 1711689062 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/ObjectCache.cs b/Assets/MU3/ObjectCache.cs new file mode 100644 index 0000000..d7e5128 --- /dev/null +++ b/Assets/MU3/ObjectCache.cs @@ -0,0 +1,120 @@ +using System; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x020004C1 RID: 1217 + public class ObjectCache + { + // Token: 0x06001DF9 RID: 7673 RVA: 0x000BE4C0 File Offset: 0x000BE4C0 + public ObjectCache(Transform parent, GameObject prefab, int capacity = 8) + { + this.size_ = 0; + this.objects_ = new GameObject[capacity]; + this.parent_ = parent; + this.prefab_ = prefab; + } + + // Token: 0x1700034D RID: 845 + // (get) Token: 0x06001DFA RID: 7674 RVA: 0x000BE4EC File Offset: 0x000BE4EC + // (set) Token: 0x06001DFB RID: 7675 RVA: 0x000BE4F8 File Offset: 0x000BE4F8 + public int Capacity + { + get + { + return this.objects_.Length; + } + set + { + if (value <= this.objects_.Length) + { + return; + } + Array.Resize(ref this.objects_, value); + } + } + + // Token: 0x1700034E RID: 846 + // (get) Token: 0x06001DFC RID: 7676 RVA: 0x000BE518 File Offset: 0x000BE518 + public int Size + { + get + { + return this.size_; + } + } + + // Token: 0x06001DFD RID: 7677 RVA: 0x000BE520 File Offset: 0x000BE520 + public GameObject pop() + { + if (0 < this.size_) + { + this.size_--; + GameObject gameObject = this.objects_[this.size_]; + this.objects_[this.size_] = null; + gameObject.SetActive(true); + return gameObject; + } + return UnityEngine.Object.Instantiate(this.prefab_); + } + + // Token: 0x06001DFE RID: 7678 RVA: 0x000BE578 File Offset: 0x000BE578 + public bool tryPop(out GameObject obj, Vector3 position, Quaternion rotation, bool create = true) + { + if (0 < this.size_) + { + this.size_--; + obj = this.objects_[this.size_]; + this.objects_[this.size_] = null; + obj.transform.position = position; + obj.transform.localRotation = rotation; + obj.SetActive(true); + return true; + } + if (create) + { + obj = UnityEngine.Object.Instantiate(this.prefab_, position, rotation); + } + else + { + obj = null; + } + return false; + } + + // Token: 0x06001DFF RID: 7679 RVA: 0x000BE600 File Offset: 0x000BE600 + public void push(GameObject obj) + { + if (this.objects_.Length <= this.size_) + { + Array.Resize(ref this.objects_, this.objects_.Length << 1); + } + obj.transform.SetParent(this.parent_); + obj.SetActive(false); + this.objects_[this.size_] = obj; + this.size_++; + } + + // Token: 0x06001E00 RID: 7680 RVA: 0x000BE66C File Offset: 0x000BE66C + public void fillCapacity() + { + int num = this.Capacity - this.size_; + for (int i = 0; i < num; i++) + { + this.push(UnityEngine.Object.Instantiate(this.prefab_)); + } + } + + // Token: 0x04004868 RID: 18536 + protected int size_; + + // Token: 0x04004869 RID: 18537 + protected Transform parent_; + + // Token: 0x0400486A RID: 18538 + protected GameObject prefab_; + + // Token: 0x0400486B RID: 18539 + protected GameObject[] objects_; + } +} diff --git a/Assets/MU3/ObjectCache.cs.meta b/Assets/MU3/ObjectCache.cs.meta new file mode 100644 index 0000000..bbda146 --- /dev/null +++ b/Assets/MU3/ObjectCache.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1d863877f784fc541953e6becf0c68a4 +timeCreated: 1711856832 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/Plane.cs b/Assets/MU3/Plane.cs new file mode 100644 index 0000000..abf7836 --- /dev/null +++ b/Assets/MU3/Plane.cs @@ -0,0 +1,41 @@ +using System; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x020004E1 RID: 1249 + public struct Plane + { + // Token: 0x06001EE0 RID: 7904 RVA: 0x000C3234 File Offset: 0x000C3234 + public Plane(float nx, float ny, float nz, float d) + { + this.normal_ = new Vector3(nx, ny, nz); + this.d_ = d; + } + + // Token: 0x06001EE1 RID: 7905 RVA: 0x000C324C File Offset: 0x000C324C + public Plane(Vector3 point, Vector3 normal) + { + this.normal_ = normal; + this.d_ = -Vector3.Dot(point, normal); + } + + // Token: 0x06001EE2 RID: 7906 RVA: 0x000C3264 File Offset: 0x000C3264 + public float dot(float x, float y, float z) + { + return this.normal_.x * x + this.normal_.y * y + this.normal_.z * z + this.d_; + } + + // Token: 0x06001EE3 RID: 7907 RVA: 0x000C3298 File Offset: 0x000C3298 + public float dot(Vector3 p) + { + return this.normal_.x * p.x + this.normal_.y * p.y + this.normal_.z * p.z + this.d_; + } + + // Token: 0x040048F8 RID: 18680 + public Vector3 normal_; + + // Token: 0x040048F9 RID: 18681 + public float d_; + } +} diff --git a/Assets/MU3/Plane.cs.meta b/Assets/MU3/Plane.cs.meta new file mode 100644 index 0000000..5a37b4b --- /dev/null +++ b/Assets/MU3/Plane.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6047c960ed5a6524ab71a1d69cab6a73 +timeCreated: 1711000758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/SimpleKDTree.cs b/Assets/MU3/SimpleKDTree.cs new file mode 100644 index 0000000..515e4a2 --- /dev/null +++ b/Assets/MU3/SimpleKDTree.cs @@ -0,0 +1,97 @@ +using System; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x020004DF RID: 1247 + public struct SimpleKDTree + { + // Token: 0x06001ED0 RID: 7888 RVA: 0x000C2B88 File Offset: 0x000C2B88 + public void initialize(SwingJointColliderInformation[] information) + { + this.wholeInformation_ = information; + this.information_ = new SwingJointColliderInformation[this.wholeInformation_.Length << 1]; + } + + // Token: 0x06001ED1 RID: 7889 RVA: 0x000C2BA8 File Offset: 0x000C2BA8 + public void update(Transform trans) + { + Vector3 forward = trans.forward; + this.plane_ = new Plane(trans.position, forward); + this.numRight_ = 0; + this.numLeft_ = 0; + int num = this.wholeInformation_.Length; + for (int i = 0; i < this.wholeInformation_.Length; i++) + { + int sideOfPlane = this.wholeInformation_[i].getSideOfPlane(ref this.plane_); + if (sideOfPlane != 0) + { + if (sideOfPlane != 1) + { + if (sideOfPlane == 2) + { + this.information_[this.numRight_] = this.wholeInformation_[i]; + this.numRight_++; + } + } + } + else + { + this.information_[num] = this.wholeInformation_[i]; + this.numLeft_++; + num++; + } + } + } + + // Token: 0x06001ED2 RID: 7890 RVA: 0x000C2CA8 File Offset: 0x000C2CA8 + public SwingJointColliderInformation[] getCollideCandidates(out int start, out int end, Vector3 position, float radius) + { + float num = this.plane_.dot(position); + int num2; + if (0f <= num) + { + num2 = ((num > radius) ? 2 : 1); + } + else + { + num2 = ((-radius > num) ? 0 : 1); + } + if (num2 == 0) + { + start = this.wholeInformation_.Length; + end = start + this.numLeft_; + return this.information_; + } + if (num2 != 1) + { + start = 0; + end = this.numRight_; + return this.information_; + } + start = 0; + end = this.wholeInformation_.Length; + return this.wholeInformation_; + } + + // Token: 0x06001ED3 RID: 7891 RVA: 0x000C2D48 File Offset: 0x000C2D48 + public void onDrawGizmos() + { + } + + // Token: 0x040048E6 RID: 18662 + private Plane plane_; + + // Token: 0x040048E7 RID: 18663 + private int numRight_; + + // Token: 0x040048E8 RID: 18664 + private int numLeft_; + + // Token: 0x040048E9 RID: 18665 + private SwingJointColliderInformation[] wholeInformation_; + + // Token: 0x040048EA RID: 18666 + private SwingJointColliderInformation[] information_; + } +} diff --git a/Assets/MU3/SimpleKDTree.cs.meta b/Assets/MU3/SimpleKDTree.cs.meta new file mode 100644 index 0000000..ead023d --- /dev/null +++ b/Assets/MU3/SimpleKDTree.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dce1197f6eaab2640b20245f279f919e +timeCreated: 1711000758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/Swing.meta b/Assets/MU3/Swing.meta new file mode 100644 index 0000000..f32ffb3 --- /dev/null +++ b/Assets/MU3/Swing.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 70f31f788f7ef9040810cb9631a7aff3 +folderAsset: yes +timeCreated: 1711689062 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/Swing/SwingJoint.cs b/Assets/MU3/Swing/SwingJoint.cs new file mode 100644 index 0000000..4df03b2 --- /dev/null +++ b/Assets/MU3/Swing/SwingJoint.cs @@ -0,0 +1,195 @@ +using System; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x020004E0 RID: 1248 + [AddComponentMenu("MU3/SwingJoint/Node", 0)] + public class SwingJoint : MonoBehaviour + { + // Token: 0x17000370 RID: 880 + // (get) Token: 0x06001ED5 RID: 7893 RVA: 0x000C2DA8 File Offset: 0x000C2DA8 + // (set) Token: 0x06001ED6 RID: 7894 RVA: 0x000C2DB0 File Offset: 0x000C2DB0 + public Transform childNode + { + get + { + return this._childNode; + } + set + { + this._childNode = value; + } + } + + // Token: 0x06001ED7 RID: 7895 RVA: 0x000C2DBC File Offset: 0x000C2DBC + public void update() + { + Quaternion rotation = this._transform.rotation; + this._transform.localRotation = this._initialLocalRotation; + Vector3 position = this._transform.position; + Quaternion rotation2 = this._transform.rotation; + float x = this._childNode.lossyScale.x; + Vector3 vector = rotation2 * this._nodeAxis * this.childPullForce + this.staticForce; + vector *= x; + vector += (this._oldChildPos - this._nowChildPos) * this.inertialForce; + Vector3 vector2 = 2f * this._nowChildPos - this._oldChildPos + vector; + vector2 = this.calcNormalizedChildPosition(ref vector2, ref position, x); + float collisionRadius = this.collisionRadius; + int num; + int num2; + SwingJointColliderInformation[] collideCandidates = this._manager.getCollideCandidates(out num, out num2, vector2, collisionRadius); + for (int i = num; i < num2; i++) + { + if (collideCandidates[i].getCollisionPointWithSphere(ref vector2, ref vector2, collisionRadius)) + { + vector2 = this.calcNormalizedChildPosition(ref vector2, ref position, x); + } + } + Vector3 vector3 = this._transform.TransformDirection(this._nodeAxis); + Quaternion quaternion = Quaternion.FromToRotation(vector3, vector2 - position); + this._transform.rotation = Quaternion.Lerp(rotation, quaternion * rotation2, this._physicsRatio); + this._oldChildPos = this._nowChildPos; + this._nowChildPos = vector2; + } + + // Token: 0x17000371 RID: 881 + // (get) Token: 0x06001ED8 RID: 7896 RVA: 0x000C2F4C File Offset: 0x000C2F4C + private float collisionRadius + { + get + { + return ((!(this._manager != null) || !this._manager.overwriteRadius) ? this._collisionRadius : this._manager.collisionRadius) * base.transform.lossyScale.x; + } + } + + // Token: 0x17000372 RID: 882 + // (get) Token: 0x06001ED9 RID: 7897 RVA: 0x000C2FA4 File Offset: 0x000C2FA4 + private float childPullForce + { + get + { + return (!(this._manager != null) || !this._manager.overwriteDynamic) ? this._childPullForce : this._manager.childPullForce; + } + } + + // Token: 0x17000373 RID: 883 + // (get) Token: 0x06001EDA RID: 7898 RVA: 0x000C2FE0 File Offset: 0x000C2FE0 + private float inertialForce + { + get + { + return (!(this._manager != null) || !this._manager.overwriteDynamic) ? this._inertialForce : this._manager.inertialForce; + } + } + + // Token: 0x17000374 RID: 884 + // (get) Token: 0x06001EDB RID: 7899 RVA: 0x000C301C File Offset: 0x000C301C + private Vector3 staticForce + { + get + { + return (!(this._manager != null) || !this._manager.overwriteStatic) ? this._staticForce : this._manager.staticForce; + } + } + + // Token: 0x06001EDC RID: 7900 RVA: 0x000C3058 File Offset: 0x000C3058 + private void Awake() + { + this._transform = base.transform; + this._initialLocalRotation = this._transform.localRotation; + this._manager = this.findManager(); + if (this._childNode == null && this._transform.childCount > 0) + { + this._childNode = this._transform.GetChild(0); + } + } + + // Token: 0x06001EDD RID: 7901 RVA: 0x000C30C4 File Offset: 0x000C30C4 + private void Start() + { + if (null != this._childNode) + { + Vector3 localPosition = this._childNode.transform.localPosition; + this._nodeAxis = localPosition.normalized; + this._nodeLength = localPosition.magnitude; + this._nowChildPos = (this._oldChildPos = this._childNode.position); + } + if (null != this._manager) + { + if (this._manager.overwriteRadius) + { + this._collisionRadius = this._manager.collisionRadius; + } + if (this._manager.overwriteDynamic) + { + this._childPullForce = this._manager.childPullForce; + this._inertialForce = this._manager.inertialForce; + } + if (this._manager.overwriteStatic) + { + this._staticForce = this._manager.staticForce; + } + } + } + + // Token: 0x06001EDE RID: 7902 RVA: 0x000C31AC File Offset: 0x000C31AC + private SwingJointManager findManager() + { + SwingJointManager swingJointManager = null; + Transform transform = base.transform; + while (swingJointManager == null && transform != null) + { + swingJointManager = transform.GetComponent(); + transform = transform.parent; + } + return swingJointManager; + } + + // Token: 0x06001EDF RID: 7903 RVA: 0x000C31F0 File Offset: 0x000C31F0 + private Vector3 calcNormalizedChildPosition(ref Vector3 childPos, ref Vector3 position, float childLossyScale) + { + Vector3 vector = CustomMath.normalize(childPos - position); + return position + vector * this._nodeLength * childLossyScale; + } + + // Token: 0x040048EB RID: 18667 + public float _physicsRatio = 1f; + + // Token: 0x040048EC RID: 18668 + public float _collisionRadius = 0.05f; + + // Token: 0x040048ED RID: 18669 + public float _childPullForce = 0.01f; + + // Token: 0x040048EE RID: 18670 + public float _inertialForce = 0.4f; + + // Token: 0x040048EF RID: 18671 + public Vector3 _staticForce = new Vector3(0f, -0.0001f, 0f); + + // Token: 0x040048F0 RID: 18672 + private Transform _childNode; + + // Token: 0x040048F1 RID: 18673 + private Vector3 _nodeAxis; + + // Token: 0x040048F2 RID: 18674 + private float _nodeLength; + + // Token: 0x040048F3 RID: 18675 + private Quaternion _initialLocalRotation; + + // Token: 0x040048F4 RID: 18676 + private Vector3 _nowChildPos; + + // Token: 0x040048F5 RID: 18677 + private Vector3 _oldChildPos; + + // Token: 0x040048F6 RID: 18678 + private Transform _transform; + + // Token: 0x040048F7 RID: 18679 + private SwingJointManager _manager; + } +} diff --git a/Assets/MU3/Swing/SwingJoint.cs.meta b/Assets/MU3/Swing/SwingJoint.cs.meta new file mode 100644 index 0000000..8ec2f38 --- /dev/null +++ b/Assets/MU3/Swing/SwingJoint.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1db2ee54e959e39478e30236f3c5b635 +timeCreated: 1711689062 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/Swing/SwingJointCollider.cs b/Assets/MU3/Swing/SwingJointCollider.cs new file mode 100644 index 0000000..01acbb2 --- /dev/null +++ b/Assets/MU3/Swing/SwingJointCollider.cs @@ -0,0 +1,67 @@ +using System; +using System.Runtime.InteropServices; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x020004E3 RID: 1251 + public abstract class SwingJointCollider : MonoBehaviour + { + // Token: 0x06001EE7 RID: 7911 + public abstract void updateCache(ref SwingJointColliderInformation information); + } + + + + [StructLayout(LayoutKind.Sequential, Pack = 4)] + public struct SwingJointColliderInformation + { + // Token: 0x06001EE4 RID: 7908 RVA: 0x000C32E8 File Offset: 0x000C32E8 + public bool getCollisionPointWithSphere(ref Vector3 collision, ref Vector3 center, float radius) + { + Vector3 vector = center - this.position_; + float num = this.radius_ + radius; + float sqrMagnitude = vector.sqrMagnitude; + if (sqrMagnitude >= num * num) + { + return false; + } + if (1E-05f < sqrMagnitude) + { + vector *= num / Mathf.Sqrt(sqrMagnitude); + } + else + { + vector *= num; + } + collision = this.position_ + vector; + return true; + } + + // Token: 0x06001EE5 RID: 7909 RVA: 0x000C3360 File Offset: 0x000C3360 + public int getSideOfPlane(ref Plane palne) + { + float num = palne.dot(this.position_); + if (0f <= num) + { + return (num > this.radius_) ? 2 : 1; + } + return (-this.radius_ > num) ? 0 : 1; + } + + // Token: 0x040048FA RID: 18682 + public const int Side_Back = 0; + + // Token: 0x040048FB RID: 18683 + public const int Side_Cross = 1; + + // Token: 0x040048FC RID: 18684 + public const int Side_Front = 2; + + // Token: 0x040048FD RID: 18685 + public Vector3 position_; + + // Token: 0x040048FE RID: 18686 + public float radius_; + } +} diff --git a/Assets/MU3/Swing/SwingJointCollider.cs.meta b/Assets/MU3/Swing/SwingJointCollider.cs.meta new file mode 100644 index 0000000..ae0a546 --- /dev/null +++ b/Assets/MU3/Swing/SwingJointCollider.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3c0e02db6972b5649bbdf4234ca10c3f +timeCreated: 1711689062 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/Swing/SwingJointManager.cs b/Assets/MU3/Swing/SwingJointManager.cs new file mode 100644 index 0000000..a2f345b --- /dev/null +++ b/Assets/MU3/Swing/SwingJointManager.cs @@ -0,0 +1,195 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x020004E4 RID: 1252 + [AddComponentMenu("MU3/SwingJoint/Manager", 1)] + public class SwingJointManager : MonoBehaviour + { + // Token: 0x17000375 RID: 885 + // (get) Token: 0x06001EE9 RID: 7913 RVA: 0x000C3414 File Offset: 0x000C3414 + public SwingJointCollider[] colliders + { + get + { + return this._colliders; + } + } + + // Token: 0x17000376 RID: 886 + // (get) Token: 0x06001EEA RID: 7914 RVA: 0x000C341C File Offset: 0x000C341C + public bool overwriteRadius + { + get + { + return this._overwriteRadius; + } + } + + // Token: 0x17000377 RID: 887 + // (get) Token: 0x06001EEB RID: 7915 RVA: 0x000C3424 File Offset: 0x000C3424 + public float collisionRadius + { + get + { + return this._collisionRadius; + } + } + + // Token: 0x17000378 RID: 888 + // (get) Token: 0x06001EEC RID: 7916 RVA: 0x000C342C File Offset: 0x000C342C + public bool overwriteDynamic + { + get + { + return this._overwriteDynamic; + } + } + + // Token: 0x17000379 RID: 889 + // (get) Token: 0x06001EED RID: 7917 RVA: 0x000C3434 File Offset: 0x000C3434 + public float childPullForce + { + get + { + return this._childPullForce; + } + } + + // Token: 0x1700037A RID: 890 + // (get) Token: 0x06001EEE RID: 7918 RVA: 0x000C343C File Offset: 0x000C343C + public float inertialForce + { + get + { + return this._inertialForce; + } + } + + // Token: 0x1700037B RID: 891 + // (get) Token: 0x06001EEF RID: 7919 RVA: 0x000C3444 File Offset: 0x000C3444 + public bool overwriteStatic + { + get + { + return this._overwriteStatic; + } + } + + // Token: 0x1700037C RID: 892 + // (get) Token: 0x06001EF0 RID: 7920 RVA: 0x000C344C File Offset: 0x000C344C + public Vector3 staticForce + { + get + { + return this._staticForce; + } + } + + // Token: 0x06001EF1 RID: 7921 RVA: 0x000C3454 File Offset: 0x000C3454 + public SwingJointColliderInformation[] getCollideCandidates(out int start, out int end, Vector3 position, float radius) + { + return this._simpleKDTree.getCollideCandidates(out start, out end, position, radius); + } + + // Token: 0x06001EF2 RID: 7922 RVA: 0x000C3468 File Offset: 0x000C3468 + private void Awake() + { + Transform transform = base.transform; + List temporary = new List(4); + this.searchNode(transform, temporary); + this._colliders = transform.root.GetComponentsInChildren(); + this._colliderInformation = new SwingJointColliderInformation[this._colliders.Length]; + this._simpleKDTree.initialize(this._colliderInformation); + } + + // Token: 0x06001EF3 RID: 7923 RVA: 0x000C34C0 File Offset: 0x000C34C0 + private void OnEnable() + { + this._centerNode = null; + for (int i = 0; i < this._colliders.Length; i++) + { + if (this._colliders[i].gameObject.name.StartsWith("spine")) + { + this._centerNode = this._colliders[i].transform; + break; + } + } + if (null == this._centerNode) + { + this._centerNode = base.transform; + } + } + + // Token: 0x06001EF4 RID: 7924 RVA: 0x000C3544 File Offset: 0x000C3544 + private void LateUpdate() + { + for (int i = 0; i < this._colliders.Length; i++) + { + this._colliders[i].updateCache(ref this._colliderInformation[i]); + } + this._simpleKDTree.update(this._centerNode); + for (int j = 0; j < this._joints.Count; j++) + { + if (this._joints[j].gameObject.activeInHierarchy) + { + this._joints[j].update(); + } + } + } + + // Token: 0x06001EF5 RID: 7925 RVA: 0x000C35DC File Offset: 0x000C35DC + private void searchNode(Transform t, List temporary) + { + temporary.Clear(); + t.GetComponents(temporary); + this._joints.AddRange(temporary); + for (int i = 0; i < t.childCount; i++) + { + Transform child = t.GetChild(i); + if (child.gameObject.GetComponent() == null) + { + this.searchNode(child, temporary); + } + } + } + + // Token: 0x040048FF RID: 18687 + public bool _overwriteRadius; + + // Token: 0x04004900 RID: 18688 + public float _collisionRadius = 0.05f; + + // Token: 0x04004901 RID: 18689 + public bool _overwriteDynamic; + + // Token: 0x04004902 RID: 18690 + public float _childPullForce = 0.01f; + + // Token: 0x04004903 RID: 18691 + public float _inertialForce = 0.4f; + + // Token: 0x04004904 RID: 18692 + public bool _overwriteStatic; + + // Token: 0x04004905 RID: 18693 + public Vector3 _staticForce = new Vector3(0f, -0.0001f, 0f); + + // Token: 0x04004906 RID: 18694 + private List _joints = new List(); + + // Token: 0x04004907 RID: 18695 + private SwingJointCollider[] _colliders; + + // Token: 0x04004908 RID: 18696 + private SwingJointColliderInformation[] _colliderInformation; + + // Token: 0x04004909 RID: 18697 + private Transform _centerNode; + + // Token: 0x0400490A RID: 18698 + private SimpleKDTree _simpleKDTree; + } +} diff --git a/Assets/MU3/Swing/SwingJointManager.cs.meta b/Assets/MU3/Swing/SwingJointManager.cs.meta new file mode 100644 index 0000000..c96a0a6 --- /dev/null +++ b/Assets/MU3/Swing/SwingJointManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 098c7b9a0b646164aa91091111b480ff +timeCreated: 1711689062 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/Swing/SwingJointSphereCollider.cs b/Assets/MU3/Swing/SwingJointSphereCollider.cs new file mode 100644 index 0000000..7d5aba1 --- /dev/null +++ b/Assets/MU3/Swing/SwingJointSphereCollider.cs @@ -0,0 +1,29 @@ +using System; +using UnityEngine; + +namespace MU3 +{ + // Token: 0x020004E5 RID: 1253 + [AddComponentMenu("MU3/SwingJoint/SphereCollider", 2)] + public class SwingJointSphereCollider : SwingJointCollider + { + // Token: 0x06001EF9 RID: 7929 RVA: 0x000C3680 File Offset: 0x000C3680 + public override void updateCache(ref SwingJointColliderInformation information) + { + information.position_ = this._cachedTransform.position; + information.radius_ = this._radius * this._cachedTransform.lossyScale.x; + } + + // Token: 0x06001EFA RID: 7930 RVA: 0x000C36C0 File Offset: 0x000C36C0 + private void Awake() + { + this._cachedTransform = base.transform; + } + + // Token: 0x0400490D RID: 18701 + public float _radius = 0.5f; + + // Token: 0x0400490E RID: 18702 + private Transform _cachedTransform; + } +} diff --git a/Assets/MU3/Swing/SwingJointSphereCollider.cs.meta b/Assets/MU3/Swing/SwingJointSphereCollider.cs.meta new file mode 100644 index 0000000..d39ff3b --- /dev/null +++ b/Assets/MU3/Swing/SwingJointSphereCollider.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a2c64765f577bd747a8c62cbb4381ac5 +timeCreated: 1711864636 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/Sys.meta b/Assets/MU3/Sys.meta new file mode 100644 index 0000000..d031178 --- /dev/null +++ b/Assets/MU3/Sys.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 585ff4ad6cbd8fa48aa655ffd02b340c +folderAsset: yes +timeCreated: 1711008210 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MU3/Sys/Const.cs b/Assets/MU3/Sys/Const.cs new file mode 100644 index 0000000..5e97386 --- /dev/null +++ b/Assets/MU3/Sys/Const.cs @@ -0,0 +1,402 @@ +using System; +using UnityEngine; + +namespace MU3.Sys +{ + // Token: 0x02000C2B RID: 3115 + public static class Const + { + // Token: 0x04008384 RID: 33668 + public const float ScreenWidth = 1080f; + + // Token: 0x04008385 RID: 33669 + public const float ScreenHeight = 1920f; + + // Token: 0x04008386 RID: 33670 + public static readonly Vector2 ScreenSize = new Vector2(1080f, 1920f); + + // Token: 0x04008387 RID: 33671 + public const long GuestUserIDBase = 281474976710657L; + + // Token: 0x04008388 RID: 33672 + public const uint GameID = 5522500U; + + // Token: 0x04008389 RID: 33673 + public const int ErrorNo_CodeReader_NotFound = 3100; + + // Token: 0x0400838A RID: 33674 + public const int ErrorNo_CodeReader_InitializeFailed = 3101; + + // Token: 0x0400838B RID: 33675 + public const int ErrorNo_GroupRole_DuplicateParent = 3201; + + // Token: 0x0400838C RID: 33676 + public const int ErrorNo_InvalidLeverRange = 3301; + + // Token: 0x0400838D RID: 33677 + public const int MaxCardRequestCount = 50; + + // Token: 0x0400838E RID: 33678 + public const int MaxCharacterRequestCount = 50; + + // Token: 0x0400838F RID: 33679 + public const int MaxMusicRequestCount = 50; + + // Token: 0x04008390 RID: 33680 + public const int MaxItemRequestCount = 100; + + // Token: 0x04008391 RID: 33681 + public const int Login_Error = -1; + + // Token: 0x04008392 RID: 33682 + public const int Login_None = 0; + + // Token: 0x04008393 RID: 33683 + public const int Login_Success = 1; + + // Token: 0x04008394 RID: 33684 + public const int Layer_Default = 0; + + // Token: 0x04008395 RID: 33685 + public const int Layer_UI = 5; + + // Token: 0x04008396 RID: 33686 + public const int Layer_Player = 8; + + // Token: 0x04008397 RID: 33687 + public const int Layer_Ally = 8; + + // Token: 0x04008398 RID: 33688 + public const int Layer_Enemy = 11; + + // Token: 0x04008399 RID: 33689 + public const int Layer_UI_System = 16; + + // Token: 0x0400839A RID: 33690 + public const int Layer_BackgroundMerge = 27; + + // Token: 0x0400839B RID: 33691 + public const int Layer_FX_3DCharaMask = 28; + + // Token: 0x0400839C RID: 33692 + public const int Layer_FX_Gate = 29; + + // Token: 0x0400839D RID: 33693 + public const int Layer_FX_BackGround = 30; + + // Token: 0x0400839E RID: 33694 + public const int Layer_BackGround = 31; + + // Token: 0x0400839F RID: 33695 + public const int MinDeckCount = 5; + + // Token: 0x040083A0 RID: 33696 + public const int MaxDeckCount = 10; + + // Token: 0x040083A1 RID: 33697 + public const string PreloadShaders = "preloadshaders"; + + // Token: 0x040083A2 RID: 33698 + public const string BackgroundName = "Background"; + + // Token: 0x040083A3 RID: 33699 + public const string TestString_Good = "GOOD"; + + // Token: 0x040083A4 RID: 33700 + public const string TestString_Bad = "BAD"; + + // Token: 0x040083A5 RID: 33701 + public const string TestString_Check = "CHECK"; + + // Token: 0x040083A6 RID: 33702 + public const string TestString_NA = "N/A"; + + // Token: 0x040083A7 RID: 33703 + public static readonly int ShaderPropertyID_MainTex = Shader.PropertyToID("_MainTex"); + + // Token: 0x040083A8 RID: 33704 + public static readonly int ShaderPropertyID_BloomTex = Shader.PropertyToID("_BloomTex"); + + // Token: 0x040083A9 RID: 33705 + public static readonly int ShaderPropertyID_DecalTex = Shader.PropertyToID("_DecalTex"); + + // Token: 0x040083AA RID: 33706 + public static readonly int ShaderPropertyID_ShadowColor = Shader.PropertyToID("_ShadowColor"); + + // Token: 0x040083AB RID: 33707 + public static readonly int ShaderPropertyID_HightlightSphere = Shader.PropertyToID("_HighlightSphere"); + + // Token: 0x040083AC RID: 33708 + public static readonly int ShaderPropertyID_HightlightUp = Shader.PropertyToID("_HighlightUp"); + + // Token: 0x040083AD RID: 33709 + public static readonly int ShaderPropertyID_ModifiedColor = Shader.PropertyToID("_ModifiedColor"); + + // Token: 0x040083AE RID: 33710 + public static readonly int ShaderPropertyID_ModifiedBrightness = Shader.PropertyToID("_Brightness"); + + // Token: 0x040083AF RID: 33711 + public static readonly int ShaderPropertyID_ModifiedBlendRate = Shader.PropertyToID("_BlendRate"); + + // Token: 0x040083B0 RID: 33712 + public static readonly int ShaderPropertyID_ColorAdd = Shader.PropertyToID("_ColorAdd"); + + // Token: 0x040083B1 RID: 33713 + public static readonly int ShaderPropertyID_OutlineColorAdd = Shader.PropertyToID("_EdgeColorAdd"); + + // Token: 0x040083B2 RID: 33714 + public static readonly int ShaderPropertyID_OutlineColor = Shader.PropertyToID("_EdgeColor"); + + // Token: 0x040083B3 RID: 33715 + public static readonly int AnimatorID_Idle = Animator.StringToHash("Idle"); + + // Token: 0x040083B4 RID: 33716 + public static readonly int AnimatorID_idle = Animator.StringToHash("idle"); + + // Token: 0x040083B5 RID: 33717 + public static readonly int AnimatorID_AttackA = Animator.StringToHash("Attack_A"); + + // Token: 0x040083B6 RID: 33718 + public static readonly int AnimatorID_AttackA002 = Animator.StringToHash("Attack_A_002"); + + // Token: 0x040083B7 RID: 33719 + public static readonly int AnimatorID_AttackA003 = Animator.StringToHash("Attack_A_003"); + + // Token: 0x040083B8 RID: 33720 + public static readonly int AnimatorID_AttackA004 = Animator.StringToHash("Attack_A_004"); + + // Token: 0x040083B9 RID: 33721 + public static readonly int AnimatorID_AttackB = Animator.StringToHash("Attack_B"); + + // Token: 0x040083BA RID: 33722 + public static readonly int AnimatorID_Damage = Animator.StringToHash("Damage"); + + // Token: 0x040083BB RID: 33723 + public static readonly int AnimatorID_Dead = Animator.StringToHash("Dead"); + + // Token: 0x040083BC RID: 33724 + public static readonly int AnimatorID_Overkill = Animator.StringToHash("Overkill"); + + // Token: 0x040083BD RID: 33725 + public static readonly int AnimatorID_Turn = Animator.StringToHash("Turn"); + + // Token: 0x040083BE RID: 33726 + public static readonly int AnimatorID_OverkillRatio = Animator.StringToHash("Overkill_ratio"); + + // Token: 0x040083BF RID: 33727 + public static readonly int AnimatorID_BattleStart = Animator.StringToHash("BattleStart"); + + // Token: 0x040083C0 RID: 33728 + public static readonly int AnimatorID_BattleStartBoss = Animator.StringToHash("BattleStartBoss"); + + // Token: 0x040083C1 RID: 33729 + public static readonly int AnimatorID_BattleStartPlayer = Animator.StringToHash("BattleStartPlayer"); + + // Token: 0x040083C2 RID: 33730 + public static readonly int AnimatorID_BattleResult = Animator.StringToHash("BattleResult"); + + // Token: 0x040083C3 RID: 33731 + public static readonly int AnimatorID_BattleFinish1st = Animator.StringToHash("BattleFinish1st"); + + // Token: 0x040083C4 RID: 33732 + public static readonly int AnimatorID_BattleFinish2nd = Animator.StringToHash("BattleFinish2nd"); + + // Token: 0x040083C5 RID: 33733 + public static readonly int AnimatorID_EventStep = Animator.StringToHash("EventStep"); + + // Token: 0x040083C6 RID: 33734 + public static readonly int AnimatorID_Position = Animator.StringToHash("Position"); + + // Token: 0x040083C7 RID: 33735 + public static readonly int AnimatorID_Holding = Animator.StringToHash("Holding"); + + // Token: 0x040083C8 RID: 33736 + public static readonly int AnimatorID_DamageControl = Animator.StringToHash("Damage_Scale"); + + // Token: 0x040083C9 RID: 33737 + public static readonly int AnimatorID_PlayStart = Animator.StringToHash("PlayStart"); + + // Token: 0x040083CA RID: 33738 + public static readonly int AnimatorID_PlayFinish = Animator.StringToHash("PlayFinish"); + + // Token: 0x040083CB RID: 33739 + public static readonly int AnimatorID_RoomAwake = Animator.StringToHash("RoomAwake"); + + // Token: 0x040083CC RID: 33740 + public static readonly int AnimatorID_RoomPresent = Animator.StringToHash("RoomPresent"); + + // Token: 0x040083CD RID: 33741 + public static readonly int AnimatorID_RoomFavorite = Animator.StringToHash("RoomFavorite"); + + // Token: 0x040083CE RID: 33742 + public static readonly int AnimatorID_RoomJoy = Animator.StringToHash("RoomJoy"); + + // Token: 0x040083CF RID: 33743 + public static readonly int AnimatorID_RoomFaint = Animator.StringToHash("RoomFaint"); + + // Token: 0x040083D0 RID: 33744 + public static readonly int AnimatorID_OnFocus = Animator.StringToHash("OnFocus"); + + // Token: 0x040083D1 RID: 33745 + public static readonly int AnimatorID_Decided = Animator.StringToHash("Decided"); + + // Token: 0x040083D2 RID: 33746 + public static readonly int AnimatorID_PressAction = Animator.StringToHash("PressAction"); + + // Token: 0x040083D3 RID: 33747 + public static readonly int AnimatorID_State = Animator.StringToHash("State"); + + // Token: 0x040083D4 RID: 33748 + public static readonly int AnimatorID_StrongState = Animator.StringToHash("StrongState"); + + // Token: 0x040083D5 RID: 33749 + public static readonly int AnimatorID_Kind = Animator.StringToHash("Kind"); + + // Token: 0x040083D6 RID: 33750 + public static readonly int AnimatorID_Mode = Animator.StringToHash("Mode"); + + // Token: 0x040083D7 RID: 33751 + public static readonly int AnimatorID_Skip = Animator.StringToHash("Skip"); + + // Token: 0x040083D8 RID: 33752 + public static readonly int AnimatorID_Start = Animator.StringToHash("Start"); + + // Token: 0x040083D9 RID: 33753 + public static readonly int AnimatorID_Stop = Animator.StringToHash("Stop"); + + // Token: 0x040083DA RID: 33754 + public static readonly int AnimatorID_In = Animator.StringToHash("In"); + + // Token: 0x040083DB RID: 33755 + public static readonly int AnimatorID_Out = Animator.StringToHash("Out"); + + // Token: 0x040083DC RID: 33756 + public static readonly int AnimatorID_Next = Animator.StringToHash("Next"); + + // Token: 0x040083DD RID: 33757 + public static readonly int AnimatorID_Loop = Animator.StringToHash("Loop"); + + // Token: 0x040083DE RID: 33758 + public static readonly int AnimatorID_Lock = Animator.StringToHash("Lock"); + + // Token: 0x040083DF RID: 33759 + public static readonly int AnimatorID_Blank = Animator.StringToHash("Blank"); + + // Token: 0x040083E0 RID: 33760 + public static readonly int AnimatorID_Active = Animator.StringToHash("Active"); + + // Token: 0x040083E1 RID: 33761 + public static readonly int AnimatorID_Enable = Animator.StringToHash("Enable"); + + // Token: 0x040083E2 RID: 33762 + public static readonly int AnimatorID_Disable = Animator.StringToHash("Disable"); + + // Token: 0x040083E3 RID: 33763 + public static readonly int AnimatorID_Limit = Animator.StringToHash("Limit"); + + // Token: 0x040083E4 RID: 33764 + public static readonly int AnimatorID_New = Animator.StringToHash("New"); + + // Token: 0x040083E5 RID: 33765 + public static readonly int AnimatorID_Beginner = Animator.StringToHash("Beginner"); + + // Token: 0x040083E6 RID: 33766 + public static readonly int AnimatorID_Intermediate = Animator.StringToHash("Intermediate"); + + // Token: 0x040083E7 RID: 33767 + public static readonly int AnimatorID_Senior = Animator.StringToHash("Senior"); + + // Token: 0x040083E8 RID: 33768 + public static readonly int AnimatorID_Custom = Animator.StringToHash("Custom"); + + // Token: 0x040083E9 RID: 33769 + public static readonly int AnimatorID_Credit0 = Animator.StringToHash("Credit0"); + + // Token: 0x040083EA RID: 33770 + public static readonly int AnimatorID_Credit1 = Animator.StringToHash("Credit1"); + + // Token: 0x040083EB RID: 33771 + public static readonly int AnimatorID_Credit2 = Animator.StringToHash("Credit2"); + + // Token: 0x040083EC RID: 33772 + public static readonly int AnimatorID_Credit3 = Animator.StringToHash("Credit3"); + + // Token: 0x040083ED RID: 33773 + public static readonly int AnimatorID_Push = Animator.StringToHash("Push"); + + // Token: 0x040083EE RID: 33774 + public static readonly int AnimatorID_Reset = Animator.StringToHash("Reset"); + + // Token: 0x040083EF RID: 33775 + public static readonly int AnimatorID_SelectedLoop = Animator.StringToHash("Selected_Loop"); + + // Token: 0x040083F0 RID: 33776 + public static readonly int AnimatorID_WindowLoop = Animator.StringToHash("window_loop"); + + // Token: 0x040083F1 RID: 33777 + public static readonly int AnimatorID_WindowOut = Animator.StringToHash("window_out"); + + // Token: 0x040083F2 RID: 33778 + public static readonly int AnimatorID_MoveRight = Animator.StringToHash("MoveRight"); + + // Token: 0x040083F3 RID: 33779 + public static readonly int AnimatorID_MoveLeft = Animator.StringToHash("MoveLeft"); + + // Token: 0x040083F4 RID: 33780 + public static readonly int AnimatorID_Danger = Animator.StringToHash("Danger"); + + // Token: 0x040083F5 RID: 33781 + public static readonly int AnimatorID_Cursor = Animator.StringToHash("Cursor"); + + // Token: 0x040083F6 RID: 33782 + public static readonly int AnimatorID_ExpUp = Animator.StringToHash("ExpUp"); + + // Token: 0x040083F7 RID: 33783 + public static readonly int AnimatorID_StartNumOff = Animator.StringToHash("Start_NumOff"); + + // Token: 0x040083F8 RID: 33784 + public static readonly int AnimatorID_MoveInEventInfo = Animator.StringToHash("MoveInEventInfo"); + + // Token: 0x040083F9 RID: 33785 + public static readonly int AnimatorID_LevelUp = Animator.StringToHash("LevelUp"); + + // Token: 0x040083FA RID: 33786 + public static readonly int AnimatorID_Transition_loop = Animator.StringToHash("Transition_loop"); + + // Token: 0x040083FB RID: 33787 + public static readonly int AnimatorID_VS_loop = Animator.StringToHash("VS_loop"); + + // Token: 0x040083FC RID: 33788 + public static readonly int AnimatorID_Shake = Animator.StringToHash("Shake"); + + // Token: 0x040083FD RID: 33789 + public static readonly int AnimatorID_Boost = Animator.StringToHash("Boost"); + + // Token: 0x040083FE RID: 33790 + public static readonly int AnimatorID_MainReward = Animator.StringToHash("MainReward"); + + // Token: 0x040083FF RID: 33791 + public static readonly int AnimatorID_VoiceNo = Animator.StringToHash("VoiceNo"); + + // Token: 0x04008400 RID: 33792 + public static readonly int AnimatorID_NoActive = Animator.StringToHash("NoActive"); + + // Token: 0x04008401 RID: 33793 + public static readonly int AnimatorID_Goal = Animator.StringToHash("Goal"); + + // Token: 0x04008402 RID: 33794 + public static readonly int AnimatorID_Clear = Animator.StringToHash("Clear"); + + // Token: 0x04008403 RID: 33795 + public static readonly int AnimatorID_NoCardLoop = Animator.StringToHash("noCard_loop"); + + // Token: 0x04008404 RID: 33796 + public static readonly int AnimatorID_CardIn = Animator.StringToHash("Card_in"); + + // Token: 0x04008405 RID: 33797 + public static readonly int AnimatorID_CardOut = Animator.StringToHash("Card_out"); + + // Token: 0x04008406 RID: 33798 + public static readonly int AnimatorID_CardLoop = Animator.StringToHash("Card_loop"); + } +} diff --git a/Assets/MU3/Sys/Const.cs.meta b/Assets/MU3/Sys/Const.cs.meta new file mode 100644 index 0000000..0ff1769 --- /dev/null +++ b/Assets/MU3/Sys/Const.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 84e13e7768530084c944eafdb00954a7 +timeCreated: 1711008210 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes.meta b/Assets/Scenes.meta new file mode 100644 index 0000000..0c607c0 --- /dev/null +++ b/Assets/Scenes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6bee6d8de1ba44c4d91d45d3f901792c +folderAsset: yes +timeCreated: 1711000757 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Main.cs b/Assets/Scenes/Main.cs new file mode 100644 index 0000000..ee1d416 --- /dev/null +++ b/Assets/Scenes/Main.cs @@ -0,0 +1,166 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using MU3.Sys; +using System.IO; +using System; + +public class Main : MonoBehaviour +{ + private GameObject model; + private GameObject weapon; + private List modelList = new List(); + private int idx = 15; + private int count = 1; + private string basePath = "F:/Ongeki_Unity/ab/"; + private string[] textureSuffixes = { "_body_no", "_body_sp", "_body_di", "_body_bl", + "_face_di", "_head_no", "_head_sp" }; + + // Start is called before the first frame update + void Start() + { + AssetBundle.LoadFromFile(basePath + "preloadshaders"); + + DirectoryInfo TheFolder = new DirectoryInfo(basePath); + foreach (FileInfo NextFile in TheFolder.GetFiles()) + { + // Debug.Log(NextFile.Name); + bool flag = false; + if (NextFile.Name == "preloadshaders") + { + flag = true; + } + if (!NextFile.Name.StartsWith("ch_", StringComparison.OrdinalIgnoreCase)) + { + flag = true; + } + foreach (string suffix in textureSuffixes) + { + if (NextFile.Name.EndsWith(suffix, StringComparison.OrdinalIgnoreCase)) + { + flag = true; + } + } + if (!flag) modelList.Add(NextFile.Name); + } + count = modelList.Count; + + loadModel(modelList[idx % count]); + + + } + + void loadModel(string modelName) + { + List abs = new List(); + + if (modelName == "ch_001008") + { + abs.Add(AssetBundle.LoadFromFile(basePath + "we_001008_bl")); + abs.Add(AssetBundle.LoadFromFile(basePath + "we_001008_di")); + abs.Add(AssetBundle.LoadFromFile(basePath + "we_001008_no")); + abs.Add(AssetBundle.LoadFromFile(basePath + "we_001008_sp")); + } + if (modelName == "ch_001008_201") + { + abs.Add(AssetBundle.LoadFromFile(basePath + "we_001008_201_bl")); + abs.Add(AssetBundle.LoadFromFile(basePath + "we_001008_201_di")); + } + if (modelName == "ch_001008_202") + { + abs.Add(AssetBundle.LoadFromFile(basePath + "we_001008_202_bl")); + abs.Add(AssetBundle.LoadFromFile(basePath + "we_001008_202_di")); + } + + AssetBundle.LoadFromFile(basePath + "000000/ch_000000_101_body_no"); + AssetBundle.LoadFromFile(basePath + "000000/ch_000000_101_body_sp"); + + foreach (string suffix in textureSuffixes) + { + string texturePath = basePath + modelName.Substring(0, 9) + suffix; + if (File.Exists(texturePath)) + { + abs.Add(AssetBundle.LoadFromFile(texturePath)); + } + } + + var bundle = AssetBundle.LoadFromFile(basePath + modelName); + abs.Add(bundle); + foreach (var name in bundle.GetAllAssetNames()) + { + model = (GameObject)Instantiate(bundle.LoadAsset(name)); + } + + foreach (AssetBundle ab in abs) + { + ab.Unload(false); + } + + Renderer[] renderers = model.GetComponentsInChildren(); + for (int i = 0; i < renderers.Length; i++) + { + for (int j = 0; j < renderers[i].materials.Length; j++) + { + Material material = renderers[i].materials[j]; + if (material.shader.name == "MU3/ToonEdge/Skin" || + material.shader.name == "MU3/ToonEdge/Face" || + material.shader.name == "MU3/ToonEdge/Face Prior") + { + material.SetColor(Const.ShaderPropertyID_ModifiedColor, Color.white); + material.SetFloat(Const.ShaderPropertyID_ModifiedBlendRate, 0.1f); + material.SetFloat(Const.ShaderPropertyID_ModifiedBrightness, 2.0f); + } + } + } + + loadWeapon(modelName.Substring(3, modelName.Length - 3)); + } + + void loadWeapon(string weaponId) + { + List abs = new List(); + var weaponPath = basePath + "we_" + weaponId; + if (File.Exists(weaponPath)) + { + var bundle = AssetBundle.LoadFromFile(weaponPath); + abs.Add(bundle); + foreach (var name in bundle.GetAllAssetNames()) + { + weapon = (GameObject)Instantiate(bundle.LoadAsset(name)); + } + Animator animator = weapon.GetComponent(); + if (animator) + { + animator.cullingMode = AnimatorCullingMode.AlwaysAnimate; + } + } + foreach (string suffix in textureSuffixes) + { + string texturePath = weaponPath + suffix; + if (File.Exists(texturePath)) + { + abs.Add(AssetBundle.LoadFromFile(texturePath)); + } + } + foreach (AssetBundle ab in abs) + { + ab.Unload(false); + } + } + + + + + + void Update() + { + if (Input.GetMouseButtonDown(0)) + { + idx++; + Destroy(model); + Destroy(weapon); + loadModel(modelList[idx % count]); + + } + } +} diff --git a/Assets/Scenes/Main.cs.meta b/Assets/Scenes/Main.cs.meta new file mode 100644 index 0000000..6236f89 --- /dev/null +++ b/Assets/Scenes/Main.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 11dbff0db7273f240902cf0121871cba +timeCreated: 1711000758 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/MainScene.unity b/Assets/Scenes/MainScene.unity new file mode 100644 index 0000000..d602087 Binary files /dev/null and b/Assets/Scenes/MainScene.unity differ diff --git a/Assets/Scenes/MainScene.unity.meta b/Assets/Scenes/MainScene.unity.meta new file mode 100644 index 0000000..34cfca5 --- /dev/null +++ b/Assets/Scenes/MainScene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ce046e8e9c7b38c409ac95ebb353ad47 +timeCreated: 1711000873 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Window.cs b/Assets/Scenes/Window.cs new file mode 100644 index 0000000..c351771 --- /dev/null +++ b/Assets/Scenes/Window.cs @@ -0,0 +1,78 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using System.Runtime.InteropServices; +using System; + +public class Window: MonoBehaviour +{ + // 导入 user32.dll 库以使用 Windows API 函数 + [DllImport("user32.dll")] + public static extern int MessageBox(IntPtr hWnd, string text, string caption, uint type); + + // 定义一个结构来存储窗口边框的边距大小 + private struct MARGINS + { + public int cxLeftWidth; + public int cxRightWidth; + public int cyTopHeight; + public int cyBottomHeight; + } + + // 导入 user32.dll 以获取活动窗口句柄 (HWND) + [DllImport("user32.dll")] + private static extern IntPtr GetActiveWindow(); + + // 导入 Dwmapi.dll 以将窗口边框扩展到客户区域 + [DllImport("Dwmapi.dll")] + private static extern uint DwmExtendFrameIntoClientArea(IntPtr hWnd, ref MARGINS margins); + + // 导入 user32.dll 以修改窗口属性 + [DllImport("user32.dll")] + private static extern int SetWindowLong(IntPtr hWnd, int nIndex, uint dwNewLong); + + // 导入 user32.dll 以设置窗口位置 + [DllImport("user32.dll", SetLastError = true)] + static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags); + + // 导入 user32.dll 以设置分层窗口属性 (透明度) + [DllImport("user32.dll")] + static extern int SetLayeredWindowAttributes(IntPtr hWnd, uint crKey, byte bAlpha, uint dwFlags); + + // 代码中使用的常量和变量 + const int GWL_EXSTYLE = -20; // 修改窗口样式的索引 + const uint WS_EX_LAYERED = 0x00080000; // 分层窗口的扩展样式 + const uint WS_EX_TRANSPARENT = 0x00000020; // 透明窗口的扩展样式 + static readonly IntPtr HWND_TOPMOST = new IntPtr(-1); // 窗口插入位置(始终置顶) + const uint LWA_COLORKEY = 0x00000001; // 设置颜色键的标志(用于透明度) + private IntPtr hWnd; // 活动窗口的句柄 + + private void Start() + { + // 显示一个消息框(仅用于演示目的) + // MessageBox(new IntPtr(0), "Hello world", "Hello Dialog", 0); + +#if !UNITY_EDITOR + // 获取活动窗口的句柄 + hWnd = GetActiveWindow(); + + // 创建一个边距结构来定义边框大小 + MARGINS margins = new MARGINS { cxLeftWidth = -1 }; + + // 将窗口边框扩展到客户区域(玻璃效果) + DwmExtendFrameIntoClientArea(hWnd, ref margins); + + // 将窗口样式设置为分层和透明 + SetWindowLong(hWnd, GWL_EXSTYLE, WS_EX_LAYERED); + + // 设置窗口颜色键(用于透明度) + SetLayeredWindowAttributes(hWnd, 0, 0, LWA_COLORKEY); + + // 将窗口位置设置为始终置顶 + SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, 0); +#endif + + // 允许应用在后台运行 + Application.runInBackground = true; + } +} \ No newline at end of file diff --git a/Assets/Scenes/Window.cs.meta b/Assets/Scenes/Window.cs.meta new file mode 100644 index 0000000..b552fe5 --- /dev/null +++ b/Assets/Scenes/Window.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 342a03ed0eec5d94d81c2f4bf9830de4 +timeCreated: 1711697376 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/AudioManager.asset b/ProjectSettings/AudioManager.asset new file mode 100644 index 0000000..0e34db7 Binary files /dev/null and b/ProjectSettings/AudioManager.asset differ diff --git a/ProjectSettings/ClusterInputManager.asset b/ProjectSettings/ClusterInputManager.asset new file mode 100644 index 0000000..7663bce Binary files /dev/null and b/ProjectSettings/ClusterInputManager.asset differ diff --git a/ProjectSettings/DynamicsManager.asset b/ProjectSettings/DynamicsManager.asset new file mode 100644 index 0000000..a6210d5 Binary files /dev/null and b/ProjectSettings/DynamicsManager.asset differ diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset new file mode 100644 index 0000000..eb401a7 Binary files /dev/null and b/ProjectSettings/EditorBuildSettings.asset differ diff --git a/ProjectSettings/EditorSettings.asset b/ProjectSettings/EditorSettings.asset new file mode 100644 index 0000000..18138d0 Binary files /dev/null and b/ProjectSettings/EditorSettings.asset differ diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset new file mode 100644 index 0000000..8840911 Binary files /dev/null and b/ProjectSettings/GraphicsSettings.asset differ diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset new file mode 100644 index 0000000..752ccd8 Binary files /dev/null and b/ProjectSettings/InputManager.asset differ diff --git a/ProjectSettings/NavMeshAreas.asset b/ProjectSettings/NavMeshAreas.asset new file mode 100644 index 0000000..151b4d9 Binary files /dev/null and b/ProjectSettings/NavMeshAreas.asset differ diff --git a/ProjectSettings/NetworkManager.asset b/ProjectSettings/NetworkManager.asset new file mode 100644 index 0000000..08bed39 Binary files /dev/null and b/ProjectSettings/NetworkManager.asset differ diff --git a/ProjectSettings/Physics2DSettings.asset b/ProjectSettings/Physics2DSettings.asset new file mode 100644 index 0000000..675ef29 Binary files /dev/null and b/ProjectSettings/Physics2DSettings.asset differ diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset new file mode 100644 index 0000000..d6f4e49 Binary files /dev/null and b/ProjectSettings/ProjectSettings.asset differ diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt new file mode 100644 index 0000000..09b2eac --- /dev/null +++ b/ProjectSettings/ProjectVersion.txt @@ -0,0 +1 @@ +m_EditorVersion: 5.6.4f1 diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset new file mode 100644 index 0000000..2b75a3e Binary files /dev/null and b/ProjectSettings/QualitySettings.asset differ diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset new file mode 100644 index 0000000..95d0818 Binary files /dev/null and b/ProjectSettings/TagManager.asset differ diff --git a/ProjectSettings/TimeManager.asset b/ProjectSettings/TimeManager.asset new file mode 100644 index 0000000..c9db696 Binary files /dev/null and b/ProjectSettings/TimeManager.asset differ diff --git a/ProjectSettings/UnityConnectSettings.asset b/ProjectSettings/UnityConnectSettings.asset new file mode 100644 index 0000000..abcb8c4 Binary files /dev/null and b/ProjectSettings/UnityConnectSettings.asset differ