Decompiled source of Afg OutPost KOTH v1.0.6
Afg_OutPost_KOTH.dll
Decompiled a year ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Xml; using System.Xml.Serialization; using Atlas; using BepInEx; using BepInEx.Logging; using FistVR; using Gamemodes; using HarmonyLib; using JerryComponent; using JerryLegsIK; using LuxWater; using NoiseTools; using OtherLoader; using Plawius; using Popcron; using ProBuilder2.Common; using ProBuilder2.MeshOperations; using RootMotion; using RootMotion.FinalIK; using RootMotion1.FinalIK; using SimplestarGame.Mesh; using SimplestarGame.Splash; using SimplestarGame.Wave; using Sodalite; using Sodalite.Api; using Sodalite.Utilities; using Tenkoku.Core; using Tenkoku.Effects; using UnityEditor; using UnityEngine; using UnityEngine.AI; using UnityEngine.Audio; using UnityEngine.Events; using UnityEngine.Profiling; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; using UnityEngine.SceneManagement; using UnityEngine.Serialization; using UnityEngine.UI; using Valve.Newtonsoft.Json; using Valve.VR; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] public class AQUAS_BubbleBehaviour : MonoBehaviour { public float averageUpdrift; public float waterLevel; public GameObject mainCamera; public GameObject smallBubble; private int smallBubbleCount; private int maxSmallBubbleCount; private AQUAS_SmallBubbleBehaviour smallBubbleBehaviour; private void Start() { maxSmallBubbleCount = Random.Range(20, 30); smallBubbleCount = 0; smallBubbleBehaviour = smallBubble.GetComponent<AQUAS_SmallBubbleBehaviour>(); } private void Update() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.Translate(Vector3.up * Time.deltaTime * averageUpdrift, (Space)0); SmallBubbleSpawner(); if (mainCamera.transform.position.y > waterLevel || ((Component)this).transform.position.y > waterLevel) { Object.Destroy((Object)(object)((Component)this).gameObject); } } private void SmallBubbleSpawner() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) if (smallBubbleCount <= maxSmallBubbleCount) { smallBubble.transform.localScale = ((Component)this).transform.localScale * Random.Range(0.05f, 0.2f); smallBubbleBehaviour.averageUpdrift = averageUpdrift * 0.5f; smallBubbleBehaviour.waterLevel = waterLevel; smallBubbleBehaviour.mainCamera = mainCamera; Object.Instantiate<GameObject>(smallBubble, new Vector3(((Component)this).transform.position.x + Random.Range(-0.1f, 0.1f), ((Component)this).transform.position.y - Random.Range(0.01f, 1f), ((Component)this).transform.position.z + Random.Range(-0.1f, 0.1f)), Quaternion.identity); smallBubbleCount++; } } } public class AQUAS_BubbleMorph : MonoBehaviour { private float t = 0f; private float t2 = 0f; [Space(5f)] [Header("Duration of a full morphing cycle")] public float tTarget; private SkinnedMeshRenderer skinnedMeshRenderer; private void Start() { skinnedMeshRenderer = ((Component)this).GetComponent<SkinnedMeshRenderer>(); } private void Update() { t += Time.deltaTime; t2 += Time.deltaTime; if (t < tTarget / 2f) { skinnedMeshRenderer.SetBlendShapeWeight(0, Mathf.Lerp(0f, 50f, t / (tTarget / 2f))); skinnedMeshRenderer.SetBlendShapeWeight(1, Mathf.Lerp(50f, 0f, t / (tTarget / 2f))); } else if (t >= tTarget / 2f && t < tTarget) { skinnedMeshRenderer.SetBlendShapeWeight(0, Mathf.Lerp(50f, 100f, t / tTarget)); skinnedMeshRenderer.SetBlendShapeWeight(1, Mathf.Lerp(0f, 50f, t / tTarget)); } else if (t >= tTarget && t < tTarget * 1.5f) { skinnedMeshRenderer.SetBlendShapeWeight(0, Mathf.Lerp(100f, 50f, t / (tTarget * 1.5f))); skinnedMeshRenderer.SetBlendShapeWeight(1, Mathf.Lerp(50f, 100f, t / (tTarget * 1.5f))); } else if (t >= tTarget * 1.5f && t < tTarget * 2f) { skinnedMeshRenderer.SetBlendShapeWeight(0, Mathf.Lerp(50f, 0f, t / (tTarget * 2f))); skinnedMeshRenderer.SetBlendShapeWeight(1, Mathf.Lerp(100f, 50f, t / (tTarget * 2f))); } else { t = 0f; } } } [AddComponentMenu("AQUAS/Buoyancy")] [RequireComponent(typeof(Rigidbody))] public class AQUAS_Buoyancy : MonoBehaviour { public enum debugModes { none, showAffectedFaces, showForceRepresentation, showReferenceVolume } public float waterLevel; public float waterDensity; [Space(5f)] public bool useBalanceFactor; public Vector3 balanceFactor; [Space(20f)] [Range(0f, 1f)] public float dynamicSurface = 0.3f; [Range(1f, 10f)] public float bounceFrequency = 3f; [Space(5f)] [Header("Debugging can be ver performance heavy!")] public debugModes debug; private Vector3[] vertices; private int[] triangles; private Mesh mesh; private Rigidbody rb; private float effWaterDensity; private float regWaterDensity; private float maxWaterDensity; private void Start() { mesh = ((Component)this).GetComponent<MeshFilter>().mesh; vertices = mesh.vertices; triangles = mesh.triangles; rb = ((Component)this).GetComponent<Rigidbody>(); regWaterDensity = waterDensity; maxWaterDensity = regWaterDensity + regWaterDensity * 0.5f * dynamicSurface; } private void FixedUpdate() { if (balanceFactor.x < 0.001f) { balanceFactor.x = 0.001f; } if (balanceFactor.y < 0.001f) { balanceFactor.y = 0.001f; } if (balanceFactor.z < 0.001f) { balanceFactor.z = 0.001f; } AddForce(); } private void Update() { regWaterDensity = waterDensity; maxWaterDensity = regWaterDensity + regWaterDensity * 0.5f * dynamicSurface; effWaterDensity = (maxWaterDensity - regWaterDensity) / 2f + regWaterDensity + Mathf.Sin(Time.time * bounceFrequency) * (maxWaterDensity - regWaterDensity) / 2f; } private void AddForce() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_0448: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0484: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_0497: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_04d1: Unknown result type (might be due to invalid IL or missing references) //IL_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: Unknown result type (might be due to invalid IL or missing references) //IL_04f8: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0506: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Unknown result type (might be due to invalid IL or missing references) //IL_0537: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_0545: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_0556: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_056c: Unknown result type (might be due to invalid IL or missing references) //IL_0571: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Unknown result type (might be due to invalid IL or missing references) //IL_058f: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Unknown result type (might be due to invalid IL or missing references) //IL_05b9: Unknown result type (might be due to invalid IL or missing references) //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_05c5: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Unknown result type (might be due to invalid IL or missing references) //IL_05df: Unknown result type (might be due to invalid IL or missing references) //IL_05e0: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: Unknown result type (might be due to invalid IL or missing references) //IL_05ee: Unknown result type (might be due to invalid IL or missing references) //IL_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Unknown result type (might be due to invalid IL or missing references) //IL_0609: Unknown result type (might be due to invalid IL or missing references) //IL_061e: Unknown result type (might be due to invalid IL or missing references) //IL_061f: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0638: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_063e: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Unknown result type (might be due to invalid IL or missing references) //IL_0649: Unknown result type (might be due to invalid IL or missing references) //IL_064a: Unknown result type (might be due to invalid IL or missing references) //IL_064b: Unknown result type (might be due to invalid IL or missing references) //IL_0650: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_0660: Unknown result type (might be due to invalid IL or missing references) //IL_0665: Unknown result type (might be due to invalid IL or missing references) //IL_066e: Unknown result type (might be due to invalid IL or missing references) //IL_0673: Unknown result type (might be due to invalid IL or missing references) //IL_0683: Unknown result type (might be due to invalid IL or missing references) //IL_0684: Unknown result type (might be due to invalid IL or missing references) //IL_0689: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Unknown result type (might be due to invalid IL or missing references) //IL_069f: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06b8: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: Unknown result type (might be due to invalid IL or missing references) //IL_06be: Unknown result type (might be due to invalid IL or missing references) //IL_06c8: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Unknown result type (might be due to invalid IL or missing references) //IL_06ca: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06df: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_06e5: Unknown result type (might be due to invalid IL or missing references) //IL_06ee: Unknown result type (might be due to invalid IL or missing references) //IL_06f3: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Unknown result type (might be due to invalid IL or missing references) //IL_0704: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_071e: Unknown result type (might be due to invalid IL or missing references) //IL_071f: Unknown result type (might be due to invalid IL or missing references) //IL_0724: Unknown result type (might be due to invalid IL or missing references) //IL_072d: Unknown result type (might be due to invalid IL or missing references) //IL_0738: Unknown result type (might be due to invalid IL or missing references) //IL_0739: Unknown result type (might be due to invalid IL or missing references) //IL_073e: Unknown result type (might be due to invalid IL or missing references) //IL_0748: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_074a: Unknown result type (might be due to invalid IL or missing references) //IL_074b: Unknown result type (might be due to invalid IL or missing references) //IL_0750: Unknown result type (might be due to invalid IL or missing references) //IL_075f: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Unknown result type (might be due to invalid IL or missing references) //IL_076e: Unknown result type (might be due to invalid IL or missing references) //IL_0773: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < triangles.Length; i += 3) { Vector3 val = vertices[triangles[i]]; Vector3 val2 = vertices[triangles[i + 1]]; Vector3 val3 = vertices[triangles[i + 2]]; float num = waterLevel - Center(val, val2, val3).y; if (num > 0f && Center(val, val2, val3).y > (Center(val, val2, val3) + Normal(val, val2, val3)).y) { float num2 = effWaterDensity * Physics.gravity.y * num * Area(val, val2, val3); Vector3 val4 = Normal(val, val2, val3); float num3 = num2 * ((Vector3)(ref val4)).normalized.y; if (useBalanceFactor) { rb.AddForceAtPosition(new Vector3(0f, num3, 0f), ((Component)this).transform.TransformPoint(new Vector3(((Component)this).transform.InverseTransformPoint(Center(val, val2, val3)).x / (balanceFactor.x * ((Component)this).transform.localScale.x * 1000f), ((Component)this).transform.InverseTransformPoint(Center(val, val2, val3)).y / (balanceFactor.y * ((Component)this).transform.localScale.x * 1000f), ((Component)this).transform.InverseTransformPoint(Center(val, val2, val3)).z / (balanceFactor.z * ((Component)this).transform.localScale.x * 1000f)))); } else { rb.AddForceAtPosition(new Vector3(0f, num3, 0f), ((Component)this).transform.TransformPoint(new Vector3(((Component)this).transform.InverseTransformPoint(Center(val, val2, val3)).x, ((Component)this).transform.InverseTransformPoint(Center(val, val2, val3)).y, ((Component)this).transform.InverseTransformPoint(Center(val, val2, val3)).z))); } if (debug == debugModes.showAffectedFaces) { Debug.DrawLine(Center(val, val2, val3), Center(val, val2, val3) + Normal(val, val2, val3), Color.white); } if (debug == debugModes.showForceRepresentation) { Debug.DrawRay(Center(val, val2, val3), new Vector3(0f, num3, 0f), Color.red); } if (debug == debugModes.showReferenceVolume) { Debug.DrawLine(new Vector3(((Component)this).transform.TransformPoint(val).x, Center(val, val2, val3).y, ((Component)this).transform.TransformPoint(val).z), new Vector3(((Component)this).transform.TransformPoint(val2).x, Center(val, val2, val3).y, ((Component)this).transform.TransformPoint(val2).z), Color.green); Debug.DrawLine(new Vector3(((Component)this).transform.TransformPoint(val2).x, Center(val, val2, val3).y, ((Component)this).transform.TransformPoint(val2).z), new Vector3(((Component)this).transform.TransformPoint(val3).x, Center(val, val2, val3).y, ((Component)this).transform.TransformPoint(val3).z), Color.green); Debug.DrawLine(new Vector3(((Component)this).transform.TransformPoint(val3).x, Center(val, val2, val3).y, ((Component)this).transform.TransformPoint(val3).z), new Vector3(((Component)this).transform.TransformPoint(val).x, Center(val, val2, val3).y, ((Component)this).transform.TransformPoint(val).z), Color.green); Debug.DrawLine(new Vector3(((Component)this).transform.TransformPoint(val).x, waterLevel, ((Component)this).transform.TransformPoint(val).z), new Vector3(((Component)this).transform.TransformPoint(val2).x, waterLevel, ((Component)this).transform.TransformPoint(val2).z), Color.green); Debug.DrawLine(new Vector3(((Component)this).transform.TransformPoint(val2).x, waterLevel, ((Component)this).transform.TransformPoint(val2).z), new Vector3(((Component)this).transform.TransformPoint(val3).x, waterLevel, ((Component)this).transform.TransformPoint(val3).z), Color.green); Debug.DrawLine(new Vector3(((Component)this).transform.TransformPoint(val3).x, waterLevel, ((Component)this).transform.TransformPoint(val3).z), new Vector3(((Component)this).transform.TransformPoint(val).x, waterLevel, ((Component)this).transform.TransformPoint(val).z), Color.green); Debug.DrawLine(new Vector3(((Component)this).transform.TransformPoint(val).x, waterLevel, ((Component)this).transform.TransformPoint(val).z), new Vector3(((Component)this).transform.TransformPoint(val).x, Center(val, val2, val3).y, ((Component)this).transform.TransformPoint(val).z), Color.green); Debug.DrawLine(new Vector3(((Component)this).transform.TransformPoint(val2).x, waterLevel, ((Component)this).transform.TransformPoint(val2).z), new Vector3(((Component)this).transform.TransformPoint(val2).x, Center(val, val2, val3).y, ((Component)this).transform.TransformPoint(val2).z), Color.green); Debug.DrawLine(new Vector3(((Component)this).transform.TransformPoint(val3).x, waterLevel, ((Component)this).transform.TransformPoint(val3).z), new Vector3(((Component)this).transform.TransformPoint(val3).x, Center(val, val2, val3).y, ((Component)this).transform.TransformPoint(val3).z), Color.green); } } } } private Vector3 Center(Vector3 p1, Vector3 p2, Vector3 p3) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) Vector3 val = (p1 + p2 + p3) / 3f; return ((Component)this).transform.TransformPoint(val); } private Vector3 Normal(Vector3 p1, Vector3 p2, Vector3 p3) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.Cross(((Component)this).transform.TransformPoint(p2) - ((Component)this).transform.TransformPoint(p1), ((Component)this).transform.TransformPoint(p3) - ((Component)this).transform.TransformPoint(p1)); return ((Vector3)(ref val)).normalized; } private float Area(Vector3 p1, Vector3 p2, Vector3 p3) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) float num = Vector3.Distance(new Vector3(((Component)this).transform.TransformPoint(p1).x, Center(p1, p2, p3).y, ((Component)this).transform.TransformPoint(p1).z), new Vector3(((Component)this).transform.TransformPoint(p2).x, Center(p1, p2, p3).y, ((Component)this).transform.TransformPoint(p2).z)); float num2 = Vector3.Distance(new Vector3(((Component)this).transform.TransformPoint(p3).x, Center(p1, p2, p3).y, ((Component)this).transform.TransformPoint(p3).z), new Vector3(((Component)this).transform.TransformPoint(p1).x, Center(p1, p2, p3).y, ((Component)this).transform.TransformPoint(p1).z)); return num * num2 * Mathf.Sin(Vector3.Angle(new Vector3(((Component)this).transform.TransformPoint(p2).x, Center(p1, p2, p3).y, ((Component)this).transform.TransformPoint(p2).z) - new Vector3(((Component)this).transform.TransformPoint(p1).x, Center(p1, p2, p3).y, ((Component)this).transform.TransformPoint(p1).z), new Vector3(((Component)this).transform.TransformPoint(p3).x, Center(p1, p2, p3).y, ((Component)this).transform.TransformPoint(p3).z) - new Vector3(((Component)this).transform.TransformPoint(p1).x, Center(p1, p2, p3).y, ((Component)this).transform.TransformPoint(p1).z)) * ((float)Math.PI / 180f)) / 2f; } } [AddComponentMenu("AQUAS/AQUAS Camera")] [RequireComponent(typeof(Camera))] public class AQUAS_Camera : MonoBehaviour { private void OnDrawGizmos() { Set(); } private void Start() { Set(); } private void Set() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) if ((int)((Component)this).GetComponent<Camera>().depthTextureMode == 0) { ((Component)this).GetComponent<Camera>().depthTextureMode = (DepthTextureMode)1; } } } public class AQUAS_Caustics : MonoBehaviour { public float fps; public Texture2D[] frames; public float maxCausticDepth; private int frameIndex; private Projector projector; private void Start() { projector = ((Component)this).GetComponent<Projector>(); NextFrame(); ((MonoBehaviour)this).InvokeRepeating("NextFrame", 1f / fps, 1f / fps); projector.material.SetFloat("_WaterLevel", 0.5f); projector.material.SetFloat("_DepthFade", -19f); } private void Update() { projector.material.SetFloat("_DepthFade", -19f); } private void NextFrame() { projector.material.SetTexture("_Texture", (Texture)(object)frames[frameIndex]); frameIndex = (frameIndex + 1) % frames.Length; } } namespace AQUAS { public class AQUAS_Look : MonoBehaviour { [Header("Info")] private List<float> _rotArrayX = new List<float>(); private List<float> _rotArrayY = new List<float>(); private float rotAverageX; private float rotAverageY; private float mouseDeltaX; private float mouseDeltaY; [Header("Settings")] public bool _isLocked; public float _sensitivityX = 1.5f; public float _sensitivityY = 1.5f; [Tooltip("The more steps, the smoother it will be.")] public int _averageFromThisManySteps = 3; [Header("References")] [Tooltip("Object to be rotated when mouse moves left/right.")] public Transform _playerRootT; [Tooltip("Object to be rotated when mouse moves up/down.")] public Transform _cameraT; private void Update() { MouseLookAveraged(); } private void MouseLookAveraged() { rotAverageX = 0f; rotAverageY = 0f; mouseDeltaX = 0f; mouseDeltaY = 0f; mouseDeltaX += Input.GetAxis("Mouse X") * _sensitivityX; mouseDeltaY += Input.GetAxis("Mouse Y") * _sensitivityY; _rotArrayX.Add(mouseDeltaX); _rotArrayY.Add(mouseDeltaY); if (_rotArrayX.Count >= _averageFromThisManySteps) { _rotArrayX.RemoveAt(0); } if (_rotArrayY.Count >= _averageFromThisManySteps) { _rotArrayY.RemoveAt(0); } for (int i = 0; i < _rotArrayX.Count; i++) { rotAverageX += _rotArrayX[i]; } for (int j = 0; j < _rotArrayY.Count; j++) { rotAverageY += _rotArrayY[j]; } rotAverageX /= _rotArrayX.Count; rotAverageY /= _rotArrayY.Count; _playerRootT.Rotate(0f, rotAverageX, 0f, (Space)0); _cameraT.Rotate(0f - rotAverageY, 0f, 0f, (Space)1); } } } [Serializable] public class AQUAS_Parameters { [Serializable] public class UnderWaterParameters { [Header("The following parameters apply for underwater only!")] [Space(5f)] public float fogDensity = 0.1f; public Color fogColor; [Space(5f)] [Header("Post Processing Profiles (Must NOT be empty!)")] [Space(5f)] public PostProcessProfile underwaterProfile; public PostProcessProfile defaultProfile; } [Serializable] public class GameObjects { [Header("Set the game objects required for underwater mode.")] [Space(5f)] public GameObject mainCamera; public GameObject waterLens; public GameObject airLens; public GameObject bubble; [Space(5f)] [Header("Set waterplanes array size = number of waterplanes")] public List<GameObject> waterPlanes = new List<GameObject>(); public bool useSquaredPlanes; } [Serializable] public class WetLens { [Header("Set how long the lens stays wet after diving up.")] public float wetTime = 1f; [Space(5f)] [Header("Set how long the lens needs to dry.")] public float dryingTime = 1.5f; [Space(5f)] public Texture2D[] sprayFrames; public Texture2D[] sprayFramesCutout; public float rundownSpeed = 72f; } [Serializable] public class CausticSettings { [Header("The following values are 'Afloat'/'Underwater'")] public Vector2 causticIntensity = new Vector2(0.6f, 0.2f); public Vector2 causticTiling = new Vector2(300f, 100f); public float maxCausticDepth; } [Serializable] public class Audio { public AudioClip[] sounds; [Range(0f, 1f)] public float underwaterVolume; [Range(0f, 1f)] public float surfacingVolume; [Range(0f, 1f)] public float diveVolume; } [Serializable] public class BubbleSpawnCriteria { [Header("Spawn Criteria for big bubbles")] public int minBubbleCount = 20; public int maxBubbleCount = 40; [Space(5f)] public float maxSpawnDistance = 1f; public float averageUpdrift = 3f; [Space(5f)] public float baseScale = 0.06f; public float avgScaleSummand = 0.15f; [Space(5f)] [Header("Spawn Timer for initial dive")] public float minSpawnTimer = 0.005f; public float maxSpawnTimer = 0.03f; [Space(5f)] [Header("Spawn Timer for long dive")] public float minSpawnTimerL = 0.1f; public float maxSpawnTimerL = 0.5f; } } [AddComponentMenu("AQUAS/Reflection")] [ExecuteInEditMode] public class AQUAS_Reflection : MonoBehaviour { public bool m_DisablePixelLights = true; public int m_TextureSize = 256; public float m_ClipPlaneOffset = 0.07f; public LayerMask m_ReflectLayers = LayerMask.op_Implicit(-1); public Hashtable m_ReflectionCameras = new Hashtable(); public RenderTexture m_ReflectionTexture = null; public int m_OldReflectionTextureSize = 0; public static bool s_InsideRendering = false; public bool ignoreOcclusionCulling; public void OnWillRenderObject() { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) if (!((Behaviour)this).enabled || !Object.op_Implicit((Object)(object)((Component)this).GetComponent<Renderer>()) || !Object.op_Implicit((Object)(object)((Component)this).GetComponent<Renderer>().sharedMaterial) || !((Component)this).GetComponent<Renderer>().enabled) { return; } Camera current = Camera.current; if (!Object.op_Implicit((Object)(object)current) || s_InsideRendering) { return; } s_InsideRendering = true; CreateMirrorObjects(current, out var reflectionCamera); Vector3 position = ((Component)this).transform.position; Vector3 up = ((Component)this).transform.up; int pixelLightCount = QualitySettings.pixelLightCount; if (m_DisablePixelLights) { QualitySettings.pixelLightCount = 0; } UpdateCameraModes(current, reflectionCamera); float num = 0f - Vector3.Dot(up, position) - m_ClipPlaneOffset; Vector4 plane = default(Vector4); ((Vector4)(ref plane))..ctor(up.x, up.y, up.z, num); if (ignoreOcclusionCulling) { reflectionCamera.useOcclusionCulling = false; } else { reflectionCamera.useOcclusionCulling = true; } Matrix4x4 reflectionMat = Matrix4x4.zero; CalculateReflectionMatrix(ref reflectionMat, plane); Vector3 position2 = ((Component)current).transform.position; Vector3 position3 = ((Matrix4x4)(ref reflectionMat)).MultiplyPoint(position2); reflectionCamera.worldToCameraMatrix = current.worldToCameraMatrix * reflectionMat; Vector4 clipPlane = CameraSpacePlane(reflectionCamera, position, up, 1f); Matrix4x4 projection = current.projectionMatrix; CalculateObliqueMatrix(ref projection, clipPlane); reflectionCamera.projectionMatrix = projection; reflectionCamera.cullingMask = -17 & ((LayerMask)(ref m_ReflectLayers)).value; reflectionCamera.targetTexture = m_ReflectionTexture; GL.invertCulling = true; ((Component)reflectionCamera).transform.position = position3; Vector3 eulerAngles = ((Component)current).transform.eulerAngles; ((Component)reflectionCamera).transform.eulerAngles = new Vector3(eulerAngles.x * -1f, eulerAngles.y, 0f); reflectionCamera.Render(); ((Component)reflectionCamera).transform.position = position2; GL.invertCulling = false; Material[] sharedMaterials = ((Component)this).GetComponent<Renderer>().sharedMaterials; Material[] array = sharedMaterials; foreach (Material val in array) { if (val.HasProperty("_ReflectionTex")) { val.SetTexture("_ReflectionTex", (Texture)(object)m_ReflectionTexture); } } Matrix4x4 val2 = Matrix4x4.TRS(new Vector3(0.5f, 0.5f, 0.5f), Quaternion.identity, new Vector3(0.5f, 0.5f, 0.5f)); Vector3 lossyScale = ((Component)this).transform.lossyScale; Matrix4x4 val3 = ((Component)this).transform.localToWorldMatrix * Matrix4x4.Scale(new Vector3(1f / lossyScale.x, 1f / lossyScale.y, 1f / lossyScale.z)); val3 = val2 * current.projectionMatrix * current.worldToCameraMatrix * val3; Material[] array2 = sharedMaterials; foreach (Material val4 in array2) { val4.SetMatrix("_ProjMatrix", val3); } if (m_DisablePixelLights) { QualitySettings.pixelLightCount = pixelLightCount; } s_InsideRendering = false; } private void OnDisable() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)m_ReflectionTexture)) { Object.DestroyImmediate((Object)(object)m_ReflectionTexture); m_ReflectionTexture = null; } foreach (DictionaryEntry reflectionCamera in m_ReflectionCameras) { Object.DestroyImmediate((Object)(object)((Component)(Camera)reflectionCamera.Value).gameObject); } m_ReflectionCameras.Clear(); } public void UpdateCameraModes(Camera src, Camera dest) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Invalid comparison between Unknown and I4 if ((Object)(object)dest == (Object)null) { return; } dest.clearFlags = src.clearFlags; dest.backgroundColor = src.backgroundColor; if ((int)src.clearFlags == 1) { Component component = ((Component)src).GetComponent(typeof(Skybox)); Skybox val = (Skybox)(object)((component is Skybox) ? component : null); Component component2 = ((Component)dest).GetComponent(typeof(Skybox)); Skybox val2 = (Skybox)(object)((component2 is Skybox) ? component2 : null); if (!Object.op_Implicit((Object)(object)val) || !Object.op_Implicit((Object)(object)val.material)) { ((Behaviour)val2).enabled = false; } else { ((Behaviour)val2).enabled = true; val2.material = val.material; } } dest.farClipPlane = src.farClipPlane; dest.nearClipPlane = src.nearClipPlane; dest.orthographic = src.orthographic; dest.fieldOfView = src.fieldOfView; dest.aspect = src.aspect; dest.orthographicSize = src.orthographicSize; } public void CreateMirrorObjects(Camera currentCamera, out Camera reflectionCamera) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) reflectionCamera = null; if (!Object.op_Implicit((Object)(object)m_ReflectionTexture) || m_OldReflectionTextureSize != m_TextureSize) { if (Object.op_Implicit((Object)(object)m_ReflectionTexture)) { Object.DestroyImmediate((Object)(object)m_ReflectionTexture); } m_ReflectionTexture = new RenderTexture(m_TextureSize, m_TextureSize, 16); ((Object)m_ReflectionTexture).name = "__MirrorReflection" + ((Object)this).GetInstanceID(); m_ReflectionTexture.isPowerOfTwo = true; ((Object)m_ReflectionTexture).hideFlags = (HideFlags)52; m_OldReflectionTextureSize = m_TextureSize; } object? obj = m_ReflectionCameras[currentCamera]; reflectionCamera = (Camera)((obj is Camera) ? obj : null); if (!Object.op_Implicit((Object)(object)reflectionCamera)) { GameObject val = new GameObject("Mirror Refl Camera id" + ((Object)this).GetInstanceID() + " for " + ((Object)currentCamera).GetInstanceID(), new Type[2] { typeof(Camera), typeof(Skybox) }); reflectionCamera = val.GetComponent<Camera>(); ((Behaviour)reflectionCamera).enabled = false; ((Component)reflectionCamera).transform.position = ((Component)this).transform.position; ((Component)reflectionCamera).transform.rotation = ((Component)this).transform.rotation; ((Component)reflectionCamera).gameObject.AddComponent<FlareLayer>(); ((Object)val).hideFlags = (HideFlags)61; m_ReflectionCameras[currentCamera] = reflectionCamera; } } public static float sgn(float a) { if (a > 0f) { return 1f; } if (a < 0f) { return -1f; } return 0f; } public Vector4 CameraSpacePlane(Camera cam, Vector3 pos, Vector3 normal, float sideSign) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) Vector3 val = pos + normal * m_ClipPlaneOffset; Matrix4x4 worldToCameraMatrix = cam.worldToCameraMatrix; Vector3 val2 = ((Matrix4x4)(ref worldToCameraMatrix)).MultiplyPoint(val); Vector3 val3 = ((Matrix4x4)(ref worldToCameraMatrix)).MultiplyVector(normal); Vector3 val4 = ((Vector3)(ref val3)).normalized * sideSign; return new Vector4(val4.x, val4.y, val4.z, 0f - Vector3.Dot(val2, val4)); } public static void CalculateObliqueMatrix(ref Matrix4x4 projection, Vector4 clipPlane) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) Vector4 val = ((Matrix4x4)(ref projection)).inverse * new Vector4(sgn(clipPlane.x), sgn(clipPlane.y), 1f, 1f); Vector4 val2 = clipPlane * (2f / Vector4.Dot(clipPlane, val)); ((Matrix4x4)(ref projection))[2] = val2.x - ((Matrix4x4)(ref projection))[3]; ((Matrix4x4)(ref projection))[6] = val2.y - ((Matrix4x4)(ref projection))[7]; ((Matrix4x4)(ref projection))[10] = val2.z - ((Matrix4x4)(ref projection))[11]; ((Matrix4x4)(ref projection))[14] = val2.w - ((Matrix4x4)(ref projection))[15]; } public static void CalculateReflectionMatrix(ref Matrix4x4 reflectionMat, Vector4 plane) { reflectionMat.m00 = 1f - 2f * ((Vector4)(ref plane))[0] * ((Vector4)(ref plane))[0]; reflectionMat.m01 = -2f * ((Vector4)(ref plane))[0] * ((Vector4)(ref plane))[1]; reflectionMat.m02 = -2f * ((Vector4)(ref plane))[0] * ((Vector4)(ref plane))[2]; reflectionMat.m03 = -2f * ((Vector4)(ref plane))[3] * ((Vector4)(ref plane))[0]; reflectionMat.m10 = -2f * ((Vector4)(ref plane))[1] * ((Vector4)(ref plane))[0]; reflectionMat.m11 = 1f - 2f * ((Vector4)(ref plane))[1] * ((Vector4)(ref plane))[1]; reflectionMat.m12 = -2f * ((Vector4)(ref plane))[1] * ((Vector4)(ref plane))[2]; reflectionMat.m13 = -2f * ((Vector4)(ref plane))[3] * ((Vector4)(ref plane))[1]; reflectionMat.m20 = -2f * ((Vector4)(ref plane))[2] * ((Vector4)(ref plane))[0]; reflectionMat.m21 = -2f * ((Vector4)(ref plane))[2] * ((Vector4)(ref plane))[1]; reflectionMat.m22 = 1f - 2f * ((Vector4)(ref plane))[2] * ((Vector4)(ref plane))[2]; reflectionMat.m23 = -2f * ((Vector4)(ref plane))[3] * ((Vector4)(ref plane))[2]; reflectionMat.m30 = 0f; reflectionMat.m31 = 0f; reflectionMat.m32 = 0f; reflectionMat.m33 = 1f; } } [ExecuteInEditMode] [AddComponentMenu("AQUAS/Render Queue Controller")] public class AQUAS_RenderQueueEditor : MonoBehaviour { public int renderQueueIndex = -1; private void Update() { ((Component)this).gameObject.GetComponent<Renderer>().sharedMaterial.renderQueue = renderQueueIndex; } } namespace AQUAS { public class AQUAS_Screenshotter : MonoBehaviour { [Header("This script is only for use in the Editor!")] [Header("Use F12 to Capture Screenshot")] public GameObject camera; public int sizeX = 1920; public int sizeY = 1080; public string folder = "Screenshots"; public string name = "Screenshot"; private void Start() { } private void Update() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0079: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown((KeyCode)293)) { RenderTexture val = new RenderTexture(sizeX, sizeY, 24); camera.GetComponent<Camera>().targetTexture = val; Texture2D val2 = new Texture2D(sizeX, sizeY, (TextureFormat)3, false); camera.GetComponent<Camera>().Render(); RenderTexture.active = val; val2.ReadPixels(new Rect(0f, 0f, (float)sizeX, (float)sizeY), 0, 0); camera.GetComponent<Camera>().targetTexture = null; RenderTexture.active = null; Object.DestroyImmediate((Object)(object)val); byte[] bytes = val2.EncodeToJPG(); string path = string.Format("{0}/{1}/{2}_{3}.jpg", Application.dataPath, folder, name, DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss")); if (!Directory.Exists($"{Application.dataPath}/{folder}")) { Directory.CreateDirectory($"{Application.dataPath}/{folder}"); } File.WriteAllBytes(path, bytes); AssetDatabase.Refresh(); Debug.Log((object)"Screenshot taken!"); } } } } public class AQUAS_SmallBubbleBehaviour : MonoBehaviour { public float averageUpdrift; public float waterLevel; public GameObject mainCamera; private float updriftFactor; private void Start() { updriftFactor = Random.Range((0f - averageUpdrift) * 0.75f, averageUpdrift * 0.75f); } private void Update() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.Translate(Vector3.up * Time.deltaTime * (averageUpdrift + updriftFactor), (Space)0); if (mainCamera.transform.position.y > waterLevel || ((Component)this).transform.position.y > waterLevel) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } namespace AQUAS { public class AQUAS_Walk : MonoBehaviour { public float m_moveSpeed = 10f; public CharacterController m_controller; private void Start() { if ((Object)(object)m_controller == (Object)null) { m_controller = ((Component)this).GetComponent<CharacterController>(); } } private void Update() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)m_controller != (Object)null && ((Collider)m_controller).enabled) { Vector3 val = Input.GetAxis("Vertical") * ((Component)this).transform.TransformDirection(Vector3.forward) * m_moveSpeed; m_controller.Move(val * Time.deltaTime); Vector3 val2 = Input.GetAxis("Horizontal") * ((Component)this).transform.TransformDirection(Vector3.right) * m_moveSpeed; m_controller.Move(val2 * Time.deltaTime); m_controller.SimpleMove(Physics.gravity); } } } } public class FreeCamera : MonoBehaviour { public float thetaSpeed = 250f; public float phiSpeed = 120f; public float moveSpeed = 10f; public float zoomSpeed = 30f; public float phiBoundMin = -89f; public float phiBoundMax = 89f; public bool useMoveBounds = true; public float moveBounds = 100f; public float rotateSmoothing = 0.5f; public float moveSmoothing = 0.7f; public float distance = 2f; private Vector2 euler; private Quaternion targetRot; private Vector3 targetLookAt; private float targetDist; private Vector3 distanceVec = new Vector3(0f, 0f, 0f); private Transform target; private Rect inputBounds; public Rect paramInputBounds = new Rect(0f, 0f, 1f, 1f); public bool usePivotPoint = true; public Vector3 pivotPoint = new Vector3(0f, 2f, 0f); public Transform pivotTransform = null; public void Start() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) Vector3 eulerAngles = ((Component)this).transform.eulerAngles; euler.x = eulerAngles.y; euler.y = eulerAngles.x; euler.y = Mathf.Repeat(euler.y + 180f, 360f) - 180f; GameObject val = new GameObject("_FreeCameraTarget"); ((Object)val).hideFlags = (HideFlags)63; target = val.transform; if (usePivotPoint) { target.position = pivotPoint; Vector3 val2 = ((Component)this).transform.position - target.position; targetDist = ((Vector3)(ref val2)).magnitude; } else if ((Object)(object)pivotTransform != (Object)null) { usePivotPoint = true; Matrix4x4 worldToLocalMatrix = ((Component)this).transform.worldToLocalMatrix; Vector3 val3 = ((Matrix4x4)(ref worldToLocalMatrix)).MultiplyPoint3x4(pivotTransform.position); val3.x = 0f; val3.y = 0f; targetDist = val3.z; Transform obj = target; Matrix4x4 localToWorldMatrix = ((Component)this).transform.localToWorldMatrix; obj.position = ((Matrix4x4)(ref localToWorldMatrix)).MultiplyPoint3x4(val3); } else { target.position = ((Component)this).transform.position + ((Component)this).transform.forward * distance; targetDist = distance; } targetRot = ((Component)this).transform.rotation; targetLookAt = target.position; } public void Update() { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) ((Rect)(ref inputBounds)).x = (float)((Component)this).GetComponent<Camera>().pixelWidth * ((Rect)(ref paramInputBounds)).x; ((Rect)(ref inputBounds)).y = (float)((Component)this).GetComponent<Camera>().pixelHeight * ((Rect)(ref paramInputBounds)).y; ((Rect)(ref inputBounds)).width = (float)((Component)this).GetComponent<Camera>().pixelWidth * ((Rect)(ref paramInputBounds)).width; ((Rect)(ref inputBounds)).height = (float)((Component)this).GetComponent<Camera>().pixelHeight * ((Rect)(ref paramInputBounds)).height; if (!Object.op_Implicit((Object)(object)target) || !((Rect)(ref inputBounds)).Contains(Input.mousePosition)) { return; } float axis = Input.GetAxis("Mouse X"); float axis2 = Input.GetAxis("Mouse Y"); bool flag = Input.GetMouseButton(0) || Input.touchCount == 1; bool flag2 = Input.GetMouseButton(1) || Input.touchCount == 2; bool flag3 = Input.GetMouseButton(2) || Input.touchCount == 3; bool flag4 = Input.touchCount >= 4; bool flag5 = flag; bool flag6 = flag4 || (flag && (Input.GetKey((KeyCode)304) || Input.GetKey((KeyCode)303))); bool flag7 = flag3 || (flag && (Input.GetKey((KeyCode)306) || Input.GetKey((KeyCode)305))); bool flag8 = flag2; if (!flag6) { if (flag7) { axis = axis * moveSpeed * 0.005f * targetDist; axis2 = axis2 * moveSpeed * 0.005f * targetDist; targetLookAt -= ((Component)this).transform.up * axis2 + ((Component)this).transform.right * axis; if (useMoveBounds) { targetLookAt.x = Mathf.Clamp(targetLookAt.x, 0f - moveBounds, moveBounds); targetLookAt.y = Mathf.Clamp(targetLookAt.y, 0f - moveBounds, moveBounds); targetLookAt.z = Mathf.Clamp(targetLookAt.z, 0f - moveBounds, moveBounds); } } else if (flag8) { axis2 = axis2 * zoomSpeed * 0.005f * targetDist; targetDist += axis2; targetDist = Mathf.Max(0.1f, targetDist); } else if (flag5) { axis = axis * thetaSpeed * 0.02f; axis2 = axis2 * phiSpeed * 0.02f; ref Vector2 reference = ref euler; reference.x += axis; ref Vector2 reference2 = ref euler; reference2.y -= axis2; euler.y = ClampAngle(euler.y, phiBoundMin, phiBoundMax); targetRot = Quaternion.Euler(euler.y, euler.x, 0f); } } targetDist -= Input.GetAxis("Mouse ScrollWheel") * zoomSpeed * 0.5f; targetDist = Mathf.Max(0.1f, targetDist); } public void FixedUpdate() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) distance = moveSmoothing * targetDist + (1f - moveSmoothing) * distance; ((Component)this).transform.rotation = Quaternion.Slerp(((Component)this).transform.rotation, targetRot, rotateSmoothing); target.position = Vector3.Lerp(target.position, targetLookAt, moveSmoothing); distanceVec.z = distance; ((Component)this).transform.position = target.position - ((Component)this).transform.rotation * distanceVec; } private static float ClampAngle(float angle, float min, float max) { if (angle < -360f) { angle += 360f; } if (angle > 360f) { angle -= 360f; } return Mathf.Clamp(angle, min, max); } } namespace Gamemodes { [CreateAssetMenu(fileName = "New Atlas Object Table", menuName = "MeatKit/Gamemodes/AtlasObjectTable", order = 0)] public class AtlasObjectTable : ScriptableObject { [Header("General Tags")] public ObjectCategory Category; public List<OTagEra> Eras = new List<OTagEra>(); public List<OTagSet> Sets = new List<OTagSet>(); public List<OTagFirearmCountryOfOrigin> CountriesOfOrigin = new List<OTagFirearmCountryOfOrigin>(); public int EarliestYear = -1; public int LatestYear = -1; [Header("Firearm Tags")] public List<OTagFirearmSize> Sizes = new List<OTagFirearmSize>(); public List<OTagFirearmAction> Actions = new List<OTagFirearmAction>(); public List<OTagFirearmFiringMode> Modes = new List<OTagFirearmFiringMode>(); public List<OTagFirearmFiringMode> ExcludedModes = new List<OTagFirearmFiringMode>(); public List<OTagFirearmFeedOption> FeedOptions = new List<OTagFirearmFeedOption>(); public List<OTagFirearmMount> MountsAvailable = new List<OTagFirearmMount>(); public List<OTagFirearmRoundPower> RoundPowers = new List<OTagFirearmRoundPower>(); [Header("Attachment Tags")] public List<OTagAttachmentFeature> Features = new List<OTagAttachmentFeature>(); public List<OTagFirearmMount> MountTypes = new List<OTagFirearmMount>(); [Header("Melee Tags")] public List<OTagMeleeStyle> MeleeStyles = new List<OTagMeleeStyle>(); public List<OTagMeleeHandedness> MeleeHandedness = new List<OTagMeleeHandedness>(); public List<OTagThrownType> ThrownTypes = new List<OTagThrownType>(); public List<OTagThrownDamageType> ThrownDamageTypes = new List<OTagThrownDamageType>(); [Header("Misc Tags")] public List<OTagPowerupType> PowerupTypes = new List<OTagPowerupType>(); [Header("Ammo Properties")] public int MinAmmoCapacity = -1; public int MaxAmmoCapacity = -1; public bool OverrideMagType; public bool OverrideRoundType; public FireArmMagazineType MagTypeOverride; public FireArmRoundType RoundTypeOverride; [Header("Misc Properties")] public List<string> WhitelistedObjectIDs = new List<string>(); public List<string> BlacklistedObjectIDs = new List<string>(); [NonSerialized] public List<FVRObject> generatedObjects; public void GenerateTable() { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_04aa: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d6: Unknown result type (might be due to invalid IL or missing references) generatedObjects = new List<FVRObject>(); foreach (FVRObject fvr in IM.OD.Values) { if (WhitelistedObjectIDs.Contains(fvr.ItemID)) { generatedObjects.Add(fvr); } else if (!BlacklistedObjectIDs.Contains(fvr.ItemID) && fvr.OSple && fvr.Category == Category && (Eras.Count <= 0 || Eras.Contains(fvr.TagEra)) && (Sets.Count <= 0 || Sets.Contains(fvr.TagSet)) && (CountriesOfOrigin.Count <= 0 || CountriesOfOrigin.Contains(fvr.TagFirearmCountryOfOrigin)) && (EarliestYear <= -1 || fvr.TagFirearmFirstYear >= EarliestYear) && (LatestYear <= -1 || fvr.TagFirearmFirstYear <= LatestYear) && (Sizes.Count <= 0 || Sizes.Contains(fvr.TagFirearmSize)) && (Actions.Count <= 0 || Actions.Contains(fvr.TagFirearmAction)) && (Modes.Count <= 0 || Modes.Any((OTagFirearmFiringMode o) => fvr.TagFirearmFiringModes.Contains(o))) && (ExcludedModes.Count <= 0 || !ExcludedModes.Any((OTagFirearmFiringMode o) => fvr.TagFirearmFiringModes.Contains(o))) && (FeedOptions.Count <= 0 || FeedOptions.Any((OTagFirearmFeedOption o) => fvr.TagFirearmFeedOption.Contains(o))) && (MountsAvailable.Count <= 0 || MountsAvailable.Any((OTagFirearmMount o) => fvr.TagFirearmMounts.Contains(o))) && (RoundPowers.Count <= 0 || RoundPowers.Contains(fvr.TagFirearmRoundPower)) && (Features.Count <= 0 || Features.Contains(fvr.TagAttachmentFeature)) && (MountTypes.Count <= 0 || MountTypes.Contains(fvr.TagAttachmentMount)) && (MeleeStyles.Count <= 0 || MeleeStyles.Contains(fvr.TagMeleeStyle)) && (MeleeHandedness.Count <= 0 || MeleeHandedness.Contains(fvr.TagMeleeHandedness)) && (ThrownTypes.Count <= 0 || ThrownTypes.Contains(fvr.TagThrownType)) && (ThrownDamageTypes.Count <= 0 || ThrownDamageTypes.Contains(fvr.TagThrownDamageType)) && (PowerupTypes.Count <= 0 || PowerupTypes.Contains(fvr.TagPowerupType)) && (MinAmmoCapacity <= -1 || fvr.MaxCapacityRelated >= MinAmmoCapacity) && (MaxAmmoCapacity <= -1 || fvr.MinCapacityRelated <= MaxAmmoCapacity) && (!OverrideMagType || fvr.MagazineType == MagTypeOverride) && (!OverrideRoundType || fvr.RoundType == RoundTypeOverride)) { generatedObjects.Add(fvr); } } } } [CreateAssetMenu(fileName = "New Atlas Outfit Config", menuName = "MeatKit/Gamemodes/AtlasOutfitConfig", order = 0)] public class AtlasOutfitConfigTemplate : ScriptableObject { public List<string> Headwear; public float Chance_Headwear; public List<string> Eyewear; public float Chance_Eyewear; public List<string> Facewear; public float Chance_Facewear; public List<string> Torsowear; public float Chance_Torsowear; public List<string> Pantswear; public float Chance_Pantswear; public List<string> Pantswear_Lower; public float Chance_Pantswear_Lower; public List<string> Backpacks; public float Chance_Backpacks; public SosigOutfitConfig GetOutfitConfig() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown SosigOutfitConfig val = (SosigOutfitConfig)ScriptableObject.CreateInstance(typeof(SosigOutfitConfig)); val.Chance_Headwear = Chance_Headwear; val.Headwear = Headwear.Select((string o) => IM.OD[o]).ToList(); val.Chance_Eyewear = Chance_Eyewear; val.Eyewear = Eyewear.Select((string o) => IM.OD[o]).ToList(); val.Chance_Facewear = Chance_Facewear; val.Facewear = Facewear.Select((string o) => IM.OD[o]).ToList(); val.Chance_Torsowear = Chance_Torsowear; val.Torsowear = Torsowear.Select((string o) => IM.OD[o]).ToList(); val.Chance_Pantswear = Chance_Pantswear; val.Pantswear = Pantswear.Select((string o) => IM.OD[o]).ToList(); val.Chance_Pantswear_Lower = Chance_Pantswear_Lower; val.Pantswear_Lower = Pantswear_Lower.Select((string o) => IM.OD[o]).ToList(); val.Chance_Backpacks = Chance_Backpacks; val.Backpacks = Backpacks.Select((string o) => IM.OD[o]).ToList(); return val; } } [CreateAssetMenu(fileName = "New Atlas Config", menuName = "MeatKit/Gamemodes/AtlasConfigTemplate", order = 0)] public class AtlasSosigConfigTemplate : ScriptableObject { public float ViewDistance; public float HearingDistance; public float MaxFOV; public float SearchExtentsModifier; public bool DoesAggroOnFriendlyFire; public bool HasABrain; public bool DoesDropWeaponsOnBallistic; public bool CanPickupRanged; public bool CanPickupMelee; public bool CanPickupOther; public int TargetCapacity; public float TargetTrackingTime; public float NoFreshTargetTime; public float AssaultPointOverridesSkirmishPointWhenFurtherThan; public float RunSpeed; public float WalkSpeed; public float SneakSpeed; public float CrawlSpeed; public float TurnSpeed; public float MaxJointLimit; public float MovementRotMagnitude; public float TotalMustard; public float BleedDamageMult; public float BleedRateMultiplier; public float BleedVFXIntensity; public float DamMult_Projectile; public float DamMult_Explosive; public float DamMult_Melee; public float DamMult_Piercing; public float DamMult_Blunt; public float DamMult_Cutting; public float DamMult_Thermal; public float DamMult_Chilling; public float DamMult_EMP; public List<float> LinkDamageMultipliers; public List<float> LinkStaggerMultipliers; public List<Vector2> StartingLinkIntegrity; public List<float> StartingChanceBrokenJoint; public float ShudderThreshold; public float ConfusionThreshold; public float ConfusionMultiplier; public float ConfusionTimeMax; public float StunThreshold; public float StunMultiplier; public float StunTimeMax; public bool CanBeGrabbed; public bool CanBeSevered; public bool CanBeStabbed; public bool CanBeSurpressed; public float SuppressionMult; public bool DoesJointBreakKill_Head; public bool DoesJointBreakKill_Upper; public bool DoesJointBreakKill_Lower; public bool DoesSeverKill_Head; public bool DoesSeverKill_Upper; public bool DoesSeverKill_Lower; public bool DoesExplodeKill_Head; public bool DoesExplodeKill_Upper; public bool DoesExplodeKill_Lower; public SosigConfigTemplate GetConfigTemplate() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown SosigConfigTemplate val = (SosigConfigTemplate)ScriptableObject.CreateInstance(typeof(SosigConfigTemplate)); val.ViewDistance = ViewDistance; val.HearingDistance = HearingDistance; val.MaxFOV = MaxFOV; val.SearchExtentsModifier = SearchExtentsModifier; val.DoesAggroOnFriendlyFire = DoesAggroOnFriendlyFire; val.HasABrain = HasABrain; val.DoesDropWeaponsOnBallistic = DoesDropWeaponsOnBallistic; val.CanPickup_Ranged = CanPickupRanged; val.CanPickup_Melee = CanPickupMelee; val.CanPickup_Other = CanPickupOther; val.TargetCapacity = TargetCapacity; val.TargetTrackingTime = TargetTrackingTime; val.NoFreshTargetTime = NoFreshTargetTime; val.AssaultPointOverridesSkirmishPointWhenFurtherThan = AssaultPointOverridesSkirmishPointWhenFurtherThan; val.RunSpeed = RunSpeed; val.WalkSpeed = WalkSpeed; val.SneakSpeed = SneakSpeed; val.CrawlSpeed = CrawlSpeed; val.TurnSpeed = TurnSpeed; val.MaxJointLimit = MaxJointLimit; val.MovementRotMagnitude = MovementRotMagnitude; val.TotalMustard = TotalMustard; val.BleedDamageMult = BleedDamageMult; val.BleedRateMultiplier = BleedRateMultiplier; val.BleedVFXIntensity = BleedVFXIntensity; val.DamMult_Projectile = DamMult_Projectile; val.DamMult_Explosive = DamMult_Explosive; val.DamMult_Melee = DamMult_Melee; val.DamMult_Piercing = DamMult_Piercing; val.DamMult_Blunt = DamMult_Blunt; val.DamMult_Cutting = DamMult_Cutting; val.DamMult_Thermal = DamMult_Thermal; val.DamMult_Chilling = DamMult_Chilling; val.DamMult_EMP = DamMult_EMP; val.LinkDamageMultipliers = LinkDamageMultipliers; val.LinkStaggerMultipliers = LinkStaggerMultipliers; val.StartingLinkIntegrity = StartingLinkIntegrity; val.StartingChanceBrokenJoint = StartingChanceBrokenJoint; val.ShudderThreshold = ShudderThreshold; val.ConfusionThreshold = ConfusionThreshold; val.ConfusionMultiplier = ConfusionMultiplier; val.ConfusionTimeMax = ConfusionTimeMax; val.StunThreshold = StunThreshold; val.StunMultiplier = StunMultiplier; val.StunTimeMax = StunTimeMax; val.CanBeGrabbed = CanBeGrabbed; val.CanBeSevered = CanBeSevered; val.CanBeStabbed = CanBeStabbed; val.CanBeSurpressed = CanBeSurpressed; val.SuppressionMult = SuppressionMult; val.DoesJointBreakKill_Head = DoesJointBreakKill_Head; val.DoesJointBreakKill_Upper = DoesJointBreakKill_Upper; val.DoesJointBreakKill_Lower = DoesJointBreakKill_Lower; val.DoesSeverKill_Head = DoesSeverKill_Head; val.DoesSeverKill_Upper = DoesSeverKill_Upper; val.DoesSeverKill_Lower = DoesSeverKill_Lower; val.DoesExplodeKill_Head = DoesExplodeKill_Head; val.DoesExplodeKill_Upper = DoesExplodeKill_Upper; val.DoesExplodeKill_Lower = DoesExplodeKill_Lower; val.UsesLinkSpawns = false; val.LinkSpawns = new List<FVRObject>(); val.LinkSpawnChance = new List<float>(); val.OverrideSpeech = false; return val; } } [CreateAssetMenu(fileName = "New Atlas Enemy Template", menuName = "MeatKit/Gamemodes/AtlasEnemyTemplate", order = 0)] public class AtlasSosigEnemyTemplate : ScriptableObject { public string DisplayName; public SosigEnemyCategory SosigEnemyCategory; public List<string> SosigPrefabs; public List<AtlasSosigConfigTemplate> Configs; public List<AtlasSosigConfigTemplate> ConfigsEasy; public List<AtlasOutfitConfigTemplate> OutfitConfigs; public List<string> WeaponOptions; public List<string> WeaponOptionsSecondary; public List<string> WeaponOptionsTertiary; public float SecondaryChance; public float TertiaryChance; public SosigEnemyTemplate GetSosigEnemyTemplate() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) SosigEnemyTemplate val = (SosigEnemyTemplate)ScriptableObject.CreateInstance(typeof(SosigEnemyTemplate)); val.DisplayName = DisplayName; val.SosigEnemyCategory = SosigEnemyCategory; val.SosigPrefabs = SosigPrefabs.Select((string o) => IM.OD[o]).ToList(); val.ConfigTemplates = Configs.Select((AtlasSosigConfigTemplate o) => o.GetConfigTemplate()).ToList(); val.ConfigTemplates_Easy = ConfigsEasy.Select((AtlasSosigConfigTemplate o) => o.GetConfigTemplate()).ToList(); val.OutfitConfig = OutfitConfigs.Select((AtlasOutfitConfigTemplate o) => o.GetOutfitConfig()).ToList(); val.WeaponOptions = WeaponOptions.Select((string o) => IM.OD[o]).ToList(); val.WeaponOptions_Secondary = WeaponOptionsSecondary.Select((string o) => IM.OD[o]).ToList(); val.WeaponOptions_Tertiary = WeaponOptionsTertiary.Select((string o) => IM.OD[o]).ToList(); val.SecondaryChance = SecondaryChance; val.TertiaryChance = TertiaryChance; return val; } } public class BuildableCover : MonoBehaviour { public GameObject coverGeo; public MeshRenderer areaMesh; public SphereCollider areaCollider; public bool built; private void OnTriggerEnter(Collider other) { if (built) { return; } Supplies component = ((Component)other).GetComponent<Supplies>(); if ((Object)(object)component != (Object)null) { if ((Object)(object)((FVRInteractiveObject)component).m_hand != (Object)null) { ((FVRInteractiveObject)component).ForceBreakInteraction(); } Object.Destroy((Object)(object)((Component)component).gameObject); BuildCover(); } } public void BuildCover() { built = true; coverGeo.SetActive(true); ((Collider)areaCollider).enabled = false; ((Renderer)areaMesh).enabled = false; } public void ResetCover() { built = false; coverGeo.SetActive(false); ((Collider)areaCollider).enabled = false; ((Renderer)areaMesh).enabled = false; } } public class ButtonList : MonoBehaviour { public SelectableButton buttonPrefab; public Transform buttonOrigin; public float buttonSpacing; [HideInInspector] public List<SelectableButton> buttons = new List<SelectableButton>(); public SelectableButton AddButton(string text, UnityAction onClick, bool selectable) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected