using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BoneLib;
using BoneLib.BoneMenu;
using ColVis;
using HarmonyLib;
using Il2CppSLZ.Marrow;
using MelonLoader;
using MelonLoader.Preferences;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("ColVis")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany(null)]
[assembly: AssemblyProduct("ColVis")]
[assembly: AssemblyCopyright("Created by EvroDev")]
[assembly: AssemblyTrademark(null)]
[assembly: ComVisible(false)]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: NeutralResourcesLanguage("en")]
[assembly: MelonInfo(typeof(global::ColVis.ColVis), "ColVis", "1.0.0", "EvroDev", null)]
[assembly: MelonGame(null, null)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace ColVis;
public class Bone_Menu_Creator
{
private static MelonPreferences_Category category;
public static MelonPreferences_Entry<bool> locosphereEntry;
public static MelonPreferences_Entry<bool> fenderEntry;
public static MelonPreferences_Entry<bool> kneeEntry;
public static MelonPreferences_Entry<bool> pelvisEntry;
public static MelonPreferences_Entry<bool> torsoEntry;
public static MelonPreferences_Entry<bool> armsEntry;
public static MelonPreferences_Entry<bool> handsEntry;
public static RigVisType rigVisType;
public static void OnInitialize()
{
category = MelonPreferences.CreateCategory("ColVis");
locosphereEntry = category.CreateEntry<bool>("ShowLocosphere", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
fenderEntry = category.CreateEntry<bool>("ShowFender", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
kneeEntry = category.CreateEntry<bool>("ShowLegs", true, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
pelvisEntry = category.CreateEntry<bool>("ShowPelvis", false, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
torsoEntry = category.CreateEntry<bool>("ShowTorso", false, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
armsEntry = category.CreateEntry<bool>("ShowArms", false, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
handsEntry = category.CreateEntry<bool>("ShowHands", false, (string)null, (string)null, false, false, (ValueValidator)null, (string)null);
MelonPreferences.Save();
CreateBoneMenu();
}
public static void CreateBoneMenu()
{
//IL_000b: 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_0058: 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_00cc: 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_0140: Unknown result type (might be due to invalid IL or missing references)
//IL_017a: Unknown result type (might be due to invalid IL or missing references)
//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
Page val = Page.Root.CreatePage("ColVis", Color.white, 0, true);
val.CreateBool("Show Locosphere", Color.white, locosphereEntry.Value, (Action<bool>)delegate(bool b)
{
locosphereEntry.Value = b;
PhysVis.LocosphereSetActive(b);
MelonPreferences.Save();
});
val.CreateBool("Show Fender", Color.white, fenderEntry.Value, (Action<bool>)delegate(bool b)
{
fenderEntry.Value = b;
PhysVis.FenderSetActive(b);
MelonPreferences.Save();
});
val.CreateBool("Show Legs", Color.white, kneeEntry.Value, (Action<bool>)delegate(bool b)
{
kneeEntry.Value = b;
PhysVis.LegsSetActive(b);
MelonPreferences.Save();
});
val.CreateBool("Show Pelvis", Color.white, pelvisEntry.Value, (Action<bool>)delegate(bool b)
{
pelvisEntry.Value = b;
PhysVis.PelvisSetActive(b);
MelonPreferences.Save();
});
val.CreateBool("Show Torso", Color.white, torsoEntry.Value, (Action<bool>)delegate(bool b)
{
torsoEntry.Value = b;
PhysVis.TorsoSetActive(b);
MelonPreferences.Save();
});
val.CreateBool("Show Arms", Color.white, armsEntry.Value, (Action<bool>)delegate(bool b)
{
armsEntry.Value = b;
PhysVis.ArmsSetActive(b);
MelonPreferences.Save();
});
val.CreateBool("Show Hands", Color.white, handsEntry.Value, (Action<bool>)delegate(bool b)
{
handsEntry.Value = b;
PhysVis.HandsSetActive(b);
MelonPreferences.Save();
});
val.CreateEnum("Rig Visualization", Color.white, (Enum)rigVisType, (Action<Enum>)delegate(Enum e)
{
SetRigVis((RigVisType)(object)e);
});
}
public static void SetRigVis(RigVisType type)
{
rigVisType = type;
TurnOffAllPlayerRigVis();
RigVis rigVis = default(RigVis);
switch (type)
{
case RigVisType.None:
break;
case RigVisType.ControllerRig:
if (!((Component)Player.ControllerRig).TryGetComponent<RigVis>(ref rigVis))
{
rigVis = ((Component)Player.ControllerRig).gameObject.AddComponent<RigVis>();
}
((Behaviour)rigVis).enabled = true;
break;
case RigVisType.RemapHeptaRig:
if (!((Component)Player.RemapRig).TryGetComponent<RigVis>(ref rigVis))
{
rigVis = ((Component)Player.RemapRig).gameObject.AddComponent<RigVis>();
}
((Behaviour)rigVis).enabled = true;
break;
case RigVisType.AnimationRig:
if (!((Component)Player.RigManager.animationRig).TryGetComponent<RigVis>(ref rigVis))
{
rigVis = ((Component)Player.RigManager.animationRig).gameObject.AddComponent<RigVis>();
}
((Behaviour)rigVis).enabled = true;
break;
case RigVisType.InterpRig:
if (!((Component)Player.RigManager.interpRig).TryGetComponent<RigVis>(ref rigVis))
{
rigVis = ((Component)Player.RigManager.interpRig).gameObject.AddComponent<RigVis>();
}
((Behaviour)rigVis).enabled = true;
break;
case RigVisType.VirtualHeptaRig:
if (!((Component)Player.RigManager.virtualHeptaRig).TryGetComponent<RigVis>(ref rigVis))
{
rigVis = ((Component)Player.RigManager.virtualHeptaRig).gameObject.AddComponent<RigVis>();
}
((Behaviour)rigVis).enabled = true;
break;
}
}
public static void TurnOffAllPlayerRigVis()
{
RigVis rigVis = default(RigVis);
if (((Component)Player.ControllerRig).TryGetComponent<RigVis>(ref rigVis))
{
((Behaviour)rigVis).enabled = false;
}
RigVis rigVis2 = default(RigVis);
if (((Component)Player.RemapRig).TryGetComponent<RigVis>(ref rigVis2))
{
((Behaviour)rigVis2).enabled = false;
}
RigVis rigVis3 = default(RigVis);
if (((Component)Player.RigManager.animationRig).TryGetComponent<RigVis>(ref rigVis3))
{
((Behaviour)rigVis3).enabled = false;
}
RigVis rigVis4 = default(RigVis);
if (((Component)Player.RigManager.interpRig).TryGetComponent<RigVis>(ref rigVis4))
{
((Behaviour)rigVis4).enabled = false;
}
RigVis rigVis5 = default(RigVis);
if (((Component)Player.RigManager.virtualHeptaRig).TryGetComponent<RigVis>(ref rigVis5))
{
((Behaviour)rigVis5).enabled = false;
}
}
}
[RegisterTypeInIl2Cpp]
public class BoxColVis : MonoBehaviour, IColVisBase<BoxCollider>
{
private GameObject cube;
private PrimitiveType PrimType => (PrimitiveType)3;
public BoxCollider Col { get; set; }
public GameObject Vis { get; set; }
PrimitiveType IColVisBase<BoxCollider>.PrimType => (PrimitiveType)3;
public Color VisColor => Color.white;
public BoxColVis(IntPtr ptr)
: base(ptr)
{
}
public void Awake()
{
Col = ((Component)this).GetComponent<BoxCollider>();
CreateVis();
UpdateVis();
}
public void CreateVis()
{
//IL_0003: 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_0077: 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)
Vis = GameObject.CreatePrimitive(PrimType);
Vis.GetComponent<Renderer>().material.shader = ColVis.litmas;
Object.Destroy((Object)(object)Vis.GetComponent<Collider>());
Vis.transform.parent = ((Component)this).transform;
Vis.transform.localPosition = Vector3.zero;
Vis.transform.localRotation = Quaternion.identity;
Vis.transform.localScale = Vector3.one;
}
public void Update()
{
UpdateVis();
}
public void UpdateVis()
{
//IL_0012: 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)
Vis.transform.localScale = Col.extents * 2f;
Vis.transform.localPosition = Col.center;
if (((Collider)Col).enabled)
{
Vis.SetActive(true);
}
else
{
Vis.SetActive(false);
}
}
public void SetActive(bool active)
{
Vis.SetActive(active);
((Behaviour)this).enabled = active;
}
}
[RegisterTypeInIl2Cpp]
public class CapsuleColVis : MonoBehaviour, IColVisBase<CapsuleCollider>
{
public CapsuleCollider Col { get; set; }
public GameObject Vis { get; set; }
public PrimitiveType PrimType => (PrimitiveType)1;
public Color VisColor => Color.white;
public CapsuleColVis(IntPtr ptr)
: base(ptr)
{
}
public void Awake()
{
Col = ((Component)this).GetComponent<CapsuleCollider>();
CreateVis();
UpdateVis();
}
public void Update()
{
UpdateVis();
}
public void CreateVis()
{
//IL_0003: 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_0077: 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)
Vis = GameObject.CreatePrimitive(PrimType);
Vis.GetComponent<Renderer>().material.shader = ColVis.litmas;
Object.Destroy((Object)(object)Vis.GetComponent<Collider>());
Vis.transform.parent = ((Component)this).transform;
Vis.transform.localPosition = Vector3.zero;
Vis.transform.localRotation = Quaternion.identity;
Vis.transform.localScale = Vector3.one;
}
public void UpdateVis()
{
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: 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)
if (((Collider)Col).enabled)
{
Vis.SetActive(true);
}
else
{
Vis.SetActive(false);
}
Vis.transform.localPosition = Col.center;
Vis.transform.localScale = new Vector3(Col.radius * 2f, Col.height / 2f, Col.radius * 2f);
if (Col.direction == 2)
{
Vis.transform.localRotation = Quaternion.Euler(90f, 0f, 0f);
}
}
public void SetActive(bool active)
{
Vis.SetActive(active);
((Behaviour)this).enabled = active;
}
}
public interface IColVisBase<T> where T : Collider
{
T Col { get; set; }
GameObject Vis { get; set; }
PrimitiveType PrimType { get; }
Color VisColor { get; }
void Awake();
void CreateVis();
void Update();
void UpdateVis();
void SetActive(bool active);
}
[RegisterTypeInIl2Cpp]
public class LineVis : MonoBehaviour
{
public Transform other;
public LineRenderer lineRenderer;
public LineVis(IntPtr ptr)
: base(ptr)
{
}
public void Awake()
{
lineRenderer = ((Component)this).gameObject.AddComponent<LineRenderer>();
lineRenderer.SetWidth(0.1f, 0.1f);
}
public void Update()
{
//IL_0020: 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)
if (!((Object)(object)lineRenderer == (Object)null))
{
lineRenderer.SetPosition(0, ((Component)this).transform.position);
lineRenderer.SetPosition(1, other.position);
}
}
}
public static class BuildInfo
{
public const string Name = "ColVis";
public const string Author = "EvroDev";
public const string Company = null;
public const string Version = "1.0.0";
public const string DownloadLink = null;
}
public class ColVis : MelonMod
{
public static Shader litmas;
public static Material cachedMat;
public static Texture2D dummyMAS;
public override void OnInitializeMelon()
{
//IL_0009: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Expected O, but got Unknown
//IL_001a: 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_003e: 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)
Bone_Menu_Creator.OnInitialize();
dummyMAS = new Texture2D(2, 2);
dummyMAS.SetPixel(0, 0, Color.green);
dummyMAS.SetPixel(0, 1, Color.green);
dummyMAS.SetPixel(1, 0, Color.green);
dummyMAS.SetPixel(1, 1, Color.green);
dummyMAS.Apply();
((Object)dummyMAS).hideFlags = (HideFlags)32;
}
}
[HarmonyPatch(typeof(PhysicsRig), "OnAwake")]
public static class Hb
{
public static void Postfix(PhysicsRig __instance)
{
foreach (MeshRenderer item in Object.FindObjectsOfType<MeshRenderer>())
{
if (((Object)((Renderer)item).material.shader).name == "SLZ/LitMAS/LitMAS Standard")
{
ColVis.litmas = ((Renderer)item).material.shader;
}
}
((Component)__instance).gameObject.AddComponent<PhysVis>();
}
}
[RegisterTypeInIl2Cpp]
public class MeshColVis : MonoBehaviour, IColVisBase<MeshCollider>
{
private GameObject sphere;
public PrimitiveType PrimType => (PrimitiveType)0;
public MeshCollider Col { get; set; }
public GameObject Vis { get; set; }
public Color VisColor => Color.white;
public MeshColVis(IntPtr ptr)
: base(ptr)
{
}
public void Awake()
{
Col = ((Component)this).GetComponent<MeshCollider>();
CreateVis();
UpdateVis();
}
public void CreateVis()
{
//IL_0003: 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_0077: 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)
Vis = GameObject.CreatePrimitive(PrimType);
Vis.GetComponent<Renderer>().material.shader = ColVis.litmas;
Object.Destroy((Object)(object)Vis.GetComponent<Collider>());
Vis.transform.parent = ((Component)this).transform;
Vis.transform.localPosition = Vector3.zero;
Vis.transform.localRotation = Quaternion.identity;
Vis.transform.localScale = Vector3.one;
}
public void UpdateVis()
{
if (((Collider)Col).enabled)
{
Vis.SetActive(true);
}
else
{
Vis.SetActive(false);
}
Vis.GetComponent<MeshFilter>().mesh = Col.sharedMesh;
}
public void Update()
{
UpdateVis();
}
public void SetActive(bool active)
{
Vis.SetActive(active);
((Behaviour)this).enabled = active;
}
}
[RegisterTypeInIl2Cpp]
public class PhysVis : MonoBehaviour
{
public static List<PhysVis> activeInstances = new List<PhysVis>();
public SphereColVis locosphere;
public SphereColVis fender;
public CapsuleColVis legs;
public MeshColVis pelvis;
public MeshColVis spine;
public MeshColVis chest;
public MeshColVis shoulderLf;
public MeshColVis elbowLf;
public BoxColVis handLf;
public BoxColVis fingersLf;
public MeshColVis shoulderRt;
public MeshColVis elbowRt;
public BoxColVis handRt;
public BoxColVis fingersRt;
public PhysVis(IntPtr ptr)
: base(ptr)
{
}
private void Awake()
{
PhysicsRig component = ((Component)this).GetComponent<PhysicsRig>();
if (!((Object)(object)component == (Object)null))
{
activeInstances.Add(this);
locosphere = component.feet.AddComponent<SphereColVis>();
locosphere.SetActive(Bone_Menu_Creator.locosphereEntry.Value);
fender = component.knee.AddComponent<SphereColVis>();
fender.SetActive(Bone_Menu_Creator.fenderEntry.Value);
legs = ((Component)component.kneePelvisCol).gameObject.AddComponent<CapsuleColVis>();
legs.SetActive(Bone_Menu_Creator.kneeEntry.Value);
pelvis = ((Component)((Rig)component).m_pelvis).gameObject.AddComponent<MeshColVis>();
pelvis.SetActive(Bone_Menu_Creator.pelvisEntry.Value);
spine = ((Component)((Rig)component).m_spine).gameObject.AddComponent<MeshColVis>();
spine.SetActive(Bone_Menu_Creator.torsoEntry.Value);
chest = ((Component)((Rig)component).m_chest).gameObject.AddComponent<MeshColVis>();
chest.SetActive(Bone_Menu_Creator.torsoEntry.Value);
shoulderLf = ((Component)((Rig)component).m_shoulderLf).gameObject.AddComponent<MeshColVis>();
shoulderLf.SetActive(Bone_Menu_Creator.armsEntry.Value);
shoulderRt = ((Component)((Rig)component).m_shoulderRt).gameObject.AddComponent<MeshColVis>();
shoulderRt.SetActive(Bone_Menu_Creator.armsEntry.Value);
elbowLf = ((Component)((Rig)component).m_elbowLf).gameObject.AddComponent<MeshColVis>();
elbowLf.SetActive(Bone_Menu_Creator.armsEntry.Value);
elbowRt = ((Component)((Rig)component).m_elbowRt).gameObject.AddComponent<MeshColVis>();
elbowRt.SetActive(Bone_Menu_Creator.armsEntry.Value);
handLf = ((Component)((Rig)component).m_handLf).gameObject.AddComponent<BoxColVis>();
handLf.SetActive(Bone_Menu_Creator.handsEntry.Value);
handRt = ((Component)((Rig)component).m_handRt).gameObject.AddComponent<BoxColVis>();
handRt.SetActive(Bone_Menu_Creator.handsEntry.Value);
fingersLf = ((Component)((Component)((Rig)component).m_handLf).transform.Find("l_fingers_col")).gameObject.AddComponent<BoxColVis>();
fingersLf.SetActive(Bone_Menu_Creator.handsEntry.Value);
fingersRt = ((Component)((Component)((Rig)component).m_handRt).transform.Find("r_fingers_col")).gameObject.AddComponent<BoxColVis>();
fingersRt.SetActive(Bone_Menu_Creator.handsEntry.Value);
}
}
public void OnDestroy()
{
if (activeInstances.Contains(this))
{
activeInstances.Remove(this);
}
}
public static void LocosphereSetActive(bool active)
{
foreach (PhysVis activeInstance in activeInstances)
{
activeInstance.locosphere.SetActive(active);
}
}
public static void FenderSetActive(bool active)
{
foreach (PhysVis activeInstance in activeInstances)
{
activeInstance.fender.SetActive(active);
}
}
public static void LegsSetActive(bool active)
{
foreach (PhysVis activeInstance in activeInstances)
{
activeInstance.legs.SetActive(active);
}
}
public static void PelvisSetActive(bool active)
{
foreach (PhysVis activeInstance in activeInstances)
{
activeInstance.pelvis.SetActive(active);
}
}
public static void TorsoSetActive(bool active)
{
foreach (PhysVis activeInstance in activeInstances)
{
activeInstance.spine.SetActive(active);
activeInstance.chest.SetActive(active);
}
}
public static void ArmsSetActive(bool active)
{
foreach (PhysVis activeInstance in activeInstances)
{
activeInstance.shoulderLf.SetActive(active);
activeInstance.shoulderRt.SetActive(active);
activeInstance.elbowLf.SetActive(active);
activeInstance.elbowRt.SetActive(active);
}
}
public static void HandsSetActive(bool active)
{
foreach (PhysVis activeInstance in activeInstances)
{
activeInstance.handLf.SetActive(active);
activeInstance.handRt.SetActive(active);
activeInstance.fingersLf.SetActive(active);
activeInstance.fingersRt.SetActive(active);
}
}
}
public enum RigVisType
{
None,
ControllerRig,
RemapHeptaRig,
AnimationRig,
InterpRig,
VirtualHeptaRig
}
[RegisterTypeInIl2Cpp]
public class RigVis : MonoBehaviour
{
private Rig _rig;
public List<TranVis> _tranVis = new List<TranVis>();
public RigVis(IntPtr ptr)
: base(ptr)
{
}
private void Awake()
{
_rig = ((Component)this).GetComponent<Rig>();
CreateTranVis(_rig.m_pelvis);
CreateTranVis(_rig.m_spine);
CreateTranVis(_rig.m_chest);
CreateTranVis(_rig.m_clavLf);
CreateTranVis(_rig.m_clavRt);
CreateTranVis(_rig.m_shoulderLf);
CreateTranVis(_rig.m_shoulderRt);
CreateTranVis(_rig.m_elbowLf);
CreateTranVis(_rig.m_elbowRt);
CreateTranVis(_rig.m_handLf);
CreateTranVis(_rig.m_handRt);
CreateTranVis(_rig.m_hipLf);
CreateTranVis(_rig.m_hipRt);
CreateTranVis(_rig.m_kneeLf);
CreateTranVis(_rig.m_kneeRt);
CreateTranVis(_rig.m_footLf);
CreateTranVis(_rig.m_footRt);
}
private void OnDisable()
{
foreach (TranVis tranVi in _tranVis)
{
((Behaviour)tranVi).enabled = false;
}
}
private void OnEnable()
{
foreach (TranVis tranVi in _tranVis)
{
((Behaviour)tranVi).enabled = true;
}
}
private void OnDestroy()
{
foreach (TranVis tranVi in _tranVis)
{
Object.Destroy((Object)(object)tranVi);
}
}
private void CreateTranVis(Transform t)
{
if ((Object)(object)t != (Object)null)
{
_tranVis.Add(((Component)t).gameObject.AddComponent<TranVis>());
}
}
}
[RegisterTypeInIl2Cpp]
public class SphereColVis : MonoBehaviour, IColVisBase<SphereCollider>
{
public PrimitiveType PrimType => (PrimitiveType)0;
public SphereCollider Col { get; set; }
public GameObject Vis { get; set; }
public Color VisColor => Color.white;
public SphereColVis(IntPtr ptr)
: base(ptr)
{
}
public void Awake()
{
Col = ((Component)this).GetComponent<SphereCollider>();
CreateVis();
UpdateVis();
}
public void CreateVis()
{
//IL_0003: 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_0077: 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)
Vis = GameObject.CreatePrimitive(PrimType);
Vis.GetComponent<Renderer>().material.shader = ColVis.litmas;
Object.Destroy((Object)(object)Vis.GetComponent<Collider>());
Vis.transform.parent = ((Component)this).transform;
Vis.transform.localPosition = Vector3.zero;
Vis.transform.localRotation = Quaternion.identity;
Vis.transform.localScale = Vector3.one;
}
public void Update()
{
UpdateVis();
}
public void UpdateVis()
{
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: 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_0042: Unknown result type (might be due to invalid IL or missing references)
Vis.transform.localPosition = Col.center;
Vis.transform.localScale = Vector3.one * Col.radius * 2f;
}
public void SetActive(bool active)
{
Vis.SetActive(active);
((Behaviour)this).enabled = active;
}
}
[RegisterTypeInIl2Cpp]
public class TranVis : MonoBehaviour
{
public static float Size = 0.1f;
public GameObject Vis { get; private set; }
public TranVis(IntPtr ptr)
: base(ptr)
{
}
private void Awake()
{
//IL_004b: 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_007d: 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)
Vis = GameObject.CreatePrimitive((PrimitiveType)3);
Vis.GetComponent<Renderer>().material.shader = ColVis.litmas;
Object.Destroy((Object)(object)Vis.GetComponent<BoxCollider>());
Vis.transform.position = ((Component)this).transform.position;
Vis.transform.rotation = ((Component)this).transform.rotation;
Vis.transform.localScale = Vector3.one / 20f;
}
private void OnDisable()
{
Vis.SetActive(false);
}
private void OnEnable()
{
Vis.SetActive(true);
}
private void OnDestroy()
{
Object.Destroy((Object)(object)Vis);
}
private void Update()
{
//IL_0012: 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)
Vis.transform.position = ((Component)this).transform.position;
Vis.transform.rotation = ((Component)this).transform.rotation;
}
private void FixedUpdate()
{
//IL_0012: 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)
Vis.transform.position = ((Component)this).transform.position;
Vis.transform.rotation = ((Component)this).transform.rotation;
}
}