Decompiled source of DBZUtils v6.9.1

Dragon Ball Z/DBZUtilities.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using BepInEx;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.Commando;
using EntityStates.JellyfishMonster;
using EntityStates.Merc;
using IL.RoR2;
using JetBrains.Annotations;
using KinematicCharacterController;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.RoR2;
using On.RoR2.UI;
using R2API;
using R2API.Utils;
using Rewired;
using RoR2;
using RoR2.Achievements;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using TMPro;
using ThreeEyedGames;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("Dragonyck")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyProduct("DBZUtilities")]
[assembly: AssemblyTitle("DBZUtilities")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace DBZUtils;

public static class Achievements
{
	public static UnlockableDef NewUnlockable<T>(string AchievementIdentifier, Sprite Icon, string Title, string Description) where T : BaseAchievement
	{
		string text = "ACHIEVEMENT_SURVIVOR_";
		UnlockableDef val = ScriptableObject.CreateInstance<UnlockableDef>();
		string langName = text + AchievementIdentifier + "_NAME";
		string langDesc = text + AchievementIdentifier + "_DESCRIPTION";
		LanguageAPI.Add(langName, Title);
		LanguageAPI.Add(langDesc, Description);
		Func<string> func = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2]
		{
			Language.GetString(langName),
			Language.GetString(langDesc)
		});
		Type typeFromHandle = typeof(T);
		val.cachedName = text + AchievementIdentifier + "_UNLOCKABLE_ID";
		val.getHowToUnlockString = func;
		val.getUnlockedString = func;
		val.achievementIcon = Icon;
		val.sortScore = 200;
		val.hidden = false;
		ContentAddition.AddUnlockableDef(val);
		return val;
	}
}
public class DBZAimIndicator : HuntressTracker
{
	public float maxTrackDistance = 60f;

	public float maxTrackAngle = 15f;

	public TextMeshProUGUI name;

	public TextMeshProUGUI power;

	private ChildLocator childLocator;

	private CharacterBody body;

	public SkillLocator skillLocator;

	public DBZSkillBehaviour skillBehaviour;

	public bool forceScan = false;

	private bool scanEnemies
	{
		get
		{
			if (forceScan)
			{
				return true;
			}
			if (Object.op_Implicit((Object)(object)skillLocator) && Object.op_Implicit((Object)(object)skillLocator.primary) && Object.op_Implicit((Object)(object)skillLocator.secondary) && Object.op_Implicit((Object)(object)skillLocator.utility) && Object.op_Implicit((Object)(object)skillLocator.special))
			{
				if (skillLocator.utility.HasSkillOverrideOfPriority((SkillOverridePriority)4))
				{
					return false;
				}
				SkillDef skillDef = skillLocator.primary.skillDef;
				SkillDef skillDef2 = skillLocator.secondary.skillDef;
				SkillDef skillDef3 = skillLocator.utility.skillDef;
				SkillDef skillDef4 = skillLocator.special.skillDef;
				if (((skillDef as DBZSkillDef).isAimBased && skillLocator.primary.IsReady()) || ((skillDef2 as DBZSkillDef).isAimBased && skillLocator.secondary.IsReady()) || ((skillDef3 as DBZSkillDef).isAimBased && skillLocator.utility.IsReady()) || ((skillDef4 as DBZSkillDef).isAimBased && skillLocator.special.IsReady()))
				{
					return true;
				}
			}
			return false;
		}
	}

	private void Awake()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Expected O, but got Unknown
		base.indicator = new Indicator(((Component)this).gameObject, Prefabs.scouterIndicator);
		base.maxTrackingDistance = maxTrackDistance;
		base.maxTrackingAngle = maxTrackAngle;
	}

	private void OnEnable()
	{
		((HuntressTracker)this).OnEnable();
		skillBehaviour = ((Component)this).GetComponent<DBZSkillBehaviour>();
		skillLocator = ((Component)this).GetComponent<SkillLocator>();
	}

	private void FixedUpdate()
	{
		((HuntressTracker)this).FixedUpdate();
		base.indicator.active = scanEnemies;
		if (Object.op_Implicit((Object)(object)name) && Object.op_Implicit((Object)(object)power))
		{
			((Behaviour)name).enabled = base.indicator.visible;
			((Behaviour)power).enabled = base.indicator.visible;
			if (Object.op_Implicit((Object)(object)base.trackingTarget) && Object.op_Implicit((Object)(object)base.trackingTarget.healthComponent) && Object.op_Implicit((Object)(object)base.trackingTarget.healthComponent.body) && (!Object.op_Implicit((Object)(object)body) || (Object.op_Implicit((Object)(object)body) && (Object)(object)body != (Object)(object)base.trackingTarget.healthComponent.body) || ((TMP_Text)name).text == "NoName"))
			{
				if (Object.op_Implicit((Object)(object)skillBehaviour))
				{
					skillBehaviour.target = base.trackingTarget;
				}
				UpdateInfo();
			}
		}
		else if (base.indicator != null && base.indicator.hasVisualizer)
		{
			childLocator = base.indicator.visualizerInstance.GetComponentInChildren<ChildLocator>();
			if (Object.op_Implicit((Object)(object)childLocator))
			{
				name = ((Component)childLocator.FindChild("name")).GetComponent<TextMeshProUGUI>();
				power = ((Component)childLocator.FindChild("power")).GetComponent<TextMeshProUGUI>();
			}
		}
	}

	private void UpdateInfo()
	{
		body = base.trackingTarget.healthComponent.body;
		string text = Mathf.CeilToInt(body.level * body.damage + body.maxHealth * 10f).ToString();
		string text2 = "";
		if (text.Length <= 8)
		{
			List<string> list = new List<string>();
			for (int i = 0; i < text.Length; i++)
			{
				list.Add("<sprite=" + text[i] + ">");
			}
			text2 = string.Join("", list);
		}
		else
		{
			text2 = "<sprite=10><sprite=10><sprite=10><sprite=10><sprite=10><sprite=10><sprite=10><sprite=10>";
		}
		((TMP_Text)power).SetText(text2, true);
		((TMP_Text)name).SetText(Language.GetString(base.trackingTarget.healthComponent.body.baseNameToken), true);
	}
}
public class DBZEventProjectileBehaviour : MonoBehaviour
{
	[SerializeField]
	public ProjectileSimple simple;

	[SerializeField]
	public Rigidbody rigidBody;

	[SerializeField]
	public SphereCollider collider;

	[SerializeField]
	public ObjectScaleCurve scale;

	[SerializeField]
	public GameObject ghost;

	[SerializeField]
	public ProjectileController controller;

	[SerializeField]
	public GameObject owner;

	[SerializeField]
	public CharacterBody body;

	[SerializeField]
	public ModelLocator modelLocator;

	[SerializeField]
	public DBZSkillEventHandler skillEvent;

	[SerializeField]
	public Transform parent;

	[SerializeField]
	public float damage;

	public bool addCollider = false;

	public string parentName = "sphereMuzzle";

	private bool playScaleSound;

	private bool playLaunchSound;

	public float radius = 5.8f;

	public uint scaleSound = 639080239u;

	public uint launchSound = 356987030u;

	public string loopSound = "Play_Beerus_Sphere_Projectile_Loop";

	private uint loopID;

	private uint launchID;

	public float xDirection = 0f;

	public float yDirection = 0f;

	public float zDirection = 0f;

	private void OnEnable()
	{
		loopID = Util.PlaySound(loopSound, ((Component)this).gameObject);
	}

	private void OnDisable()
	{
		AkSoundEngine.StopPlayingID(loopID);
		AkSoundEngine.StopPlayingID(launchID);
	}

	private void Update()
	{
		//IL_02f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_033f: Unknown result type (might be due to invalid IL or missing references)
		//IL_036a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0380: Unknown result type (might be due to invalid IL or missing references)
		//IL_038a: Unknown result type (might be due to invalid IL or missing references)
		if (!Object.op_Implicit((Object)(object)collider))
		{
			collider = ((Component)this).GetComponent<SphereCollider>();
		}
		if (!Object.op_Implicit((Object)(object)simple))
		{
			simple = ((Component)this).GetComponent<ProjectileSimple>();
			((Behaviour)simple).enabled = false;
		}
		if (!Object.op_Implicit((Object)(object)rigidBody))
		{
			rigidBody = ((Component)this).GetComponent<Rigidbody>();
		}
		if (!Object.op_Implicit((Object)(object)owner))
		{
			controller = ((Component)this).GetComponent<ProjectileController>();
			if (Object.op_Implicit((Object)(object)controller) && Object.op_Implicit((Object)(object)controller.Networkowner))
			{
				if (Object.op_Implicit((Object)(object)controller.ghost))
				{
					ghost = ((Component)controller.ghost).gameObject;
					scale = ghost.GetComponent<ObjectScaleCurve>();
				}
				owner = controller.owner;
				body = owner.GetComponent<CharacterBody>();
				if (Object.op_Implicit((Object)(object)body))
				{
					damage = body.damage;
					modelLocator = body.modelLocator;
					if (Object.op_Implicit((Object)(object)modelLocator) && Object.op_Implicit((Object)(object)modelLocator.modelTransform))
					{
						skillEvent = ((Component)modelLocator.modelTransform).GetComponent<DBZSkillEventHandler>();
						if (Object.op_Implicit((Object)(object)skillEvent))
						{
							skillEvent.fireSphere = false;
							skillEvent.fire = false;
							skillEvent.sphereScale = false;
							skillEvent.charge = false;
							skillEvent.hellzoneCharge = false;
							skillEvent.stopDash = false;
							skillEvent.nextState = false;
							skillEvent.dashCount = 0;
							skillEvent.fireCount = 0;
						}
						ChildLocator component = ((Component)modelLocator.modelTransform).GetComponent<ChildLocator>();
						if (Object.op_Implicit((Object)(object)component))
						{
							parent = component.FindChild(parentName);
						}
					}
				}
			}
		}
		if (Object.op_Implicit((Object)(object)skillEvent))
		{
			OnSkillEvent();
			SphereScale();
			FireSphere();
			if (Object.op_Implicit((Object)(object)collider) && !skillEvent.fireSphere)
			{
				((Collider)collider).enabled = false;
				if (!playLaunchSound)
				{
					playLaunchSound = true;
					launchID = AkSoundEngine.PostEvent(launchSound, ((Component)this).gameObject);
				}
			}
		}
		if (Object.op_Implicit((Object)(object)parent))
		{
			((Component)this).transform.position = parent.position;
		}
		if (Object.op_Implicit((Object)(object)rigidBody) && Object.op_Implicit((Object)(object)simple) && ((Behaviour)simple).enabled && yDirection != 0f && rigidBody.velocity.y != yDirection)
		{
			rigidBody.velocity = new Vector3(rigidBody.velocity.x, yDirection, rigidBody.velocity.z);
		}
	}

	protected virtual void SphereScale()
	{
		if (skillEvent.sphereScale && Object.op_Implicit((Object)(object)scale))
		{
			((Behaviour)scale).enabled = true;
			if (!playScaleSound)
			{
				playScaleSound = true;
				AkSoundEngine.PostEvent(scaleSound, ((Component)this).gameObject);
			}
		}
	}

	protected virtual void FireSphere()
	{
		if (skillEvent.fireSphere && Object.op_Implicit((Object)(object)simple))
		{
			parent = null;
			((Behaviour)simple).enabled = true;
			if (Object.op_Implicit((Object)(object)collider))
			{
				((Collider)collider).enabled = true;
				collider.radius = radius;
			}
			else if (addCollider)
			{
				((Component)this).gameObject.AddComponent<SphereCollider>().radius = radius;
			}
		}
	}

	protected virtual void OnSkillEvent()
	{
	}
}
internal class DBZPodBehaviour : MonoBehaviour
{
	private void Awake()
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Expected O, but got Unknown
		//IL_0032: 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_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		VehicleSeat component = ((Component)this).GetComponent<VehicleSeat>();
		component.onPassengerExit += Exit;
		GameObject val = new GameObject("exitPosition");
		val.transform.position = ((Component)this).transform.position + ((Component)this).transform.forward * 5f;
		component.exitPosition = val.transform;
	}

	private void Exit(GameObject obj)
	{
		Animator componentInChildren = ((Component)this).GetComponentInChildren<Animator>();
		componentInChildren.Play("Open");
	}
}
public class DBZSkillBehaviour : NetworkBehaviour
{
	public bool canExecute = true;

	public bool canExecuteSkill1 = true;

	public bool canExecuteSkill2 = true;

	public bool canExecuteSkill3 = true;

	public bool canExecuteSkill4 = true;

	internal SkillLocator skillLocator;

	internal KiBehaviour kiBehaviour;

	public float baseSecondaryCost = 0.2f;

	public float baseSpecialCost = 0.55f;

	public DBZSurvivorDef survivorDef;

	public bool lockMovement = false;

	[SyncVar]
	[SerializeField]
	public bool allowFlight;

	[SyncVar]
	[SerializeField]
	public bool isMoving;

	[SerializeField]
	[SyncVar]
	public bool inFlight;

	[SyncVar]
	[SerializeField]
	public bool isBoosted;

	[SyncVar]
	[SerializeField]
	public bool flightCancel;

	public int integer1;

	public int integer2;

	public int integer3;

	public int integer4;

	public int integer5;

	public float float1;

	public float float2;

	public float float3;

	public float float4;

	public float float5;

	public bool bool1;

	public bool bool2;

	public bool bool3;

	public bool bool4;

	public bool bool5;

	public Ray aimRay;

	public Vector3 vector1;

	public Vector3 vector2;

	public Vector3 vector3;

	public Vector3 vector4;

	public Vector3 vector5;

	public uint sound1;

	public uint sound2;

	public uint sound3;

	public uint sound4;

	public uint sound5;

	public AimRequest aimRequest;

	public GameObject vfx1;

	public GameObject vfx2;

	public GameObject vfx3;

	public GameObject vfx4;

	public GameObject vfx5;

	public HurtBox target;

	public List<ProjectileController> controlledProjectiles = new List<ProjectileController>();

	private static int kCmdCmdUpdateAllowFlight;

	private static int kCmdCmdUpdateInFlight;

	private static int kCmdCmdUpdateFlightCancel;

	public DBZSurvivorDef.VFXColor vfxColor { get; set; }

	public uint VO
	{
		get
		{
			if (Object.op_Implicit((Object)(object)survivorDef))
			{
				return survivorDef.skillVO;
			}
			return 0u;
		}
	}

	public float currentKi
	{
		get
		{
			if (Object.op_Implicit((Object)(object)kiBehaviour))
			{
				return kiBehaviour.currentKiValue;
			}
			return 0f;
		}
	}

	public bool fullKi
	{
		get
		{
			if (Object.op_Implicit((Object)(object)kiBehaviour))
			{
				return kiBehaviour.maxKi;
			}
			return false;
		}
	}

	public bool NetworkallowFlight
	{
		get
		{
			return allowFlight;
		}
		[param: In]
		set
		{
			((NetworkBehaviour)this).SetSyncVar<bool>(value, ref allowFlight, 1u);
		}
	}

	public bool NetworkisMoving
	{
		get
		{
			return isMoving;
		}
		[param: In]
		set
		{
			((NetworkBehaviour)this).SetSyncVar<bool>(value, ref isMoving, 2u);
		}
	}

	public bool NetworkinFlight
	{
		get
		{
			return inFlight;
		}
		[param: In]
		set
		{
			((NetworkBehaviour)this).SetSyncVar<bool>(value, ref inFlight, 4u);
		}
	}

	public bool NetworkisBoosted
	{
		get
		{
			return isBoosted;
		}
		[param: In]
		set
		{
			((NetworkBehaviour)this).SetSyncVar<bool>(value, ref isBoosted, 8u);
		}
	}

	public bool NetworkflightCancel
	{
		get
		{
			return flightCancel;
		}
		[param: In]
		set
		{
			((NetworkBehaviour)this).SetSyncVar<bool>(value, ref flightCancel, 16u);
		}
	}

	[Command]
	public void CmdUpdateAllowFlight(bool flag)
	{
		NetworkallowFlight = flag;
	}

	[Command]
	public void CmdUpdateInFlight(bool flag)
	{
		NetworkinFlight = flag;
	}

	[Command]
	public void CmdUpdateFlightCancel(bool flag)
	{
		NetworkflightCancel = flag;
	}

	private void Start()
	{
		skillLocator = ((Component)this).GetComponent<SkillLocator>();
		kiBehaviour = ((Component)this).GetComponent<KiBehaviour>();
		CharacterBody component = ((Component)this).GetComponent<CharacterBody>();
		if (Object.op_Implicit((Object)(object)component))
		{
			survivorDef = DBZSurvivorCatalog.FindDBZSurvivorDef(component.baseNameToken);
			vfxColor = survivorDef.vfxColor;
		}
	}

	public void DisableSkill(int skillIndex)
	{
		switch (skillIndex)
		{
		case 0:
			canExecuteSkill1 = false;
			break;
		case 1:
			canExecuteSkill2 = false;
			break;
		case 2:
			canExecuteSkill3 = false;
			break;
		case 3:
			canExecuteSkill4 = false;
			break;
		}
	}

	public void EnableSkill(int skillIndex)
	{
		switch (skillIndex)
		{
		case 0:
			canExecuteSkill1 = true;
			break;
		case 1:
			canExecuteSkill2 = true;
			break;
		case 2:
			canExecuteSkill3 = true;
			break;
		case 3:
			canExecuteSkill4 = true;
			break;
		}
	}

	public void SetExecutableSkills(int skillIndex)
	{
		switch (skillIndex)
		{
		case -2:
			canExecuteSkill1 = false;
			canExecuteSkill2 = false;
			canExecuteSkill3 = false;
			canExecuteSkill4 = false;
			break;
		case -1:
			canExecuteSkill1 = true;
			canExecuteSkill2 = true;
			canExecuteSkill3 = true;
			canExecuteSkill4 = true;
			break;
		case 0:
			canExecuteSkill1 = true;
			canExecuteSkill2 = false;
			canExecuteSkill3 = false;
			canExecuteSkill4 = false;
			break;
		case 1:
			canExecuteSkill1 = false;
			canExecuteSkill2 = true;
			canExecuteSkill3 = false;
			canExecuteSkill4 = false;
			break;
		case 2:
			canExecuteSkill1 = false;
			canExecuteSkill2 = false;
			canExecuteSkill3 = true;
			canExecuteSkill4 = false;
			break;
		case 3:
			canExecuteSkill1 = false;
			canExecuteSkill2 = false;
			canExecuteSkill3 = false;
			canExecuteSkill4 = true;
			break;
		}
	}

	private void UNetVersion()
	{
	}

	protected static void InvokeCmdCmdUpdateAllowFlight(NetworkBehaviour obj, NetworkReader reader)
	{
		if (!NetworkServer.active)
		{
			Debug.LogError((object)"Command CmdUpdateAllowFlight called on client.");
		}
		else
		{
			((DBZSkillBehaviour)(object)obj).CmdUpdateAllowFlight(reader.ReadBoolean());
		}
	}

	protected static void InvokeCmdCmdUpdateInFlight(NetworkBehaviour obj, NetworkReader reader)
	{
		if (!NetworkServer.active)
		{
			Debug.LogError((object)"Command CmdUpdateInFlight called on client.");
		}
		else
		{
			((DBZSkillBehaviour)(object)obj).CmdUpdateInFlight(reader.ReadBoolean());
		}
	}

	protected static void InvokeCmdCmdUpdateFlightCancel(NetworkBehaviour obj, NetworkReader reader)
	{
		if (!NetworkServer.active)
		{
			Debug.LogError((object)"Command CmdUpdateFlightCancel called on client.");
		}
		else
		{
			((DBZSkillBehaviour)(object)obj).CmdUpdateFlightCancel(reader.ReadBoolean());
		}
	}

	public void CallCmdUpdateAllowFlight(bool flag)
	{
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		if (!NetworkClient.active)
		{
			Debug.LogError((object)"Command function CmdUpdateAllowFlight called on server.");
			return;
		}
		if (((NetworkBehaviour)this).isServer)
		{
			CmdUpdateAllowFlight(flag);
			return;
		}
		NetworkWriter val = new NetworkWriter();
		val.Write((short)0);
		val.Write((short)5);
		val.WritePackedUInt32((uint)kCmdCmdUpdateAllowFlight);
		val.Write(((Component)this).GetComponent<NetworkIdentity>().netId);
		val.Write(flag);
		((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdUpdateAllowFlight");
	}

	public void CallCmdUpdateInFlight(bool flag)
	{
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		if (!NetworkClient.active)
		{
			Debug.LogError((object)"Command function CmdUpdateInFlight called on server.");
			return;
		}
		if (((NetworkBehaviour)this).isServer)
		{
			CmdUpdateInFlight(flag);
			return;
		}
		NetworkWriter val = new NetworkWriter();
		val.Write((short)0);
		val.Write((short)5);
		val.WritePackedUInt32((uint)kCmdCmdUpdateInFlight);
		val.Write(((Component)this).GetComponent<NetworkIdentity>().netId);
		val.Write(flag);
		((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdUpdateInFlight");
	}

	public void CallCmdUpdateFlightCancel(bool flag)
	{
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0033: Expected O, but got Unknown
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		if (!NetworkClient.active)
		{
			Debug.LogError((object)"Command function CmdUpdateFlightCancel called on server.");
			return;
		}
		if (((NetworkBehaviour)this).isServer)
		{
			CmdUpdateFlightCancel(flag);
			return;
		}
		NetworkWriter val = new NetworkWriter();
		val.Write((short)0);
		val.Write((short)5);
		val.WritePackedUInt32((uint)kCmdCmdUpdateFlightCancel);
		val.Write(((Component)this).GetComponent<NetworkIdentity>().netId);
		val.Write(flag);
		((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdUpdateFlightCancel");
	}

	static DBZSkillBehaviour()
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Expected O, but got Unknown
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Expected O, but got Unknown
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Expected O, but got Unknown
		kCmdCmdUpdateAllowFlight = 876682248;
		NetworkBehaviour.RegisterCommandDelegate(typeof(DBZSkillBehaviour), kCmdCmdUpdateAllowFlight, new CmdDelegate(InvokeCmdCmdUpdateAllowFlight));
		kCmdCmdUpdateInFlight = 1731750246;
		NetworkBehaviour.RegisterCommandDelegate(typeof(DBZSkillBehaviour), kCmdCmdUpdateInFlight, new CmdDelegate(InvokeCmdCmdUpdateInFlight));
		kCmdCmdUpdateFlightCancel = 539198971;
		NetworkBehaviour.RegisterCommandDelegate(typeof(DBZSkillBehaviour), kCmdCmdUpdateFlightCancel, new CmdDelegate(InvokeCmdCmdUpdateFlightCancel));
		NetworkCRC.RegisterBehaviour("DBZSkillBehaviour", 0);
	}

	public override bool OnSerialize(NetworkWriter writer, bool forceAll)
	{
		if (forceAll)
		{
			writer.Write(allowFlight);
			writer.Write(isMoving);
			writer.Write(inFlight);
			writer.Write(isBoosted);
			writer.Write(flightCancel);
			return true;
		}
		bool flag = false;
		if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0)
		{
			if (!flag)
			{
				writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits);
				flag = true;
			}
			writer.Write(allowFlight);
		}
		if ((((NetworkBehaviour)this).syncVarDirtyBits & 2u) != 0)
		{
			if (!flag)
			{
				writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits);
				flag = true;
			}
			writer.Write(isMoving);
		}
		if ((((NetworkBehaviour)this).syncVarDirtyBits & 4u) != 0)
		{
			if (!flag)
			{
				writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits);
				flag = true;
			}
			writer.Write(inFlight);
		}
		if ((((NetworkBehaviour)this).syncVarDirtyBits & 8u) != 0)
		{
			if (!flag)
			{
				writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits);
				flag = true;
			}
			writer.Write(isBoosted);
		}
		if ((((NetworkBehaviour)this).syncVarDirtyBits & 0x10u) != 0)
		{
			if (!flag)
			{
				writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits);
				flag = true;
			}
			writer.Write(flightCancel);
		}
		if (!flag)
		{
			writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits);
		}
		return flag;
	}

	public override void OnDeserialize(NetworkReader reader, bool initialState)
	{
		if (initialState)
		{
			allowFlight = reader.ReadBoolean();
			isMoving = reader.ReadBoolean();
			inFlight = reader.ReadBoolean();
			isBoosted = reader.ReadBoolean();
			flightCancel = reader.ReadBoolean();
			return;
		}
		int num = (int)reader.ReadPackedUInt32();
		if (((uint)num & (true ? 1u : 0u)) != 0)
		{
			allowFlight = reader.ReadBoolean();
		}
		if (((uint)num & 2u) != 0)
		{
			isMoving = reader.ReadBoolean();
		}
		if (((uint)num & 4u) != 0)
		{
			inFlight = reader.ReadBoolean();
		}
		if (((uint)num & 8u) != 0)
		{
			isBoosted = reader.ReadBoolean();
		}
		if (((uint)num & 0x10u) != 0)
		{
			flightCancel = reader.ReadBoolean();
		}
	}
}
internal class DelayedMissile : MonoBehaviour, IProjectileImpactBehavior
{
	private Rigidbody rigidBody;

	private Vector3 point;

	private ProjectileTargetComponent targetComponent;

	private bool collision;

	public void OnProjectileImpact(ProjectileImpactInfo impactInfo)
	{
		//IL_0008: 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_0039: Unknown result type (might be due to invalid IL or missing references)
		collision = true;
		if (!Object.op_Implicit((Object)(object)((Component)impactInfo.collider).GetComponent<HurtBox>()) && Object.op_Implicit((Object)(object)rigidBody))
		{
			rigidBody.AddExplosionForce(2500f, impactInfo.estimatedPointOfImpact, 5f);
		}
	}

	private void OnEnable()
	{
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: Expected O, but got Unknown
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		rigidBody = ((Component)this).GetComponent<Rigidbody>();
		rigidBody.angularDrag = 0f;
		rigidBody.drag = 15f;
		targetComponent = ((Component)this).GetComponent<ProjectileTargetComponent>();
		((Component)this).GetComponent<ProjectileSphereTargetFinder>().onNewTargetFound.AddListener(new UnityAction(OnTargetFound));
		point = ((Component)this).transform.position + ((Component)this).transform.forward * 20f;
	}

	private void OnTargetFound()
	{
		((Component)this).gameObject.AddComponent<MissileController>().maxVelocity = 70f;
	}

	private void FixedUpdate()
	{
		//IL_003d: 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_0053: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)targetComponent) && !Object.op_Implicit((Object)(object)targetComponent.target) && !collision)
		{
			((Component)this).transform.position = Vector3.Lerp(((Component)this).transform.position, point, 5f * Time.fixedDeltaTime);
		}
	}
}
internal class DelayedScreenShake : MonoBehaviour
{
	private ShakeEmitter shake;

	private float stopwatch;

	private float stopwatchD;

	private int count;

	private void OnEnable()
	{
		shake = ((Component)this).GetComponent<ShakeEmitter>();
	}

	private void FixedUpdate()
	{
		if (!Object.op_Implicit((Object)(object)shake))
		{
			return;
		}
		stopwatch += Time.fixedDeltaTime;
		if (!(stopwatch >= 1f))
		{
			return;
		}
		stopwatchD += Time.fixedDeltaTime;
		shake.radius = 15f;
		if (stopwatchD >= 0.2f)
		{
			count++;
			if (count >= 3)
			{
				Object.Destroy((Object)(object)this);
			}
			stopwatchD = 0f;
			stopwatch = 0f;
			shake.radius = 0f;
		}
	}
}
public class DoubleCrushProjectileBehaviour : MonoBehaviour
{
	public GameObject owner;

	public ProjectileSimple simple;

	public ProjectileTargetComponent target;

	public ProjectileController controller;

	public DBZSkillBehaviour behaviour;

	public float floatDuration = 0.45f;

	public float floatDistance = 2.5f;

	public Vector3 targetPosition;

	public Vector3 currentPosition;

	public float stopwatch;

	private bool playedSound;

	public uint readySound = Sounds.Play_DBZ_Common_DoubleCrush_Ready;

	public bool changedDirection;

	private void Awake()
	{
		controller = ((Component)this).GetComponent<ProjectileController>();
		simple = ((Component)this).GetComponent<ProjectileSimple>();
		target = ((Component)this).GetComponent<ProjectileTargetComponent>();
	}

	private void Start()
	{
		//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_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_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)
		currentPosition = ((Component)this).transform.position;
		targetPosition = currentPosition + Vector3.up * floatDistance;
	}

	private void FixedUpdate()
	{
		//IL_00ef: 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_011f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0125: 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_00bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
		if (!Object.op_Implicit((Object)(object)owner))
		{
			owner = controller.owner;
			if (Object.op_Implicit((Object)(object)owner))
			{
				behaviour = owner.GetComponent<DBZSkillBehaviour>();
				if (Object.op_Implicit((Object)(object)behaviour))
				{
					behaviour.controlledProjectiles.Add(controller);
				}
			}
		}
		if (((Behaviour)simple).enabled)
		{
			if (!changedDirection && Object.op_Implicit((Object)(object)target.target))
			{
				changedDirection = true;
				Transform transform = ((Component)this).transform;
				Vector3 val = ((Component)target.target).transform.position - ((Component)this).transform.position;
				transform.forward = ((Vector3)(ref val)).normalized;
			}
		}
		else if (((Component)this).transform.position != targetPosition)
		{
			stopwatch += Time.fixedDeltaTime;
			((Component)this).transform.position = Vector3.Lerp(currentPosition, targetPosition, stopwatch / floatDuration);
		}
		else if (!playedSound)
		{
			playedSound = true;
			AkSoundEngine.PostEvent(readySound, ((Component)this).gameObject);
		}
	}

	private void OnDisable()
	{
		if (behaviour.controlledProjectiles.Contains(controller))
		{
			behaviour.controlledProjectiles.Remove(controller);
		}
	}
}
internal class EnemyMarked : MonoBehaviour
{
}
internal class EnemyMarkerBehaviour : MonoBehaviour
{
	private EnemyMarked mark;

	public CharacterBody body;

	public ModelLocator modelLocator;

	public Transform modelTransform;

	public RigidbodyMotor motor;

	private void Start()
	{
		body = ((Component)this).GetComponentInParent<CharacterBody>();
		modelLocator = ((Component)this).GetComponentInParent<ModelLocator>();
		motor = ((Component)this).GetComponentInParent<RigidbodyMotor>();
		mark = ((Component)body).gameObject.AddComponent<EnemyMarked>();
	}

	private void Update()
	{
		//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_0107: Unknown result type (might be due to invalid IL or missing references)
		if (!Object.op_Implicit((Object)(object)body))
		{
			Object.Destroy((Object)(object)mark);
			Object.Destroy((Object)(object)((Component)this).gameObject);
			return;
		}
		if (!Object.op_Implicit((Object)(object)modelTransform))
		{
			modelTransform = (Object.op_Implicit((Object)(object)modelLocator) ? modelLocator.modelTransform : null);
			return;
		}
		if (Object.op_Implicit((Object)(object)((Component)this).transform.parent))
		{
			((Component)this).transform.parent = null;
		}
		((Component)this).transform.position = (Object.op_Implicit((Object)(object)motor) ? body.transform.position : modelTransform.position);
		((Component)this).transform.rotation = Quaternion.Euler(0f, Object.op_Implicit((Object)(object)motor) ? body.transform.rotation.y : modelTransform.rotation.y, 0f);
	}
}
internal class GenkidamaSuccBehaviour : MonoBehaviour
{
	private SphereSearch sphereSearch = new SphereSearch();

	public TeamFilter teamComponent;

	public float stopwatch;

	public ProjectileDamage projectileDamage;

	public DBZEventProjectileBehaviour behaviour;

	public ProjectileImpactExplosion explosion;

	public float searchDelay = 0.25f;

	public float radius = 999f;

	public int stacks = 0;

	public CharacterBody body => Object.op_Implicit((Object)(object)behaviour) ? behaviour.body : null;

	private GameObject owner => Object.op_Implicit((Object)(object)behaviour) ? behaviour.owner : null;

	private TeamIndex teamIndex => (TeamIndex)((!Object.op_Implicit((Object)(object)teamComponent)) ? 1 : ((int)teamComponent.teamIndex));

	private void OnEnable()
	{
		//IL_003d: 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_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		explosion = ((Component)this).GetComponent<ProjectileImpactExplosion>();
		projectileDamage = ((Component)this).GetComponent<ProjectileDamage>();
		teamComponent = ((Component)this).GetComponent<TeamFilter>();
		behaviour = ((Component)this).GetComponent<DBZEventProjectileBehaviour>();
		sphereSearch.origin = ((Component)this).transform.position;
		sphereSearch.radius = radius;
		sphereSearch.mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask;
	}

	private void OnDisable()
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: 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_0044: Expected O, but got Unknown
		if (Object.op_Implicit((Object)(object)explosion))
		{
			EffectManager.SpawnEffect(Prefabs.beastGenkidamaRedExplosionEffect, new EffectData
			{
				origin = ((Component)this).transform.position,
				scale = ((ProjectileExplosion)explosion).blastRadius
			}, false);
		}
	}

	private void FixedUpdate()
	{
		//IL_0079: 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_00df: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e4: 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_01b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_0205: Unknown result type (might be due to invalid IL or missing references)
		//IL_0207: Unknown result type (might be due to invalid IL or missing references)
		//IL_020c: 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_0213: Unknown result type (might be due to invalid IL or missing references)
		//IL_021b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0220: Unknown result type (might be due to invalid IL or missing references)
		//IL_0225: Unknown result type (might be due to invalid IL or missing references)
		//IL_022e: Expected O, but got Unknown
		//IL_024a: 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)
		if (!Object.op_Implicit((Object)(object)projectileDamage) || Object.op_Implicit((Object)(object)behaviour))
		{
		}
		if (Object.op_Implicit((Object)(object)explosion))
		{
			((ProjectileExplosion)explosion).blastDamageCoefficient = (float)stacks * 2.5f;
		}
		if (Object.op_Implicit((Object)(object)explosion))
		{
			((ProjectileExplosion)explosion).blastRadius = 15 + stacks * 5;
		}
		((Component)this).transform.localScale = Vector3.one * (1f + (float)stacks * 0.5f);
		stopwatch += Time.fixedDeltaTime;
		if (!(stopwatch >= searchDelay))
		{
			return;
		}
		stopwatch = 0f;
		HurtBox[] hurtBoxes = sphereSearch.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(teamIndex)).OrderCandidatesByDistance()
			.FilterCandidatesByDistinctHurtBoxEntities()
			.GetHurtBoxes();
		foreach (HurtBox val in hurtBoxes)
		{
			if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.healthComponent) && Object.op_Implicit((Object)(object)val.healthComponent.body) && !val.healthComponent.body.HasBuff(Prefabs.genkidamaDebuff) && NetworkServer.active)
			{
				val.healthComponent.body.AddTimedBuff(Prefabs.genkidamaDebuff, 10f);
				DamageInfo val2 = new DamageInfo
				{
					attacker = (Object.op_Implicit((Object)(object)owner) ? owner : null),
					inflictor = (Object.op_Implicit((Object)(object)owner) ? owner : null),
					damage = (Object.op_Implicit((Object)(object)body) ? (body.damage * 2.5f) : 0f),
					procCoefficient = 0f,
					damageType = (DamageType)0,
					damageColorIndex = (DamageColorIndex)3,
					position = ((Component)val).transform.position,
					rejected = false
				};
				val.healthComponent.TakeDamage(val2);
				GenkidamaOrb genkidamaOrb = new GenkidamaOrb
				{
					origin = ((Component)val).transform.position,
					targetObject = ((Component)this).gameObject
				};
				OrbManager.instance.AddOrb((Orb)(object)genkidamaOrb);
			}
		}
	}
}
public class KiBehaviour : NetworkBehaviour
{
	public GameObject kiBar;

	public TextMeshProUGUI currentKi;

	public TextMeshProUGUI fullKi;

	public Image barImage;

	public float maxKiValue = 1f;

	private float kiValue = 0f;

	private bool barSetupDone;

	private static readonly StringBuilder sharedStringBuilder;

	private static Color baseKiColor;

	public bool passiveRegen = true;

	public float passiveRegenValue = 0.02f;

	private float regenStopwatch;

	public float testFloat = 0.75f;

	internal Image powerupImage;

	public bool hasPowerup;

	private static int kRpcRpcResetKi;

	private static int kRpcRpcAddKi;

	private static int kRpcRpcConsumeKi;

	internal bool canRegen => regenStopwatch >= 2f;

	internal bool maxKi
	{
		get
		{
			if ((float)Mathf.RoundToInt(kiValue * 100f) >= maxKiValue * 100f)
			{
				return true;
			}
			return false;
		}
	}

	internal float currentKiValue => kiValue;

	public event Action<KiBehaviour, float> onConsumeKi;

	public void ResetKi()
	{
		regenStopwatch = 0f;
		kiValue = 0f;
	}

	[Server]
	public void ResetKiServer()
	{
		if (!NetworkServer.active)
		{
			Debug.LogWarning((object)"[Server] function 'System.Void DBZUtils.KiBehaviour::ResetKiServer()' called on client");
		}
		else
		{
			CallRpcResetKi();
		}
	}

	[ClientRpc]
	public void RpcResetKi()
	{
		ResetKi();
	}

	[Server]
	public void AddKiServer(float amount)
	{
		if (!NetworkServer.active)
		{
			Debug.LogWarning((object)"[Server] function 'System.Void DBZUtils.KiBehaviour::AddKiServer(System.Single)' called on client");
		}
		else
		{
			CallRpcAddKi(amount);
		}
	}

	[ClientRpc]
	public void RpcAddKi(float amount)
	{
		AddKi(amount);
	}

	[Server]
	public void ConsumeKiServer(float amount)
	{
		if (!NetworkServer.active)
		{
			Debug.LogWarning((object)"[Server] function 'System.Void DBZUtils.KiBehaviour::ConsumeKiServer(System.Single)' called on client");
		}
		else
		{
			CallRpcConsumeKi(amount);
		}
	}

	[ClientRpc]
	public void RpcConsumeKi(float amount)
	{
		ConsumeKi(amount);
	}

	public void AddKi(float amount)
	{
		kiValue += amount;
	}

	public void ConsumeKi(float amount)
	{
		kiValue -= amount;
		regenStopwatch = 0f;
		this.onConsumeKi?.Invoke(this, amount);
	}

	private void OnEnable()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		HUD.Update += new hook_Update(HUD_Update);
	}

	private void HUD_Update(orig_Update orig, HUD self)
	{
		//IL_0090: 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_03c2: 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)
		orig.Invoke(self);
		regenStopwatch += Time.deltaTime;
		if (passiveRegen && canRegen)
		{
			AddKi(passiveRegenValue * Time.deltaTime);
		}
		kiValue = Mathf.Clamp(kiValue, 0f, maxKiValue);
		if (Object.op_Implicit((Object)(object)barImage))
		{
			barImage.fillAmount = kiValue / maxKiValue;
			((Graphic)barImage).color = baseKiColor;
		}
		if (Object.op_Implicit((Object)(object)currentKi) && Object.op_Implicit((Object)(object)fullKi))
		{
			sharedStringBuilder.Clear().Append(Mathf.RoundToInt(kiValue * 100f));
			((TMP_Text)currentKi).SetText(sharedStringBuilder);
			((TMP_Text)fullKi).SetText((maxKiValue * 100f).ToString(), true);
		}
		if (!Object.op_Implicit((Object)(object)self.targetBodyObject) || !((Object)(object)self.targetBodyObject == (Object)(object)((Component)this).gameObject) || !Object.op_Implicit((Object)(object)self.mainUIPanel) || Object.op_Implicit((Object)(object)kiBar) || !Util.HasEffectiveAuthority(self.targetBodyObject.GetComponent<NetworkIdentity>()))
		{
			return;
		}
		HealthBar componentInChildren = self.mainUIPanel.GetComponentInChildren<HealthBar>();
		if (!Object.op_Implicit((Object)(object)componentInChildren))
		{
			return;
		}
		Image[] componentsInChildren = ((Component)componentInChildren).gameObject.GetComponentsInChildren<Image>();
		if (!barSetupDone && componentsInChildren.Length >= 4)
		{
			barSetupDone = true;
		}
		if (!barSetupDone)
		{
			return;
		}
		((Component)((Component)componentInChildren).transform.parent).GetComponent<RectTransform>().sizeDelta = new Vector2(0f, 108.2f);
		kiBar = Object.Instantiate<GameObject>(((Component)componentInChildren).gameObject, ((Component)componentInChildren).gameObject.transform.parent);
		((Object)kiBar).name = "KiBar";
		Object.Destroy((Object)(object)kiBar.GetComponent<HealthBar>());
		TextMeshProUGUI[] componentsInChildren2 = kiBar.GetComponentsInChildren<TextMeshProUGUI>();
		for (int i = 0; i < componentsInChildren2.Length; i++)
		{
			if (Object.op_Implicit((Object)(object)componentsInChildren2[i]) && Object.op_Implicit((Object)(object)((Component)componentsInChildren2[i]).gameObject))
			{
				if (((Object)((Component)componentsInChildren2[i]).gameObject).name == "CurrentHealthText")
				{
					currentKi = componentsInChildren2[i];
					((TMP_Text)currentKi).text = "0";
				}
				if (((Object)((Component)componentsInChildren2[i]).gameObject).name == "FullHealthText")
				{
					fullKi = componentsInChildren2[i];
					((TMP_Text)fullKi).SetText((maxKiValue * 100f).ToString(), true);
				}
			}
		}
		Image[] componentsInChildren3 = kiBar.GetComponentsInChildren<Image>();
		for (int j = 0; j < componentsInChildren3.Length; j++)
		{
			if (!Object.op_Implicit((Object)(object)componentsInChildren3[j]) || !Object.op_Implicit((Object)(object)((Component)componentsInChildren3[j]).gameObject))
			{
				continue;
			}
			if ((Object)(object)componentsInChildren3[j] != (Object)(object)componentsInChildren3[3] && (Object)(object)componentsInChildren3[j] != (Object)(object)componentsInChildren3[0])
			{
				Object.Destroy((Object)(object)((Component)componentsInChildren3[j]).gameObject);
			}
			if ((Object)(object)componentsInChildren3[j] == (Object)(object)componentsInChildren3[3])
			{
				barImage = componentsInChildren3[j];
				((Graphic)barImage).color = baseKiColor;
				barImage.type = (Type)3;
				barImage.fillMethod = (FillMethod)0;
				barImage.fillCenter = false;
				if (hasPowerup)
				{
					powerupImage = Object.Instantiate<GameObject>(((Component)barImage).gameObject, ((Component)barImage).transform.parent).GetComponent<Image>();
					((Object)((Component)powerupImage).gameObject).name = "PowerupBar";
					((Graphic)powerupImage).color = Color.white;
					powerupImage.sprite = Assets.MainAssetBundle.LoadAsset<Sprite>("powerupBarFill");
				}
			}
		}
	}

	private void OnDisable()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		HUD.Update -= new hook_Update(HUD_Update);
		if (Object.op_Implicit((Object)(object)kiBar))
		{
			Object.Destroy((Object)(object)kiBar);
		}
	}

	static KiBehaviour()
	{
		//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_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Expected O, but got Unknown
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Expected O, but got Unknown
		//IL_0097: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: Expected O, but got Unknown
		sharedStringBuilder = new StringBuilder();
		baseKiColor = new Color(0.2549f, 0.82353f, 0.93725f);
		kRpcRpcResetKi = -909243816;
		NetworkBehaviour.RegisterRpcDelegate(typeof(KiBehaviour), kRpcRpcResetKi, new CmdDelegate(InvokeRpcRpcResetKi));
		kRpcRpcAddKi = -499372054;
		NetworkBehaviour.RegisterRpcDelegate(typeof(KiBehaviour), kRpcRpcAddKi, new CmdDelegate(InvokeRpcRpcAddKi));
		kRpcRpcConsumeKi = -54506747;
		NetworkBehaviour.RegisterRpcDelegate(typeof(KiBehaviour), kRpcRpcConsumeKi, new CmdDelegate(InvokeRpcRpcConsumeKi));
		NetworkCRC.RegisterBehaviour("KiBehaviour", 0);
	}

	private void UNetVersion()
	{
	}

	protected static void InvokeRpcRpcResetKi(NetworkBehaviour obj, NetworkReader reader)
	{
		if (!NetworkClient.active)
		{
			Debug.LogError((object)"RPC RpcResetKi called on server.");
		}
		else
		{
			((KiBehaviour)(object)obj).RpcResetKi();
		}
	}

	protected static void InvokeRpcRpcAddKi(NetworkBehaviour obj, NetworkReader reader)
	{
		if (!NetworkClient.active)
		{
			Debug.LogError((object)"RPC RpcAddKi called on server.");
		}
		else
		{
			((KiBehaviour)(object)obj).RpcAddKi(reader.ReadSingle());
		}
	}

	protected static void InvokeRpcRpcConsumeKi(NetworkBehaviour obj, NetworkReader reader)
	{
		if (!NetworkClient.active)
		{
			Debug.LogError((object)"RPC RpcConsumeKi called on server.");
		}
		else
		{
			((KiBehaviour)(object)obj).RpcConsumeKi(reader.ReadSingle());
		}
	}

	public void CallRpcResetKi()
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Expected O, but got Unknown
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		if (!NetworkServer.active)
		{
			Debug.LogError((object)"RPC Function RpcResetKi called on client.");
			return;
		}
		NetworkWriter val = new NetworkWriter();
		val.Write((short)0);
		val.Write((short)2);
		val.WritePackedUInt32((uint)kRpcRpcResetKi);
		val.Write(((Component)this).GetComponent<NetworkIdentity>().netId);
		((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcResetKi");
	}

	public void CallRpcAddKi(float amount)
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Expected O, but got Unknown
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		if (!NetworkServer.active)
		{
			Debug.LogError((object)"RPC Function RpcAddKi called on client.");
			return;
		}
		NetworkWriter val = new NetworkWriter();
		val.Write((short)0);
		val.Write((short)2);
		val.WritePackedUInt32((uint)kRpcRpcAddKi);
		val.Write(((Component)this).GetComponent<NetworkIdentity>().netId);
		val.Write(amount);
		((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcAddKi");
	}

	public void CallRpcConsumeKi(float amount)
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Expected O, but got Unknown
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		if (!NetworkServer.active)
		{
			Debug.LogError((object)"RPC Function RpcConsumeKi called on client.");
			return;
		}
		NetworkWriter val = new NetworkWriter();
		val.Write((short)0);
		val.Write((short)2);
		val.WritePackedUInt32((uint)kRpcRpcConsumeKi);
		val.Write(((Component)this).GetComponent<NetworkIdentity>().netId);
		val.Write(amount);
		((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcConsumeKi");
	}

	public override bool OnSerialize(NetworkWriter writer, bool forceAll)
	{
		bool result = default(bool);
		return result;
	}

	public override void OnDeserialize(NetworkReader reader, bool initialState)
	{
	}
}
internal class LightColorChange : MonoBehaviour
{
	private Light light;

	private void Update()
	{
		//IL_0029: 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_0061: Unknown result type (might be due to invalid IL or missing references)
		if (!Object.op_Implicit((Object)(object)light))
		{
			light = ((Component)this).GetComponentInChildren<Light>();
		}
		else if (light.color != new Color(0.97255f, 0.93725f, 0.75686f))
		{
			light.color = new Color(0.97255f, 0.93725f, 0.75686f);
		}
	}
}
public class LingerProjectileBehaviour : MonoBehaviour
{
	private float stopwatch;

	public float fireFrequency = 0.5f;

	public bool fireOnEnable = false;

	private bool firedOnEnable;

	public GameObject dotPrefab = Prefabs.deathSlashDotZone;

	private ProjectileController projectileController;

	private ProjectileDamage projectileDamage;

	private void OnEnable()
	{
	}

	private void FixedUpdate()
	{
		//IL_0092: Unknown result type (might be due to invalid IL or missing references)
		//IL_0097: 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_0159: Unknown result type (might be due to invalid IL or missing references)
		if (!Object.op_Implicit((Object)(object)projectileController) || !Object.op_Implicit((Object)(object)projectileDamage))
		{
			projectileController = ((Component)this).GetComponent<ProjectileController>();
			projectileDamage = ((Component)this).GetComponent<ProjectileDamage>();
		}
		if (Object.op_Implicit((Object)(object)projectileController) && Object.op_Implicit((Object)(object)projectileDamage) && fireOnEnable && !firedOnEnable)
		{
			firedOnEnable = true;
			if (NetworkServer.active)
			{
				ProjectileManager.instance.FireProjectile(dotPrefab, ((Component)this).transform.position, Quaternion.identity, Object.op_Implicit((Object)(object)projectileController) ? projectileController.owner : null, Object.op_Implicit((Object)(object)projectileDamage) ? projectileDamage.damage : 1f, 0f, false, (DamageColorIndex)10, (GameObject)null, 0f);
			}
		}
		stopwatch += Time.fixedDeltaTime;
		if (stopwatch >= fireFrequency && Object.op_Implicit((Object)(object)projectileController) && Object.op_Implicit((Object)(object)projectileDamage))
		{
			stopwatch = 0f;
			if (NetworkServer.active)
			{
				ProjectileManager.instance.FireProjectile(dotPrefab, ((Component)this).transform.position, Quaternion.identity, projectileController.owner, projectileDamage.damage, 0f, false, (DamageColorIndex)10, (GameObject)null, 0f);
			}
		}
	}
}
internal class LobbyDisabler : MonoBehaviour
{
	private GameObject lobby;

	public Scene scene;

	private void OnEnable()
	{
	}

	private void FixedUpdate()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		_ = scene;
		if (((Scene)(ref scene)).rootCount > 10)
		{
			lobby = GameObject.Find("DefaultLobbyBackground(Clone)");
			if (Object.op_Implicit((Object)(object)lobby))
			{
				lobby.SetActive(false);
			}
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}
	}
}
[RequireComponent(typeof(ProjectileTargetComponent))]
[RequireComponent(typeof(ProjectileSimple))]
public class MoveTowardsTarget : MonoBehaviour
{
	private ProjectileTargetComponent targetComponent;

	private ProjectileSimple projectileSimple;

	private void Start()
	{
		targetComponent = ((Component)this).GetComponent<ProjectileTargetComponent>();
		projectileSimple = ((Component)this).GetComponent<ProjectileSimple>();
	}

	private void Update()
	{
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_004f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0065: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)projectileSimple) && Object.op_Implicit((Object)(object)targetComponent) && Object.op_Implicit((Object)(object)targetComponent.target))
		{
			((Component)this).transform.position = Vector3.MoveTowards(((Component)this).transform.position, targetComponent.target.position, projectileSimple.desiredForwardSpeed * Time.deltaTime);
		}
	}
}
internal class PostSpawnEffectScale : MonoBehaviour
{
	public Vector3 scale;

	private void OnEnable()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		((Component)this).transform.localScale = scale;
	}
}
public class PowerupController : NetworkBehaviour
{
	[SerializeField]
	private CharacterMaster master;

	[SerializeField]
	private Image powerupImage;

	[SerializeField]
	private float powerupValue = 0f;

	public DBZSurvivorDef dbzDef;

	[SerializeField]
	private KiBehaviour kiBehaviour;

	[SerializeField]
	public int powerupCount;

	[SerializeField]
	private GameObject bodyPrefab;

	[SerializeField]
	private string bodyPrefabName;

	public GameObject powerupVFX;

	public AimRequest aimRequest;

	private int enemiesKilled = 0;

	public uint primaryVariant = 0u;

	public uint secondaryVariant = 0u;

	public uint utilityVariant = 0u;

	public uint specialVariant = 0u;

	private bool noPowerup;

	private static int kRpcRpcAddPowerupClient;

	public uint powerupSound { get; set; }

	private float spentKiCoefficient => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.spentKiCoefficient : 0f;

	public float baseKillCoefficient => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.baseKillCoefficient : 0f;

	public float regularKillCoefficient => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.regularKillCoefficient : 0f;

	public float eliteKillCoefficient => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.eliteKillCoefficient : 0f;

	public float bossKillCoefficient => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.bossKillCoefficient : 0f;

	public float baseItemCoefficient => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.baseItemCoefficient : 0f;

	public float whiteItemCoefficient => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.whiteItemCoefficient : 0f;

	public float greenItemCoefficient => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.greenItemCoefficient : 0f;

	public float bossItemCoefficient => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.bossItemCoefficient : 0f;

	public float redItemCoefficient => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.redItemCoefficient : 0f;

	public float lunarItemMaxCoefficient => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.lunarItemMaxCoefficient : 0f;

	public float moddedTierItemCoefficient => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.moddedTierItemCoefficient : 0f;

	public float baseDamageDealtCoefficient => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.baseDamageDealtCoefficient : 0f;

	public float baseDamageTakenCoefficient => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.baseDamageDealtCoefficient : 0f;

	public int requiredKillsForBonus => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.requiredKillsForBonus : 0;

	public float bonusBasedOnRequiredKills => Object.op_Implicit((Object)(object)dbzDef) ? dbzDef.memory.bonusBasedOnRequiredKills : 0f;

	private CharacterBody body => Object.op_Implicit((Object)(object)master) ? master.GetBody() : null;

	public void SetSkillVariant()
	{
		//IL_006c: 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_00d0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0102: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)dbzDef) && Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)master) && primaryVariant == 0)
		{
			SkillLocator skillLocator = body.skillLocator;
			primaryVariant = master.loadout.bodyLoadoutManager.GetSkillVariant(body.bodyIndex, skillLocator.GetSkillSlotIndex(skillLocator.primary));
			secondaryVariant = master.loadout.bodyLoadoutManager.GetSkillVariant(body.bodyIndex, skillLocator.GetSkillSlotIndex(skillLocator.secondary));
			utilityVariant = master.loadout.bodyLoadoutManager.GetSkillVariant(body.bodyIndex, skillLocator.GetSkillSlotIndex(skillLocator.utility));
			specialVariant = master.loadout.bodyLoadoutManager.GetSkillVariant(body.bodyIndex, skillLocator.GetSkillSlotIndex(skillLocator.special));
		}
	}

	private void OnEnable()
	{
		master = ((Component)this).GetComponent<CharacterMaster>();
	}

	private void FixedUpdate()
	{
		if (Object.op_Implicit((Object)(object)master) && Object.op_Implicit((Object)(object)body))
		{
			if (!string.IsNullOrEmpty(bodyPrefabName) && Object.op_Implicit((Object)(object)bodyPrefab) && (Object)(object)master.bodyPrefab != (Object)(object)bodyPrefab && NetworkServer.active)
			{
				master.TransformBody(bodyPrefabName);
			}
			if (!Object.op_Implicit((Object)(object)dbzDef))
			{
				if (!DBZSurvivorCatalog.RegisteredDBZSurvivor(body.baseNameToken))
				{
					Object.Destroy((Object)(object)this);
				}
				dbzDef = DBZSurvivorCatalog.FindDBZSurvivorDef(body.baseNameToken);
				if (Object.op_Implicit((Object)(object)dbzDef))
				{
					if (dbzDef.powerupBodyList == null || dbzDef.powerupBodyList.Count == 0)
					{
					}
					if (dbzDef.powerupBodyList != null)
					{
						powerupCount = dbzDef.powerupBodyList.Count - 1;
					}
					else
					{
						noPowerup = true;
					}
				}
			}
			if (powerupValue >= 1f && Object.op_Implicit((Object)(object)dbzDef) && Object.op_Implicit((Object)(object)body.skillLocator) && Object.op_Implicit((Object)(object)body.skillLocator.utility) && !body.skillLocator.utility.HasSkillOverrideOfPriority((SkillOverridePriority)4) && !noPowerup)
			{
				if (Util.HasEffectiveAuthority(((Component)body).gameObject))
				{
					AkSoundEngine.PostEvent(Sounds.Play_DBZ_Common_MaxGauge, ((Component)body).gameObject);
				}
				Chat.AddMessage("Powerup available for " + Language.GetString(body.baseNameToken));
				body.skillLocator.utility.SetSkillOverride((object)this, DBZSurvivors.powerupSkillDef, (SkillOverridePriority)4);
			}
			if (!Object.op_Implicit((Object)(object)kiBehaviour))
			{
				kiBehaviour = master.bodyInstanceObject.GetComponent<KiBehaviour>();
			}
			else if (!Object.op_Implicit((Object)(object)powerupImage) && Object.op_Implicit((Object)(object)kiBehaviour.powerupImage))
			{
				powerupImage = kiBehaviour.powerupImage;
				kiBehaviour.onConsumeKi += KiConsumed;
			}
		}
		if (Object.op_Implicit((Object)(object)powerupImage))
		{
			powerupImage.fillAmount = powerupValue;
		}
	}

	public void EndPowerup()
	{
		AkSoundEngine.StopPlayingID(powerupSound);
		if (Object.op_Implicit((Object)(object)powerupVFX))
		{
			Object.Destroy((Object)(object)powerupVFX);
		}
		if ((Object.op_Implicit((Object)(object)dbzDef) && dbzDef.powerupBodyList == null) || dbzDef.powerupBodyList.Count == 0)
		{
			Object.Destroy((Object)(object)this);
		}
	}

	public void TransformBody()
	{
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		if (!Object.op_Implicit((Object)(object)dbzDef) || !Object.op_Implicit((Object)(object)master) || !Object.op_Implicit((Object)(object)body))
		{
			return;
		}
		List<string> powerupBodyList = dbzDef.powerupBodyList;
		string bodyName = BodyCatalog.GetBodyName(body.bodyIndex);
		if (!powerupBodyList.Contains(bodyName))
		{
			return;
		}
		int num = powerupBodyList.IndexOf(bodyName);
		if (!string.IsNullOrEmpty(powerupBodyList[num + 1]))
		{
			if (powerupValue - 1f < 0f)
			{
				powerupValue = 0f;
			}
			else
			{
				powerupValue -= 1f;
			}
			body.skillLocator.utility.UnsetSkillOverride((object)this, DBZSurvivors.powerupSkillDef, (SkillOverridePriority)4);
			bodyPrefab = BodyCatalog.FindBodyPrefab(powerupBodyList[num + 1]);
			bodyPrefabName = powerupBodyList[num + 1];
			if (NetworkServer.active)
			{
				master.TransformBody(powerupBodyList[num + 1]);
			}
			dbzDef = DBZSurvivorCatalog.FindDBZSurvivorDef(powerupBodyList[num + 1]);
		}
	}

	public void AddDamageTakenPowerup(float amount)
	{
		AddPowerupValue(amount * baseDamageTakenCoefficient * (float)powerupCount);
	}

	public void AddDamageDealtPowerup(float amount)
	{
		AddPowerupValue(amount * baseDamageDealtCoefficient * (float)powerupCount);
	}

	public void AddKillPowerup(int index)
	{
		if (enemiesKilled >= requiredKillsForBonus)
		{
			AddPowerupValue(bonusBasedOnRequiredKills * (float)powerupCount);
			enemiesKilled = 0;
		}
		enemiesKilled++;
		switch (index)
		{
		case 1:
			AddPowerupValue(baseKillCoefficient * regularKillCoefficient * (float)powerupCount);
			break;
		case 2:
			AddPowerupValue(baseKillCoefficient * eliteKillCoefficient * (float)powerupCount);
			break;
		case 3:
			AddPowerupValue(baseKillCoefficient * bossKillCoefficient * (float)powerupCount);
			break;
		}
	}

	public void AddPowerupValue(float amount)
	{
		if (NetworkServer.active)
		{
			AddPowerup(amount);
			CallRpcAddPowerupClient(amount);
		}
	}

	private void AddPowerup(float amount)
	{
		if (Object.op_Implicit((Object)(object)body) && Util.HasEffectiveAuthority(((Component)body).gameObject))
		{
			powerupValue += amount;
		}
	}

	[ClientRpc]
	public void RpcAddPowerupClient(float amount)
	{
		AddPowerup(amount);
	}

	private void KiConsumed(KiBehaviour self, float amount)
	{
		AddPowerupValue(amount * spentKiCoefficient * (float)powerupCount);
	}

	private void UNetVersion()
	{
	}

	protected static void InvokeRpcRpcAddPowerupClient(NetworkBehaviour obj, NetworkReader reader)
	{
		if (!NetworkClient.active)
		{
			Debug.LogError((object)"RPC RpcAddPowerupClient called on server.");
		}
		else
		{
			((PowerupController)(object)obj).RpcAddPowerupClient(reader.ReadSingle());
		}
	}

	public void CallRpcAddPowerupClient(float amount)
	{
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Expected O, but got Unknown
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		if (!NetworkServer.active)
		{
			Debug.LogError((object)"RPC Function RpcAddPowerupClient called on client.");
			return;
		}
		NetworkWriter val = new NetworkWriter();
		val.Write((short)0);
		val.Write((short)2);
		val.WritePackedUInt32((uint)kRpcRpcAddPowerupClient);
		val.Write(((Component)this).GetComponent<NetworkIdentity>().netId);
		val.Write(amount);
		((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcAddPowerupClient");
	}

	static PowerupController()
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Expected O, but got Unknown
		kRpcRpcAddPowerupClient = -509362596;
		NetworkBehaviour.RegisterRpcDelegate(typeof(PowerupController), kRpcRpcAddPowerupClient, new CmdDelegate(InvokeRpcRpcAddPowerupClient));
		NetworkCRC.RegisterBehaviour("PowerupController", 0);
	}

	public override bool OnSerialize(NetworkWriter writer, bool forceAll)
	{
		bool result = default(bool);
		return result;
	}

	public override void OnDeserialize(NetworkReader reader, bool initialState)
	{
	}
}
internal class RadarBehaviour : MonoBehaviour
{
	[SerializeField]
	private GameObject radar;

	[SerializeField]
	private CharacterBody body;

	private bool enableRadar = true;

	public KiBehaviour kiBehaviour;

	private Player player;

	private ChildLocator childLocator;

	private Transform radarCamera;

	private CameraRigController camera;

	private bool isAuthority => Util.HasEffectiveAuthority(((Component)this).gameObject);

	private void Awake()
	{
		kiBehaviour = ((Component)this).GetComponent<KiBehaviour>();
	}

	private void OnEnable()
	{
		//IL_006f: 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_00af: 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_00db: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
		body = ((Component)this).GetComponent<CharacterBody>();
		LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser();
		NetworkUser val = ((firstLocalUser != null) ? firstLocalUser.currentNetworkUser : null);
		if (Object.op_Implicit((Object)(object)val) && val.inputPlayer != null)
		{
			player = val.inputPlayer;
		}
		foreach (CharacterBody readOnlyInstances in CharacterBody.readOnlyInstancesList)
		{
			if (isAuthority && readOnlyInstances.teamComponent.teamIndex != body.teamComponent.teamIndex)
			{
				GameObject val2 = Object.Instantiate<GameObject>(readOnlyInstances.isBoss ? Prefabs.bossMarker : Prefabs.enemyMarker, readOnlyInstances.transform.position, Quaternion.identity);
				val2.transform.parent = readOnlyInstances.transform;
				val2.transform.localPosition = Vector3.zero;
				val2.transform.localScale = Vector3.one * 20f;
			}
		}
		CharacterBody.onBodyStartGlobal += CharacterBody_onBodyStartGlobal;
	}

	private void OnDisable()
	{
		if (Object.op_Implicit((Object)(object)radar))
		{
			Object.Destroy((Object)(object)radar);
		}
		if (Object.op_Implicit((Object)(object)radarCamera))
		{
			Object.Destroy((Object)(object)((Component)radarCamera.parent).gameObject);
		}
		CharacterBody.onBodyStartGlobal -= CharacterBody_onBodyStartGlobal;
	}

	private void CharacterBody_onBodyStartGlobal(CharacterBody characterBody)
	{
		//IL_000f: 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_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)
		//IL_007e: 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_0099: Unknown result type (might be due to invalid IL or missing references)
		if (isAuthority && characterBody.teamComponent.teamIndex != body.teamComponent.teamIndex && !Object.op_Implicit((Object)(object)((Component)characterBody).GetComponent<EnemyMarked>()))
		{
			GameObject val = Object.Instantiate<GameObject>(characterBody.isBoss ? Prefabs.bossMarker : Prefabs.enemyMarker, characterBody.transform.position, Quaternion.identity);
			val.transform.parent = characterBody.transform;
			val.transform.localPosition = Vector3.zero;
			val.transform.localScale = Vector3.one * 20f;
		}
	}

	private void Update()
	{
		//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_016b: 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_0203: 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_0217: 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)
		if (PauseManager.isPaused)
		{
			return;
		}
		if (Object.op_Implicit((Object)(object)body) && !Object.op_Implicit((Object)(object)camera) && isAuthority)
		{
			foreach (CameraRigController instances in CameraRigController.instancesList)
			{
				if ((Object)(object)instances.target == (Object)(object)((Component)this).gameObject)
				{
					camera = instances;
				}
			}
			if (Object.op_Implicit((Object)(object)camera))
			{
				Camera sceneCam = camera.sceneCam;
				sceneCam.cullingMask &= -134217729;
			}
		}
		if (!Object.op_Implicit((Object)(object)radar) && Object.op_Implicit((Object)(object)kiBehaviour) && Object.op_Implicit((Object)(object)kiBehaviour.kiBar) && isAuthority)
		{
			radar = Object.Instantiate<GameObject>(Assets.MainAssetBundle.LoadAsset<GameObject>("Minimap"), kiBehaviour.kiBar.transform.parent.parent);
			radar.transform.localPosition = Vector2.op_Implicit(MainPlugin.radarPosition.Value);
			radar.transform.localScale = new Vector3(0.7f, 0.7f, 0.7f);
			childLocator = radar.GetComponent<ChildLocator>();
			Transform val = childLocator.FindChild("camera");
			val.parent = body.transform;
			((Component)val).transform.localPosition = Vector3.zero;
			radarCamera = val.GetChild(0);
		}
		if (isAuthority && Object.op_Implicit((Object)(object)radarCamera))
		{
			radarCamera.localRotation = Quaternion.Euler(90f, Util.QuaternionSafeLookRotation(body.inputBank.aimDirection).y, 0f);
			if (Input.GetKeyDown(MainPlugin.radarToggleKey.Value) || player.GetButtonDown(101))
			{
				enableRadar = !enableRadar;
				radar.SetActive(enableRadar);
			}
		}
	}
}
public class ScaleCurve : ObjectScaleCurve
{
	public TrailRenderer[] trails;

	public List<float> baseTrailWidth = new List<float>();

	private void Awake()
	{
		((ObjectScaleCurve)this).Awake();
		TrailRenderer[] array = trails;
		foreach (TrailRenderer val in array)
		{
			baseTrailWidth.Add(val.widthMultiplier);
		}
	}

	public void Update()
	{
		((ObjectScaleCurve)this).Update();
		for (int i = 0; i < trails.Length; i++)
		{
			trails[i].widthMultiplier = base.overallCurve.Evaluate(((ObjectScaleCurve)this).time) * baseTrailWidth[i];
		}
	}
}
public class ScaleParticleSystemDurationDestroy : MonoBehaviour
{
	public ParticleSystem[] particleSystems;

	public float speed;

	private float stopwatch;

	private void Start()
	{
		//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)
		ParticleSystem[] array = particleSystems;
		foreach (ParticleSystem val in array)
		{
			MainModule main = val.main;
			((MainModule)(ref main)).simulationSpeed = speed;
		}
	}

	private void FixedUpdate()
	{
		stopwatch += Time.fixedDeltaTime;
		if (stopwatch >= 1f / speed)
		{
			Object.Destroy((Object)(object)((Component)this).gameObject);
		}
	}
}
internal class ShieldOrbCollision : MonoBehaviour
{
	public uint startSFX = Sounds.Play_DBZ_Common_EnergyOrb_Start;

	public uint hitSFX = Sounds.Play_DBZ_Common_EnergyOrb_Hit;

	public uint endSFX = Sounds.Play_DBZ_Common_EnergyOrb_End;

	private void OnCollisionEnter(Collision collision)
	{
		if (Object.op_Implicit((Object)(object)collision.collider) && ((Component)collision.collider).gameObject.layer == LayerIndex.projectile.intVal)
		{
			AkSoundEngine.PostEvent(hitSFX, ((Component)this).gameObject);
		}
	}

	private void OnEnable()
	{
		AkSoundEngine.PostEvent(startSFX, ((Component)this).gameObject);
	}

	private void OnDisable()
	{
		AkSoundEngine.PostEvent(endSFX, ((Component)this).gameObject);
	}
}
public class DBZSkillEventHandler : MonoBehaviour
{
	public int fireCount = 0;

	public int dashCount = 0;

	public bool stopDash;

	public bool fire;

	public string childName;

	public bool detonateHellzone;

	public bool hellzoneCharge;

	public bool sphereScale;

	public bool fireSphere;

	public bool nextState;

	public bool charge;

	public bool endFire;

	public string hitBoxGroupName;

	public float damageCoefficient;

	public bool newAttack;

	public bool fireAttack = false;

	public bool teleport = false;

	public bool release = false;

	public bool end = false;

	public bool updateDamage = false;

	public void End()
	{
		end = true;
	}

	public void Release()
	{
		release = true;
	}

	public void Teleport()
	{
		teleport = true;
	}

	public void NewAttack(float damage)
	{
		damageCoefficient = damage;
		newAttack = true;
	}

	public void FireAttack()
	{
		fireAttack = !fireAttack;
	}

	public void ChargeDamage()
	{
		charge = true;
		updateDamage = true;
	}

	public void ChargeMuzzle(string muzzle)
	{
		charge = true;
		childName = muzzle;
	}

	public void Charge()
	{
		charge = true;
	}

	public void State()
	{
		nextState = true;
	}

	public void Dash()
	{
		dashCount++;
	}

	public void StopDash()
	{
		stopDash = true;
	}

	public void SphereScale()
	{
		sphereScale = true;
	}

	public void EndFire()
	{
		endFire = true;
	}

	public void FireSphere()
	{
		fireSphere = true;
	}

	public void FireBool()
	{
		fire = true;
	}

	public void Fire(string s)
	{
		childName = s;
		fireCount++;
	}

	public void FireSequence(string s)
	{
		childName = s;
		fire = true;
	}

	public void DetonateHellzone()
	{
		detonateHellzone = true;
	}

	public void ChargeEffect2h()
	{
		hellzoneCharge = true;
	}
}
public class SkillSwitchBehaviour : MonoBehaviour
{
	private CharacterBody body;

	private DBZSkillBehaviour skillBehaviour;

	private GameObject switchUIRoot;

	public List<SkillDef> primarySkillDefList;

	public List<SkillDef> secondarySkillDefList;

	public List<SkillDef> utilitySkillDefList;

	public List<SkillDef> specialSkillDefList;

	private Player player;

	private bool hasPrimarySwitch
	{
		get
		{
			if (primarySkillDefList != null && primarySkillDefList.Count >= 1)
			{
				return true;
			}
			return false;
		}
	}

	private bool hasSecondarySwitch
	{
		get
		{
			if (secondarySkillDefList != null && secondarySkillDefList.Count >= 1)
			{
				return true;
			}
			return false;
		}
	}

	private bool hasUtilitySwitch
	{
		get
		{
			if (utilitySkillDefList != null && utilitySkillDefList.Count >= 1)
			{
				return true;
			}
			return false;
		}
	}

	private bool hasSpecialSwitch
	{
		get
		{
			if (specialSkillDefList != null && specialSkillDefList.Count >= 1)
			{
				return true;
			}
			return false;
		}
	}

	private void OnEnable()
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Expected O, but got Unknown
		body = ((Component)this).GetComponent<CharacterBody>();
		skillBehaviour = ((Component)this).GetComponent<DBZSkillBehaviour>();
		HUD.Update += new hook_Update(HUD_Update);
		LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser();
		NetworkUser val = ((firstLocalUser != null) ? firstLocalUser.currentNetworkUser : null);
		if (Object.op_Implicit((Object)(object)val) && val.inputPlayer != null)
		{
			player = val.inputPlayer;
		}
	}

	private void HUD_Update(orig_Update orig, HUD self)
	{
		//IL_008e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0191: Unknown result type (might be due to invalid IL or missing references)
		//IL_019b: Expected O, but got Unknown
		//IL_01d1: 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_0207: Unknown result type (might be due to invalid IL or missing references)
		orig.Invoke(self);
		if (!Object.op_Implicit((Object)(object)self.targetBodyObject) || !((Object)(object)self.targetBodyObject == (Object)(object)((Component)this).gameObject) || !Object.op_Implicit((Object)(object)self.skillIcons[3]) || !Util.HasEffectiveAuthority(self.targetBodyObject.GetComponent<NetworkIdentity>()))
		{
			return;
		}
		GameObject gameObject = ((Component)self.skillIcons[3]).gameObject;
		if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.skillLocator) && (Input.GetKeyDown(MainPlugin.skillSwitchToggle.Value) || player.GetButtonDown(100)))
		{
			if (hasPrimarySwitch)
			{
				Swap(primarySkillDefList, body.skillLocator.primary);
			}
			if (hasSecondarySwitch)
			{
				Swap(secondarySkillDefList, body.skillLocator.secondary);
			}
			if (hasUtilitySwitch)
			{
				Swap(utilitySkillDefList, body.skillLocator.utility);
			}
			if (hasSpecialSwitch)
			{
				Swap(specialSkillDefList, body.skillLocator.special);
			}
		}
		if (!Object.op_Implicit((Object)(object)switchUIRoot))
		{
			switchUIRoot = new GameObject("SwitchUIContainer", new Type[1] { typeof(RectTransform) });
			switchUIRoot.transform.SetParent(gameObject.transform.parent);
			switchUIRoot.transform.localPosition = new Vector3(0f, 150f, 0f);
			switchUIRoot.transform.localScale = Vector3.one;
			switchUIRoot.GetComponent<RectTransform>().sizeDelta = new Vector2(500f, 0f);
			switchUIRoot.AddComponent<CanvasRenderer>();
			HorizontalLayoutGroup val = switchUIRoot.AddComponent<HorizontalLayoutGroup>();
			((HorizontalOrVerticalLayoutGroup)val).spacing = 160f;
			if (hasPrimarySwitch)
			{
				GameObject val2 = CreateNewContainer("PrimarySwitchContainer");
				CreateSwitchUIElement(primarySkillDefList, gameObject, val2.transform);
			}
			if (hasSecondarySwitch)
			{
				GameObject val3 = CreateNewContainer("SecondarySwitchContainer");
				CreateSwitchUIElement(secondarySkillDefList, gameObject, val3.transform);
			}
			if (hasUtilitySwitch)
			{
				GameObject val4 = CreateNewContainer("UtilitySwitchContainer");
				CreateSwitchUIElement(utilitySkillDefList, gameObject, val4.transform);
			}
			if (hasSpecialSwitch)
			{
				GameObject val5 = CreateNewContainer("SpecialSwitchContainer");
				CreateSwitchUIElement(specialSkillDefList, gameObject, val5.transform);
			}
		}
	}

	private GameObject CreateNewContainer(string name)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Expected O, but got Unknown
		//IL_0021: 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)
		GameObject val = new GameObject(name, new Type[1] { typeof(RectTransform) });
		val.transform.localPosition = Vector3.zero;
		val.transform.localScale = Vector3.one;
		val.transform.SetParent(switchUIRoot.transform);
		val.AddComponent<LayoutElement>();
		val.AddComponent<idkeither>();
		return val;
	}

	private void CreateSwitchUIElement(List<SkillDef> skillList, GameObject obj, Transform parent)
	{
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: 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)
		if (!Object.op_Implicit((Object)(object)obj) || !Object.op_Implicit((Object)(object)parent))
		{
			return;
		}
		for (int i = 0; i < skillList.Count; i++)
		{
			GameObject val = Object.Instantiate<GameObject>(obj, parent);
			((Object)val).name = "SwitchSkill" + (i + 1);
			val.transform.localPosition = Vector3.zero;
			if (i > 0)
			{
				val.transform.localPosition = new Vector3((float)(50 * i), (float)(50 * i), 0f);
				Object.Destroy((Object)(object)((Component)val.transform.Find("SkillBackgroundPanel")).gameObject);
				val.transform.SetSiblingIndex(0);
			}
			else
			{
				Transform val2 = val.transform.Find("SkillBackgroundPanel").Find("SkillKeyText");
				Object.Destroy((Object)(object)((Component)val2).GetComponent<InputBindingDisplayController>());
				TextMeshProUGUI component = ((Component)val2).GetComponent<TextMeshProUGUI>();
				KeyCode value = MainPlugin.skillSwitchToggle.Value;
				((TMP_Text)component).text = ((object)(KeyCode)(ref value)).ToString();
			}
			Object.Destroy((Object)(object)val.GetComponent<SkillIcon>());
			((Component)val.transform.Find("IsReadyPanel")).gameObject.SetActive(true);
			Object.Destroy((Object)(object)((Component)val.transform.Find("CooldownText")).gameObject);
			Object.Destroy((Object)(object)((Component)val.transform.Find("CooldownPanel")).gameObject);
			Object.Destroy((Object)(object)((Component)val.transform.Find("Skill4StockRoot")).gameObject);
			if (Object.op_Implicit((Object)(object)skillList[i].icon))
			{
				((Component)val.transform.Find("IconPanel")).GetComponent<Image>().sprite = skillList[i].icon;
			}
			TooltipProvider component2 = val.GetComponent<TooltipProvider>();
			component2.titleToken = skillList[i].skillNameToken;
			component2.bodyToken = skillList[i].skillDescriptionToken;
		}
	}

	private void Swap(List<SkillDef> skillList, GenericSkill skill)
	{
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_0076: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: 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_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Expected I4, but got Unknown
		if (!Object.op_Implicit((Object)(object)skillBehaviour))
		{
			return;
		}
		int num = 0;
		for (int i = 0; i < skillList.Count; i++)
		{
			if ((Object)(object)skill.skillDef == (Object)(object)skillList[i])
			{
				num = i + 1;
			}
		}
		if (num > skillList.Count - 1)
		{
			num = 0;
		}
		SkillSlot val = body.skillLocator.FindSkillSlot(skill);
		SkillSlot val2 = val;
		switch ((int)val2)
		{
		case 0:
			if (!skill.HasSkillOverrideOfPriority((SkillOverridePriority)4))
			{
				body.skillLocator.primary = body.skillLocator.FindSkillByDef(skillList[num]);
				skillBehaviour.EnableSkill(0);
			}
			break;
		case 1:
			if (!skill.HasSkillOverrideOfPriority((SkillOverridePriority)4))
			{
				body.skillLocator.secondary = body.skillLocator.FindSkillByDef(skillList[num]);
				skillBehaviour.EnableSkill(1);
			}
			break;
		case 2:
			if (!skill.HasSkillOverrideOfPriority((SkillOverridePriority)4))
			{
				body.skillLocator.utility = body.skillLocator.FindSkillByDef(skillList[num]);
				skillBehaviour.EnableSkill(2);
			}
			break;
		case 3:
			if (!skill.HasSkillOverrideOfPriority((SkillOverridePriority)4))
			{
				body.skillLocator.special = body.skillLocator.FindSkillByDef(skillList[num]);
				skillBehaviour.EnableSkill(3);
			}
			break;
		}
	}

	private void OnDisable()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		HUD.Update -= new hook_Update(HUD_Update);
		if (Object.op_Implicit((Object)(object)switchUIRoot))
		{
			Object.Destroy((Object)(object)switchUIRoot);
		}
	}
}
internal class idkeither : MonoBehaviour
{
	private void OnEnable()
	{
		//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_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_0021: 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)
		if (((Component)this).transform.localScale != Vector3.one)
		{
			((Component)this).transform.localScale = Vector3.one;
		}
		if (((Component)this).transform.localPosition != Vector3.zero)
		{
			((Component)this).transform.localPosition = Vector3.zero;
		}
	}
}
public class SphereProjectileController : MonoBehaviour
{
	[SerializeField]
	private ProjectileSimple simple;

	[SerializeField]
	private SphereCollider collider;

	[SerializeField]
	private ObjectScaleCurve scale;

	[SerializeField]
	private GameObject ghost;

	[SerializeField]
	private ProjectileController controller;

	[SerializeField]
	private GameObject owner;

	[SerializeField]
	private CharacterBody body;

	[SerializeField]
	private ModelLocator modelLocator;

	[SerializeField]
	private DBZSkillEventHandler skillEvent;

	[SerializeField]
	private Transform parent;

	public string parentName = "sphereMuzzle";

	private bool playScaleSound;

	private bool playLaunchSound;

	public float radius = 5.8f;

	public uint scaleSound = 639080239u;

	public uint launchSound = 356987030u;

	public string loopSound = "Play_Beerus_Sphere_Projectile_Loop";

	private uint loopID;

	private uint launchID;

	private void OnEnable()
	{
		loopID = Util.PlaySound(loopSound, ((Component)this).gameObject);
	}

	private void OnDisable()
	{
		AkSoundEngine.StopPlayingID(loopID);
		AkSoundEngine.StopPlayingID(launchID);
	}

	private void Update()
	{
		//IL_02da: Unknown result type (might be due to invalid IL or missing references)
		if (!Object.op_Implicit((Object)(object)collider))
		{
			collider = ((Component)this).GetComponent<SphereCollider>();
		}
		if (!Object.op_Implicit((Object)(object)simple))
		{
			simple = ((Component)this).GetComponent<ProjectileSimple>();
		}
		if (!Object.op_Implicit((Object)(object)owner))
		{
			controller = ((Component)this).GetComponent<ProjectileController>();
			if (Object.op_Implicit((Object)(object)controller) && Object.op_Implicit((Object)(object)controller.Networkowner) && Object.op_Implicit((Object)(object)controller.ghost))
			{
				ghost = ((Component)controller.ghost).gameObject;
				scale = ghost.GetComponent<ObjectScaleCurve>();
				owner = controller.owner;
				body = owner.GetComponent<CharacterBody>();
				if (Object.op_Implicit((Object)(object)body))
				{
					modelLocator = body.modelLocator;
					if (Object.op_Implicit((Object)(object)modelLocator) && Object.op_Implicit((Object)(object)modelLocator.modelTransform))
					{
						skillEvent = ((Component)modelLocator.modelTransform).GetComponent<DBZSkillEventHandler>();
						ChildLocator component = ((Component)modelLocator.modelTransform).GetComponent<ChildLocator>();
						if (Object.op_Implicit((Object)(object)component))
						{
							parent = component.FindChild(parentName);
						}
					}
				}
			}
		}
		if (Object.op_Implicit((Object)(object)skillEvent))
		{
			if (skillEvent.sphereScale && Object.op_Implicit((Object)(object)scale))
			{
				((Behaviour)scale).enabled = true;
				if (!playScaleSound)
				{
					playScaleSound = true;
					AkSoundEngine.PostEvent(scaleSound, ((Component)this).gameObject);
				}
			}
			if (Object.op_Implicit((Object)(object)collider) && !skillEvent.fireSphere)
			{
				((Collider)collider).enabled = false;
				if (!playLaunchSound)
				{
					playLaunchSound = true;
					launchID = AkSoundEngine.PostEvent(launchSound, ((Component)this).gameObject);
				}
			}
			if (skillEvent.fireSphere && Object.op_Implicit((Object)(object)simple))
			{
				parent = null;
				((Behaviour)simple).enabled = true;
				if (Object.op_Implicit((Object)(object)collider))
				{
					((Collider)collider).enabled = true;
					collider.radius = radius;
				}
			}
		}
		if (Object.op_Implicit((Object)(object)parent))
		{
			((Component)this).transform.position = parent.position;
		}
	}
}
internal class DelayedLoadMusic : MonoBehaviour
{
	private int lul = 0;

	private void FixedUpdate()
	{
		if (lul < 2)
		{
			lul++;
		}
		else if (MainPlugin.enableMusic.Value)
		{
			Hook.menu = AkSoundEngine.PostEvent(Sounds.Play_DBZ_Load_Music, ((Component)this).gameObject);
			Object.Destroy((Object)(object)this);
		}
		else
		{
			Object.Destroy((Object)(object)this);
		}
	}
}
internal class StupidCamera : MonoBehaviour
{
	private PostProcessProfile ogPP;

	private PostProcessProfile newPP;

	private Transform ppT;

	private void OnEnable()
	{
	}

	private void FixedUpdate()
	{
		if (Object.op_Implicit((Object)(object)ppT) || ((Component)this).transform.childCount < 3)
		{
			return;
		}
		Transform child = ((Component)this).transform.GetChild(3);
		if (Object.op_Implicit((Object)(object)child))
		{
			ppT = child;
			PostProcessVolume component = ((Component)child).GetComponent<PostProcessVolume>();
			if (Object.op_Implicit((Object)(object)component))
			{
				ogPP = component.profile;
				PostProcessProfile val2 = (component.profile = Object.Instantiate<PostProcessProfile>(ogPP));
				val2.settings[2].active = false;
				val2.settings[3].active = false;
				newPP = val2;
			}
		}
	}
}
public class VOHandler : MonoBehaviour
{
	private float stopwatch;

	private float delayStopwatch;

	private bool playDelay;

	private float delay;

	private uint delayID;

	public void PlayVO(uint ID)
	{
		if (stopwatch >= 10f)
		{
			AkSoundEngine.PostEvent(ID, ((Component)this).gameObject);
			stopwatch = 0f;
		}
	}

	public void PlayDelayedVO(uint ID, float delay)
	{
		playDelay = true;
		delayID = ID;
		this.delay = delay;
	}

	private void FixedUpdate()
	{
		if (playDelay)
		{
			delayStopwatch += Time.fixedDeltaTime;
			if (delayStopwatch >= delay)
			{
				playDelay = false;
				delayStopwatch = 0f;
				AkSoundEngine.PostEvent(delayID, ((Component)this).gameObject);
			}
		}
		stopwatch += Time.fixedDeltaTime;
	}
}
internal class Hook
{
	internal static uint menu;

	internal static uint lobby;

	internal static uint crowd;

	internal static bool stopMusic = false;

	private static string[] objectsToDisable = new string[14]
	{
		"title terrain", "Terrain", "CamDust", "Trees", "Rocks", "Misc Props", "MonsterSpinners", "Lunar Area Props", "GlobalPostProcessVolume", "PostProcess, Blur",
		"ArtifactFormulaDisplay", "", "", ""
	};

	internal static void Hooks()
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Expected O, but got Unknown
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Expected O, but got Unknown
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Expected O, but got Unknown
		//IL_0086: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: Expected O, but got Unknown
		//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b4: Expected O, but got Unknown
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c6: Expected O, but got Unknown
		RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients);
		HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
		GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal;
		BossGroup.onBossGroupStartServer += BossGroup_onBossGroupStartServer;
		SceneManager.sceneLoaded += SceneManager_sceneLoaded;
		SceneManager.sceneUnloaded += SceneManager_sceneUnloaded;
		Row.FromSkin += new hook_FromSkin(Row_FromSkin);
		CharacterBody.Start += new hook_Start(CharacterBody_Start);
		Inventory.onServerItemGiven += Inventory_onServerItemGiven;
		LoadoutPanelController.DestroyRows += new hook_DestroyRows(LoadoutPanelController_DestroyRows);
		TeleporterInteraction.Start += new hook_Start(TeleporterInteraction_Start);
	}

	private static void TeleporterInteraction_Start(orig_Start orig, TeleporterInteraction self)
	{
		//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_003c: 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_0057: Unknown result type (might be due to invalid IL or missing references)
		orig.Invoke(self);
		GameObject val = Object.Instantiate<GameObject>(Prefabs.teleporterMarker, ((Component)self).transform.position, Quaternion.identity);
		val.transform.parent = ((Component)self).transform;
		val.transform.localPosition = Vector3.zero;
		val.transform.localScale = Vector3.one * 3f;
	}

	private static void Inventory_onServerItemGiven(Inventory self, ItemIndex itemIndex, int count)
	{
		//IL_0016: 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_0031: 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_0035: 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_006a: Expected I4, but got Unknown
		PowerupController component = ((Component)self).GetComponent<PowerupController>();
		if (!Object.op_Implicit((Object)(object)component))
		{
			return;
		}
		ItemDef itemDef = ItemCatalog.GetItemDef(itemIndex);
		if (Object.op_Implicit((Object)(object)itemDef))
		{
			ItemTier tier = itemDef.tier;
			ItemTier val = tier;
			switch ((int)val)
			{
			case 0:
				component.AddPowerupValue(component.baseItemCoefficient * component.whiteItemCoefficient * (float)component.powerupCount);
				break;
			case 1:
				component.AddPowerupValue(component.baseItemCoefficient * component.greenItemCoefficient * (float)component.powerupCount);
				break;
			case 2:
				component.AddPowerupValue(component.baseItemCoefficient * component.redItemCoefficient * (float)component.powerupCount);
				break;
			case 4:
				component.AddPowerupValue(component.baseItemCoefficient * component.bossItemCoefficient * (float)component.powerupCount);
				break;
			case 6:
				component.AddPowerupValue(component.baseItemCoefficient * component.whiteItemCoefficient * (float)component.powerupCount);
				break;
			case 7:
				component.AddPowerupValue(component.baseItemCoefficient * component.greenItemCoefficient * (float)component.powerupCount);
				break;
			case 8:
				component.AddPowerupValue(component.baseItemCoefficient * component.redItemCoefficient * (float)component.powerupCount);
				break;
			case 9:
				component.AddPowerupValue(component.baseItemCoefficient * component.bossItemCoefficient * (float)component.powerupCount);
				break;
			case 3:
				component.AddPowerupValue(component.baseItemCoefficient * RoR2Application.rng.RangeFloat(0f, component.lunarItemMaxCoefficient + 0.01f) * (float)component.powerupCount);
				break;
			case 10:
				component.AddPowerupValue(component.baseItemCoefficient * component.moddedTierItemCoefficient * (float)component.powerupCount);
				break;
			case 5:
				break;
			}
		}
	}

	private static void CharacterBody_Start(orig_Start orig, CharacterBody self)
	{
		orig.Invoke(self);
		if (self.isPlayerControlled && DBZSurvivorCatalog.RegisteredDBZSurvivor(self.baseNameToken))
		{
			DBZSurvivorDef dBZSurvivorDef = DBZSurvivorCatalog.FindDBZSurvivorDef(self.baseNameToken);
			if (dBZSurvivorDef.powerupBodyList != null && dBZSurvivorDef.powerupBodyList.Count > 0 && Object.op_Implicit((Object)(object)self.masterObject) && Object.op_Implicit((Object)(object)self.masterObject.GetComponent<PowerupController>()))
			{
			}
		}
	}

	private static void MusicController_LateUpdate(ILContext il)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Expected O, but got Unknown
		ILCursor val = new ILCursor(il);
		int num = default(int);
		val.GotoNext(new Func<Instruction, bool>[1]
		{
			(Instruction i) => ILPatternMatchingExt.MatchStloc(i, ref num)
		});
		val.EmitDelegate<Func<bool, bool>>((Func<bool, bool>)((bool b) => stopMusic));
	}

	private static void SceneManager_sceneUnloaded(Scene arg0)
	{
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Expected O, but got Unknown
		if (((Scene)(ref arg0)).name == "title")
		{
			stopMusic = false;
			AkSoundEngine.StopPlayingID(menu);
		}
		else if (((Scene)(ref arg0)).name == "lobby")
		{
			stopMusic = false;
			AkSoundEngine.StopPlayingID(lobby);
			AkSoundEngine.StopPlayingID(crowd);
			MusicController.LateUpdate -= new Manipulator(MusicController_LateUpdate);
		}
	}

	private static void LoadoutPanelController_DestroyRows(orig_DestroyRows orig, LoadoutPanelController self)
	{
		self.rows.RemoveAll((Row r) => r == null);
		orig.Invoke(self);
	}

	private static object Row_FromSkin(orig_FromSkin orig, LoadoutPanelController owner, BodyIndex bodyIndex)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
		CharacterBody bodyPrefabBodyComponent = BodyCatalog.GetBodyPrefabBodyComponent(bodyIndex);
		if (Object.op_Implicit((Object)(object)bodyPrefabBodyComponent) && DBZSurvivorCatalog.RegisteredDBZSurvivor(bodyPrefabBodyComponent.baseNameToken) && Object.op_Implicit((Object)(object)((Component)bodyPrefabBodyComponent).GetComponent<SkillSwitchBehaviour>()))
		{
			LanguageTextMeshController[] componentsInChildren = ((Component)owner).GetComponentsInChildren<LanguageTextMeshController>();
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				if (componentsInChildren[i].token == "LOADOUT_SKILL_MISC")
				{
					componentsInChildren[i].token = "Switch";
				}
			}
		}
		if (Object.op_Implicit((Object)(object)bodyPrefabBodyComponent) && DBZSurvivorCatalog.RegisteredDBZSurvivor(bodyPrefabBodyComponent.baseNameToken))
		{
			DBZSurvivorDef dBZSurvivorDef = DBZSurvivorCatalog.FindDBZSurvivorDef(bodyPrefabBodyComponent.baseNameToken);
			if (Object.op_Implicit((Object)(object)dBZSurvivorDef) && !dBZSurvivorDef.hasSkins)
			{
				return null;
			}
		}
		return orig.Invoke(owner, bodyIndex);
	}

	private static void SceneManager_sceneLoaded(Scene scene, LoadSceneMode sceneMode)
	{
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Expected O, but got Unknown
		//IL_079b: Unknown result type (might be due to invalid IL or missing references)
		//IL_07a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_07c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_07e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_07f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_07ff: Unknown result type (might be due to invalid IL or missing references)
		//IL_0840: Unknown result type (might be due to invalid IL or missing references)
		//IL_0847: Expected O, but got Unknown
		//IL_085d: Unknown result type (might be due to invalid IL or missing references)
		//IL_088b: Unknown result type (might be due to invalid IL or missing references)
		//IL_08ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_094b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0950: Unknown result type (might be due to invalid IL or missing references)
		//IL_09d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a1b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a54: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a5b: Expected O, but got Unknown
		//IL_0a62: Unknown result type (might be due to invalid IL or missing references)
		//IL_0a63: Unknown result type (might be due to invalid IL or missing references)
		//IL_06b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_05b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_05dc: 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_02d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f4: 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_0666: Unknown result type (might be due to invalid IL or missing references)
		//IL_03a8: Unknown result type (might be due to invalid IL or m

Dragon Ball Z/Dep/EditorScripts.dll

Decompiled 3 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using ModularMotion;
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("Dragonyck")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("EditorScripts")]
[assembly: AssemblyTitle("EditorScripts")]
[assembly: AssemblyVersion("1.0.0.0")]
public class BarLoadBehaviour : MonoBehaviour
{
	private Image image;

	public TextMeshProUGUI tmPro;

	private void Start()
	{
		image = ((Component)this).GetComponent<Image>();
	}

	private void Update()
	{
		if (Object.op_Implicit((Object)(object)tmPro))
		{
			string s = ((TMP_Text)tmPro).text.Replace("%", "");
			float num = float.Parse(s);
			float fillAmount = num / 100f;
			if (num > 0f)
			{
				image.fillAmount = fillAmount;
			}
		}
	}
}
[ExecuteInEditMode]
public class ChildTubeRenderer : MonoBehaviour
{
	[SerializeField]
	private Vector3[] _positions;

	[SerializeField]
	private int _sides;

	[SerializeField]
	private float _radiusOne;

	[SerializeField]
	private float _radiusTwo;

	[SerializeField]
	private bool _useWorldSpace = true;

	[SerializeField]
	private bool _useTwoRadii = false;

	private Vector3[] _vertices;

	private Mesh _mesh;

	private MeshFilter _meshFilter;

	private MeshRenderer _meshRenderer;

	public Transform start;

	public Transform end;

	public LineRenderer lineRenderer;

	[SerializeField]
	public Vector2 lineRendererScale;

	public Material material
	{
		get
		{
			return ((Renderer)_meshRenderer).material;
		}
		set
		{
			((Renderer)_meshRenderer).material = value;
		}
	}

	private void Awake()
	{
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Expected O, but got Unknown
		//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c6: 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_00d8: Unknown result type (might be due to invalid IL or missing references)
		_meshFilter = ((Component)this).GetComponent<MeshFilter>();
		if ((Object)(object)_meshFilter == (Object)null)
		{
			_meshFilter = ((Component)this).gameObject.AddComponent<MeshFilter>();
		}
		_meshRenderer = ((Component)this).GetComponent<MeshRenderer>();
		if ((Object)(object)_meshRenderer == (Object)null)
		{
			_meshRenderer = ((Component)this).gameObject.AddComponent<MeshRenderer>();
		}
		_mesh = new Mesh();
		_meshFilter.mesh = _mesh;
		start = ((Component)((Component)this).transform.parent).GetComponent<TubeRenderer>().start;
		end = ((Component)((Component)this).transform.parent).GetComponent<TubeRenderer>().end;
		_positions = (Vector3[])(object)new Vector3[2] { start.position, end.position };
		if (Object.op_Implicit((Object)(object)lineRenderer))
		{
			lineRenderer.positionCount = 2;
		}
	}

	private void OnEnable()
	{
		((Renderer)_meshRenderer).enabled = true;
	}

	private void OnDisable()
	{
		((Renderer)_meshRenderer).enabled = false;
	}

	private void Update()
	{
		//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_002c: 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_0053: Unknown result type (might be due to invalid IL or missing references)
		//IL_006b: Unknown result type (might be due to invalid IL or missing references)
		GenerateMesh();
		_positions[0] = start.position;
		_positions[1] = end.position;
		if (Object.op_Implicit((Object)(object)lineRenderer))
		{
			lineRenderer.SetPosition(0, start.position);
			lineRenderer.SetPosition(1, end.position);
			lineRenderer.startWidth = lineRendererScale.x;
			lineRenderer.endWidth = lineRendererScale.y;
		}
	}

	private void OnValidate()
	{
		_sides = Mathf.Max(3, _sides);
	}

	public void SetPositions(Vector3[] positions)
	{
		_positions = positions;
		GenerateMesh();
	}

	private void GenerateMesh()
	{
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Expected O, but got Unknown
		//IL_0121: Unknown result type (might be due to invalid IL or missing references)
		//IL_0126: 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_0148: 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_014d: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)_mesh == (Object)null || _positions == null || _positions.Length <= 1)
		{
			_mesh = new Mesh();
			return;
		}
		int num = _sides * _positions.Length;
		if (_vertices == null || _vertices.Length != num)
		{
			_vertices = (Vector3[])(object)new Vector3[num];
			int[] triangles = GenerateIndices();
			Vector2[] uv = GenerateUVs();
			if (num > _mesh.vertexCount)
			{
				_mesh.vertices = _vertices;
				_mesh.triangles = triangles;
				_mesh.uv = uv;
			}
			else
			{
				_mesh.triangles = triangles;
				_mesh.vertices = _vertices;
				_mesh.uv = uv;
			}
		}
		int num2 = 0;
		for (int i = 0; i < _positions.Length; i++)
		{
			Vector3[] array = CalculateCircle(i);
			Vector3[] array2 = array;
			foreach (Vector3 val in array2)
			{
				_vertices[num2++] = (_useWorldSpace ? ((Component)this).transform.InverseTransformPoint(val) : val);
			}
		}
		_mesh.vertices = _vertices;
		_mesh.RecalculateNormals();
		_mesh.RecalculateBounds();
		_meshFilter.mesh = _mesh;
	}

	private Vector2[] GenerateUVs()
	{
		//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)
		Vector2[] array = (Vector2[])(object)new Vector2[_positions.Length * _sides];
		for (int i = 0; i < _positions.Length; i++)
		{
			for (int j = 0; j < _sides; j++)
			{
				int num = i * _sides + j;
				float num2 = (float)j / ((float)_sides - 1f);
				float num3 = (float)i / ((float)_positions.Length - 1f);
				array[num] = new Vector2(num2, num3);
			}
		}
		return array;
	}

	private int[] GenerateIndices()
	{
		int[] array = new int[_positions.Length * _sides * 2 * 3];
		int num = 0;
		for (int i = 1; i < _positions.Length; i++)
		{
			for (int j = 0; j < _sides; j++)
			{
				int num2 = i * _sides + j;
				int num3 = num2 - _sides;
				array[num++] = num3;
				array[num++] = ((j == _sides - 1) ? (num2 - (_sides - 1)) : (num2 + 1));
				array[num++] = num2;
				array[num++] = ((j == _sides - 1) ? (num3 - (_sides - 1)) : (num3 + 1));
				array[num++] = ((j == _sides - 1) ? (num2 - (_sides - 1)) : (num2 + 1));
				array[num++] = num3;
			}
		}
		return array;
	}

	private Vector3[] CalculateCircle(int index)
	{
		//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_0014: 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_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: 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_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_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: 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_0098: 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_00a2: 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_00b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b8: 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_00c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cb: 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_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_00d7: 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_005c: 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_0072: 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_007c: 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_0085: 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_015c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0161: 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_016b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0170: Unknown result type (might be due to invalid IL or missing references)
		//IL_0175: 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_017f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0184: Unknown result type (might be due to invalid IL or missing references)
		//IL_0189: Unknown result type (might be due to invalid IL or missing references)
		int num = 0;
		Vector3 val = Vector3.zero;
		Vector3 val3;
		if (index > 0)
		{
			Vector3 val2 = val;
			val3 = _positions[index] - _positions[index - 1];
			val = val2 + ((Vector3)(ref val3)).normalized;
			num++;
		}
		if (index < _positions.Length - 1)
		{
			Vector3 val4 = val;
			val3 = _positions[index + 1] - _positions[index];
			val = val4 + ((Vector3)(ref val3)).normalized;
			num++;
		}
		val3 = val / (float)num;
		val = ((Vector3)(ref val3)).normalized;
		val3 = Vector3.Cross(val, val + new Vector3(0.123564f, 0.34675f, 0.756892f));
		Vector3 normalized = ((Vector3)(ref val3)).normalized;
		val3 = Vector3.Cross(val, normalized);
		Vector3 normalized2 = ((Vector3)(ref val3)).normalized;
		Vector3[] array = (Vector3[])(object)new Vector3[_sides];
		float num2 = 0f;
		float num3 = MathF.PI * 2f / (float)_sides;
		float num4 = (float)index / ((float)_positions.Length - 1f);
		float num5 = (_useTwoRadii ? Mathf.Lerp(_radiusOne, _radiusTwo, num4) : _radiusOne);
		for (int i = 0; i < _sides; i++)
		{
			float num6 = Mathf.Cos(num2);
			float num7 = Mathf.Sin(num2);
			array[i] = _positions[index] + normalized * num6 * num5 + normalized2 * num7 * num5;
			num2 += num3;
		}
		return array;
	}
}
internal class TronTrailSection
{
	public Vector3 point;

	public Vector3 upDir;

	public float time;

	public TronTrailSection()
	{
	}

	public TronTrailSection(Vector3 p, float t)
	{
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		point = p;
		time = t;
	}
}
[RequireComponent(typeof(MeshFilter))]
public class LightsaberTrail : MonoBehaviour
{
	public float height = 2f;

	public float time = 2f;

	public bool alwaysUp = false;

	public float minDistance = 0.1f;

	public float timeTransitionSpeed = 1f;

	public float desiredTime = 2f;

	public Color startColor = Color.white;

	public Color endColor = new Color(1f, 1f, 1f, 0f);

	public VolumetricLineStripBehavior behaviour;

	public LightsaberTrail trail;

	private Vector3 position;

	private float now = 0f;

	private TronTrailSection currentSection;

	private Matrix4x4 localSpaceTransform;

	private Mesh mesh;

	private Vector3[] vertices;

	private Color[] colors;

	private Vector2[] uv;

	private MeshRenderer meshRenderer;

	private Material trailMaterial;

	private List<TronTrailSection> sections = new List<TronTrailSection>();

	private void Awake()
	{
		Component component = ((Component)this).GetComponent(typeof(MeshFilter));
		MeshFilter val = (MeshFilter)(object)((component is MeshFilter) ? component : null);
		mesh = val.mesh;
		ref MeshRenderer reference = ref meshRenderer;
		Component component2 = ((Component)this).GetComponent(typeof(MeshRenderer));
		reference = (MeshRenderer)(object)((component2 is MeshRenderer) ? component2 : null);
		trailMaterial = ((Renderer)meshRenderer).material;
		behaviour = ((Component)((Component)this).transform.parent).GetComponent<VolumetricLineStripBehavior>();
		trail = ((Component)((Component)this).transform.parent).GetComponent<LightsaberTrail>();
	}

	public void StartTrail(float timeToTweenTo, float fadeInTime)
	{
		desiredTime = timeToTweenTo;
		if (time != desiredTime)
		{
			timeTransitionSpeed = Mathf.Abs(desiredTime - time) / fadeInTime;
		}
		if (time <= 0f)
		{
			time = 0.01f;
		}
	}

	public void SetTime(float trailTime, float timeToTweenTo, float tweenSpeed)
	{
		time = trailTime;
		desiredTime = timeToTweenTo;
		timeTransitionSpeed = tweenSpeed;
		if (time <= 0f)
		{
			ClearTrail();
		}
	}

	public void FadeOut(float fadeTime)
	{
		desiredTime = 0f;
		if (time > 0f)
		{
			timeTransitionSpeed = time / fadeTime;
		}
	}

	public void SetTrailColor(Color color)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		trailMaterial.SetColor("_TintColor", color);
	}

	private void Update()
	{
		Iterate(Time.time);
		UpdateTrail(Time.time, 0f);
	}

	public void Iterate(float itterateTime)
	{
		//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_0032: 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_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: 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_0096: 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_007e: 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)
		position = ((Component)this).transform.position;
		now = itterateTime;
		if (sections.Count != 0)
		{
			Vector3 val = sections[0].point - position;
			if (!(((Vector3)(ref val)).sqrMagnitude > minDistance * minDistance))
			{
				return;
			}
		}
		TronTrailSection tronTrailSection = new TronTrailSection();
		tronTrailSection.point = position;
		if (alwaysUp)
		{
			tronTrailSection.upDir = Vector3.up;
		}
		else
		{
			tronTrailSection.upDir = ((Component)this).transform.TransformDirection(Vector3.up);
		}
		tronTrailSection.time = now;
		sections.Insert(0, tronTrailSection);
	}

	public void UpdateTrail(float currentTime, float deltaTime)
	{
		//IL_000f: 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_0033: 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_0053: 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_00cb: 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_00f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: Unknown result type (might be due to invalid IL or missing references)
		//IL_0109: 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_012f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0144: 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_0158: Unknown result type (might be due to invalid IL or missing references)
		//IL_009a: 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_023d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0242: 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_029b: 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_02da: Unknown result type (might be due to invalid IL or missing references)
		//IL_02df: Unknown result type (might be due to invalid IL or missing references)
		//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_030c: 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_0329: Unknown result type (might be due to invalid IL or missing references)
		//IL_032e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0334: Unknown result type (might be due to invalid IL or missing references)
		//IL_033a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0341: Unknown result type (might be due to invalid IL or missing references)
		//IL_0346: Unknown result type (might be due to invalid IL or missing references)
		//IL_0352: 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_0365: Unknown result type (might be due to invalid IL or missing references)
		//IL_0367: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)behaviour) && endColor != behaviour.LineColor)
		{
			endColor = new Color(behaviour.LineColor.r, behaviour.LineColor.g, behaviour.LineColor.b, 0f);
		}
		if (!Object.op_Implicit((Object)(object)behaviour) && Object.op_Implicit((Object)(object)trail) && Object.op_Implicit((Object)(object)trail.behaviour) && startColor != trail.behaviour.LineColor)
		{
			startColor = new Color(trail.behaviour.LineColor.r, trail.behaviour.LineColor.g, trail.behaviour.LineColor.b, 0.7f);
			endColor = new Color(trail.behaviour.LineColor.r, trail.behaviour.LineColor.g, trail.behaviour.LineColor.b, 0f);
		}
		mesh.Clear();
		while (sections.Count > 0 && currentTime > sections[sections.Count - 1].time + time)
		{
			sections.RemoveAt(sections.Count - 1);
		}
		if (sections.Count < 2)
		{
			return;
		}
		vertices = (Vector3[])(object)new Vector3[sections.Count * 2];
		colors = (Color[])(object)new Color[sections.Count * 2];
		uv = (Vector2[])(object)new Vector2[sections.Count * 2];
		currentSection = sections[0];
		localSpaceTransform = ((Component)this).transform.worldToLocalMatrix;
		for (int i = 0; i < sections.Count; i++)
		{
			currentSection = sections[i];
			float num = 0f;
			if (i != 0)
			{
				num = Mathf.Clamp01((currentTime - currentSection.time) / time);
			}
			Vector3 upDir = currentSection.upDir;
			vertices[i * 2] = ((Matrix4x4)(ref localSpaceTransform)).MultiplyPoint(currentSection.point);
			vertices[i * 2 + 1] = ((Matrix4x4)(ref localSpaceTransform)).MultiplyPoint(currentSection.point + upDir * height);
			uv[i * 2] = new Vector2(num, 0f);
			uv[i * 2 + 1] = new Vector2(num, 1f);
			Color val = Color.Lerp(startColor, endColor, num);
			colors[i * 2] = val;
			colors[i * 2 + 1] = val;
		}
		int[] array = new int[(sections.Count - 1) * 2 * 3];
		for (int j = 0; j < array.Length / 6; j++)
		{
			array[j * 6] = j * 2;
			array[j * 6 + 1] = j * 2 + 1;
			array[j * 6 + 2] = j * 2 + 2;
			array[j * 6 + 3] = j * 2 + 2;
			array[j * 6 + 4] = j * 2 + 1;
			array[j * 6 + 5] = j * 2 + 3;
		}
		mesh.vertices = vertices;
		mesh.colors = colors;
		mesh.uv = uv;
		mesh.triangles = array;
		if (time > desiredTime)
		{
			time -= deltaTime * timeTransitionSpeed;
			if (time <= desiredTime)
			{
				time = desiredTime;
			}
		}
		else if (time < desiredTime)
		{
			time += deltaTime * timeTransitionSpeed;
			if (time >= desiredTime)
			{
				time = desiredTime;
			}
		}
	}

	public void ClearTrail()
	{
		desiredTime = 0f;
		time = 0f;
		if ((Object)(object)mesh != (Object)null)
		{
			mesh.Clear();
			sections.Clear();
		}
	}
}
public class TrailRenderer_Local : MonoBehaviour
{
	public Transform objToFollow;

	private LineRenderer myLine;

	public float distIncrement = 0.1f;

	private Vector3 lastPosition;

	public bool limitTrailLength = false;

	public int maxPositions = 10;

	private void Start()
	{
		myLine = ((Component)this).GetComponent<LineRenderer>();
		myLine.useWorldSpace = false;
		Reset();
	}

	private void Reset()
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		myLine.positionCount = 0;
		AddPoint(objToFollow.localPosition);
	}

	private void AddPoint(Vector3 newPoint)
	{
		//IL_0028: 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)
		LineRenderer obj = myLine;
		obj.positionCount += 1;
		myLine.SetPosition(myLine.positionCount - 1, newPoint);
		if (limitTrailLength && myLine.positionCount > maxPositions)
		{
			TruncatePositions(maxPositions);
		}
		lastPosition = newPoint;
	}

	private void TruncatePositions(int newLength)
	{
		//IL_0026: 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[] array = (Vector3[])(object)new Vector3[newLength];
		int num = myLine.positionCount - newLength;
		for (int i = 0; i < newLength; i++)
		{
			array[i] = myLine.GetPosition(i + num);
		}
		myLine.positionCount = newLength;
		myLine.SetPositions(array);
	}

	private void Update()
	{
		//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_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: 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)
		Vector3 localPosition = objToFollow.localPosition;
		if (Vector3.Distance(localPosition, lastPosition) > distIncrement)
		{
			AddPoint(localPosition);
		}
	}
}
public class MinimapBehaviour : MonoBehaviour
{
	[SerializeField]
	public Transform player;

	[SerializeField]
	public GameObject targetCamera;

	private void LateUpdate()
	{
		//IL_0032: 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_0065: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)player) && Object.op_Implicit((Object)(object)targetCamera))
		{
			targetCamera.transform.position = player.position;
			((Component)this).transform.position = player.position;
			((Component)this).transform.rotation = Quaternion.Euler(90f, player.eulerAngles.y, 0f);
		}
	}
}
public class SpiralLineRenderer : MonoBehaviour
{
	public Transform object1;

	public Transform object2;

	private LineRenderer lineRenderer;

	private int NUMBER_OF_POINTS = 200;

	private int NUMBER_OF_REVOLUTIONS = 12;

	public float SPIRAL_WIDTH = 2f;

	private void Awake()
	{
		lineRenderer = ((Component)this).GetComponent<LineRenderer>();
	}

	private void Start()
	{
		CreateCurveShape();
	}

	private void CreateCurveShape()
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: 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_0078: 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_0082: 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_0097: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: 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_009f: 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_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c1: 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_00f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0105: Unknown result type (might be due to invalid IL or missing references)
		//IL_010a: 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_0136: Unknown result type (might be due to invalid IL or missing references)
		//IL_013d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0142: 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_014b: Unknown result type (might be due to invalid IL or missing references)
		//IL_014d: Unknown result type (might be due to invalid IL or missing references)
		float num = Vector3.Distance(object1.position, object2.position);
		NUMBER_OF_REVOLUTIONS = Mathf.CeilToInt(num * 0.3f);
		NUMBER_OF_POINTS = Mathf.CeilToInt(num * 5.6f);
		lineRenderer.positionCount = NUMBER_OF_POINTS;
		Vector3[] array = (Vector3[])(object)new Vector3[NUMBER_OF_POINTS];
		for (int i = 0; i < NUMBER_OF_POINTS; i++)
		{
			Vector3 val = object2.position - object1.position;
			Vector3 val2 = Quaternion.Euler(90f, 0f, 0f) * val;
			Vector3 val3 = Vector3.Cross(val, val2);
			float num2 = (float)i / (float)NUMBER_OF_POINTS;
			float num3 = num2 * num;
			Vector3 val4 = object1.position + SPIRAL_WIDTH * ((Vector3)(ref val3)).normalized * Mathf.Sin((float)NUMBER_OF_REVOLUTIONS * num2 * 2f * MathF.PI) + SPIRAL_WIDTH * ((Vector3)(ref val2)).normalized * Mathf.Cos((float)NUMBER_OF_REVOLUTIONS * num2 * 2f * MathF.PI) + ((Vector3)(ref val)).normalized * num3;
			array[i] = val4;
		}
		lineRenderer.SetPositions(array);
	}
}
public class TexScroll : MonoBehaviour
{
	[SerializeField]
	private bool reset;

	[SerializeField]
	private float speedX = -0.5f;

	[SerializeField]
	private float speedY = -0.5f;

	[SerializeField]
	private bool xAxis;

	[SerializeField]
	private bool yAxis;

	private Material mat;

	private float offsetX;

	private float offsetY;

	private float stopwatch;

	private float baseDuration;

	private void Start()
	{
		//IL_0027: 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)
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_0076: Unknown result type (might be due to invalid IL or missing references)
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		mat = ((Component)this).GetComponent<Renderer>().material;
		mat.SetTextureOffset("_MainTex", new Vector2(0f, 0f));
		mat.SetTextureOffset("_MainTex", new Vector2(0f, 0f));
		ParticleSystem component = ((Component)this).GetComponent<ParticleSystem>();
		if (reset && Object.op_Implicit((Object)(object)component))
		{
			MainModule main = component.main;
			MinMaxCurve startLifetime = ((MainModule)(ref main)).startLifetime;
			baseDuration = ((MinMaxCurve)(ref startLifetime)).constant;
		}
	}

	private void Update()
	{
		//IL_00ba: 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)
		if (reset)
		{
			stopwatch += Time.deltaTime;
			if (stopwatch >= baseDuration)
			{
				stopwatch = 0f;
				mat.SetTextureOffset("_MainTex", new Vector2(0f, 0f));
			}
		}
		if (Object.op_Implicit((Object)(object)mat))
		{
			offsetX += speedX * Time.deltaTime;
			offsetY += speedY * Time.deltaTime;
			mat.SetTextureOffset("_MainTex", new Vector2(offsetX, offsetY));
			if (xAxis)
			{
			}
			if (!yAxis)
			{
			}
		}
	}
}
public class TMPRONumAdd : MonoBehaviour
{
	[SerializeField]
	public int text = 0;

	[SerializeField]
	public TextMeshProUGUI tmPro;

	[SerializeField]
	public UIMotion motion;

	private void Start()
	{
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_002d: Expected O, but got Unknown
		if (Object.op_Implicit((Object)(object)motion))
		{
			motion.OnEnd.AddListener(new UnityAction(lul));
		}
	}

	private void lul()
	{
		if (Object.op_Implicit((Object)(object)tmPro))
		{
			text++;
			((TMP_Text)tmPro).text = text.ToString();
		}
	}
}
[ExecuteInEditMode]
public class TubeRenderer : MonoBehaviour
{
	[SerializeField]
	private Vector3[] _positions;

	[SerializeField]
	private int _sides;

	[SerializeField]
	private float _radiusOne;

	[SerializeField]
	private float _radiusTwo;

	[SerializeField]
	private bool _useWorldSpace = true;

	[SerializeField]
	private bool _useTwoRadii = false;

	private Vector3[] _vertices;

	private Mesh _mesh;

	private MeshFilter _meshFilter;

	private MeshRenderer _meshRenderer;

	public Transform start;

	public Transform end;

	public LineRenderer lineRenderer;

	[SerializeField]
	public Vector2 lineRendererScale;

	public Material material
	{
		get
		{
			return ((Renderer)_meshRenderer).material;
		}
		set
		{
			((Renderer)_meshRenderer).material = value;
		}
	}

	private void Awake()
	{
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Expected O, but got Unknown
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: 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_00a2: Unknown result type (might be due to invalid IL or missing references)
		_meshFilter = ((Component)this).GetComponent<MeshFilter>();
		if ((Object)(object)_meshFilter == (Object)null)
		{
			_meshFilter = ((Component)this).gameObject.AddComponent<MeshFilter>();
		}
		_meshRenderer = ((Component)this).GetComponent<MeshRenderer>();
		if ((Object)(object)_meshRenderer == (Object)null)
		{
			_meshRenderer = ((Component)this).gameObject.AddComponent<MeshRenderer>();
		}
		_mesh = new Mesh();
		_meshFilter.mesh = _mesh;
		_positions = (Vector3[])(object)new Vector3[2] { start.position, end.position };
		if (Object.op_Implicit((Object)(object)lineRenderer))
		{
			lineRenderer.positionCount = 2;
		}
	}

	private void OnEnable()
	{
		((Renderer)_meshRenderer).enabled = true;
	}

	private void OnDisable()
	{
		((Renderer)_meshRenderer).enabled = false;
	}

	private void Update()
	{
		//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_002c: 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_003c: 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)
		//IL_004c: 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_0060: 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_0072: 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_0086: 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_00bc: Unknown result type (might be due to invalid IL or missing references)
		GenerateMesh();
		_positions[0] = start.position;
		_positions[1] = end.position;
		Vector3 val = Vector3.RotateTowards(start.forward, -end.position, 10f, 0f);
		Vector3 val2 = Vector3.RotateTowards(end.forward, start.position, 10f, 0f);
		if (Object.op_Implicit((Object)(object)lineRenderer))
		{
			lineRenderer.SetPosition(0, start.position);
			lineRenderer.SetPosition(1, end.position);
			lineRenderer.startWidth = lineRendererScale.x;
			lineRenderer.endWidth = lineRendererScale.y;
		}
	}

	private void OnValidate()
	{
		_sides = Mathf.Max(3, _sides);
	}

	public void SetPositions(Vector3[] positions)
	{
		_positions = positions;
		GenerateMesh();
	}

	private void GenerateMesh()
	{
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Expected O, but got Unknown
		//IL_0121: Unknown result type (might be due to invalid IL or missing references)
		//IL_0126: 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_0148: 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_014d: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)_mesh == (Object)null || _positions == null || _positions.Length <= 1)
		{
			_mesh = new Mesh();
			return;
		}
		int num = _sides * _positions.Length;
		if (_vertices == null || _vertices.Length != num)
		{
			_vertices = (Vector3[])(object)new Vector3[num];
			int[] triangles = GenerateIndices();
			Vector2[] uv = GenerateUVs();
			if (num > _mesh.vertexCount)
			{
				_mesh.vertices = _vertices;
				_mesh.triangles = triangles;
				_mesh.uv = uv;
			}
			else
			{
				_mesh.triangles = triangles;
				_mesh.vertices = _vertices;
				_mesh.uv = uv;
			}
		}
		int num2 = 0;
		for (int i = 0; i < _positions.Length; i++)
		{
			Vector3[] array = CalculateCircle(i);
			Vector3[] array2 = array;
			foreach (Vector3 val in array2)
			{
				_vertices[num2++] = (_useWorldSpace ? ((Component)this).transform.InverseTransformPoint(val) : val);
			}
		}
		_mesh.vertices = _vertices;
		_mesh.RecalculateNormals();
		_mesh.RecalculateBounds();
		_meshFilter.mesh = _mesh;
	}

	private Vector2[] GenerateUVs()
	{
		//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)
		Vector2[] array = (Vector2[])(object)new Vector2[_positions.Length * _sides];
		for (int i = 0; i < _positions.Length; i++)
		{
			for (int j = 0; j < _sides; j++)
			{
				int num = i * _sides + j;
				float num2 = (float)j / ((float)_sides - 1f);
				float num3 = (float)i / ((float)_positions.Length - 1f);
				array[num] = new Vector2(num2, num3);
			}
		}
		return array;
	}

	private int[] GenerateIndices()
	{
		int[] array = new int[_positions.Length * _sides * 2 * 3];
		int num = 0;
		for (int i = 1; i < _positions.Length; i++)
		{
			for (int j = 0; j < _sides; j++)
			{
				int num2 = i * _sides + j;
				int num3 = num2 - _sides;
				array[num++] = num3;
				array[num++] = ((j == _sides - 1) ? (num2 - (_sides - 1)) : (num2 + 1));
				array[num++] = num2;
				array[num++] = ((j == _sides - 1) ? (num3 - (_sides - 1)) : (num3 + 1));
				array[num++] = ((j == _sides - 1) ? (num2 - (_sides - 1)) : (num2 + 1));
				array[num++] = num3;
			}
		}
		return array;
	}

	private Vector3[] CalculateCircle(int index)
	{
		//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_0014: 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_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: 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_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_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: 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_0098: 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_00a2: 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_00b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b8: 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_00c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cb: 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_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_00d7: 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_005c: 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_0072: 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_007c: 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_0085: 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_015c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0161: 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_016b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0170: Unknown result type (might be due to invalid IL or missing references)
		//IL_0175: 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_017f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0184: Unknown result type (might be due to invalid IL or missing references)
		//IL_0189: Unknown result type (might be due to invalid IL or missing references)
		int num = 0;
		Vector3 val = Vector3.zero;
		Vector3 val3;
		if (index > 0)
		{
			Vector3 val2 = val;
			val3 = _positions[index] - _positions[index - 1];
			val = val2 + ((Vector3)(ref val3)).normalized;
			num++;
		}
		if (index < _positions.Length - 1)
		{
			Vector3 val4 = val;
			val3 = _positions[index + 1] - _positions[index];
			val = val4 + ((Vector3)(ref val3)).normalized;
			num++;
		}
		val3 = val / (float)num;
		val = ((Vector3)(ref val3)).normalized;
		val3 = Vector3.Cross(val, val + new Vector3(0.123564f, 0.34675f, 0.756892f));
		Vector3 normalized = ((Vector3)(ref val3)).normalized;
		val3 = Vector3.Cross(val, normalized);
		Vector3 normalized2 = ((Vector3)(ref val3)).normalized;
		Vector3[] array = (Vector3[])(object)new Vector3[_sides];
		float num2 = 0f;
		float num3 = MathF.PI * 2f / (float)_sides;
		float num4 = (float)index / ((float)_positions.Length - 1f);
		float num5 = (_useTwoRadii ? Mathf.Lerp(_radiusOne, _radiusTwo, num4) : _radiusOne);
		for (int i = 0; i < _sides; i++)
		{
			float num6 = Mathf.Cos(num2);
			float num7 = Mathf.Sin(num2);
			array[i] = _positions[index] + normalized * num6 * num5 + normalized2 * num7 * num5;
			num2 += num3;
		}
		return array;
	}
}
[RequireComponent(typeof(MeshFilter))]
[RequireComponent(typeof(MeshRenderer))]
[ExecuteInEditMode]
public class VolumetricLineStripBehavior : MonoBehaviour
{
	private static readonly Vector3 Average = new Vector3(1f / 3f, 1f / 3f, 1f / 3f);

	[SerializeField]
	public Material m_templateMaterial;

	[SerializeField]
	private bool m_doNotOverwriteTemplateMaterialProperties;

	[SerializeField]
	private Color m_lineColor;

	[SerializeField]
	private float m_lineWidth;

	[SerializeField]
	[Range(0f, 1f)]
	private float m_lightSaberFactor;

	private Material m_material;

	private MeshFilter m_meshFilter;

	private MeshRenderer m_meshRenderer;

	[SerializeField]
	private Vector3[] m_lineVertices = (Vector3[])(object)new Vector3[3]
	{
		Vector3.zero,
		Vector3.zero,
		Vector3.zero
	};

	public Vector3 maxLengthVector = new Vector3(0f, 0.0108f, 0f);

	private Vector3 targetLength;

	private float targetTrailLength;

	public float speed = 5f;

	public float maxTrailLength = 1.1f;

	public bool start = false;

	public int form = 0;

	private bool play = true;

	public VolumetricLineStripBehavior behaviour;

	private float stopwatch;

	public LightsaberTrail[] lightsaberTrails;

	public float lengthDelay = 0.15f;

	public bool hasStartDelay = true;

	public Material TemplateMaterial
	{
		get
		{
			return m_templateMaterial;
		}
		set
		{
			m_templateMaterial = value;
		}
	}

	public bool DoNotOverwriteTemplateMaterialProperties
	{
		get
		{
			return m_doNotOverwriteTemplateMaterialProperties;
		}
		set
		{
			m_doNotOverwriteTemplateMaterialProperties = value;
		}
	}

	public Color LineColor
	{
		get
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			return m_lineColor;
		}
		set
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: 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)
			CreateMaterial();
			if ((Object)null != (Object)(object)m_material)
			{
				m_lineColor = value;
				m_material.color = m_lineColor;
			}
		}
	}

	public float LineWidth
	{
		get
		{
			return m_lineWidth;
		}
		set
		{
			CreateMaterial();
			if ((Object)null != (Object)(object)m_material)
			{
				m_lineWidth = value;
				m_material.SetFloat("_LineWidth", m_lineWidth);
			}
			UpdateBounds();
		}
	}

	public float LightSaberFactor
	{
		get
		{
			return m_lightSaberFactor;
		}
		set
		{
			CreateMaterial();
			if ((Object)null != (Object)(object)m_material)
			{
				m_lightSaberFactor = value;
				m_material.SetFloat("_LightSaberFactor", m_lightSaberFactor);
			}
		}
	}

	public Vector3[] LineVertices => m_lineVertices;

	private void CreateMaterial()
	{
		if ((Object)null == (Object)(object)m_material || (Object)null == (Object)(object)((Renderer)((Component)this).GetComponent<MeshRenderer>()).sharedMaterial)
		{
			if ((Object)null != (Object)(object)m_templateMaterial)
			{
				m_material = Object.Instantiate<Material>(m_templateMaterial);
				((Renderer)((Component)this).GetComponent<MeshRenderer>()).sharedMaterial = m_material;
				SetAllMaterialProperties();
			}
			else
			{
				m_material = ((Renderer)((Component)this).GetComponent<MeshRenderer>()).sharedMaterial;
			}
		}
	}

	private void DestroyMaterial()
	{
		if ((Object)null != (Object)(object)m_material)
		{
			Object.DestroyImmediate((Object)(object)m_material);
			m_material = null;
		}
	}

	private float CalculateLineScale()
	{
		//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)
		return Vector3.Dot(((Component)this).transform.lossyScale, Average);
	}

	public void UpdateLineScale()
	{
		if ((Object)null != (Object)(object)m_material)
		{
			m_material.SetFloat("_LineScale", CalculateLineScale());
		}
	}

	private void SetAllMaterialProperties()
	{
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		UpdateLineVertices(m_lineVertices);
		if ((Object)null != (Object)(object)m_material)
		{
			if (!m_doNotOverwriteTemplateMaterialProperties)
			{
				m_material.color = m_lineColor;
				m_material.SetFloat("_LineWidth", m_lineWidth);
				m_material.SetFloat("_LightSaberFactor", m_lightSaberFactor);
			}
			UpdateLineScale();
		}
	}

	private Bounds CalculateBounds()
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: 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_008d: 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_009a: 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_0078: 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_01ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_0105: Unknown result type (might be due to invalid IL or missing references)
		//IL_0123: 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_0182: Unknown result type (might be due to invalid IL or missing references)
		//IL_018a: Unknown result type (might be due to invalid IL or missing references)
		//IL_018b: Unknown result type (might be due to invalid IL or missing references)
		//IL_018c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0199: Unknown result type (might be due to invalid IL or missing references)
		//IL_019b: Unknown result type (might be due to invalid IL or missing references)
		//IL_019c: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
		float num = Mathf.Max(new float[3]
		{
			((Component)this).transform.lossyScale.x,
			((Component)this).transform.lossyScale.y,
			((Component)this).transform.lossyScale.z
		});
		float num2 = num * LineWidth * 0.5f;
		Vector3 val = default(Vector3);
		((Vector3)(ref val))..ctor(num2, num2, num2);
		Bounds result;
		if (m_lineVertices.Length == 0)
		{
			result = default(Bounds);
			return result;
		}
		Vector3 val2 = m_lineVertices[0];
		Vector3 val3 = m_lineVertices[0];
		for (int i = 1; i < m_lineVertices.Length; i++)
		{
			((Vector3)(ref val2))..ctor(Mathf.Min(val2.x, m_lineVertices[i].x), Mathf.Min(val2.y, m_lineVertices[i].y), Mathf.Min(val2.z, m_lineVertices[i].z));
			((Vector3)(ref val3))..ctor(Mathf.Max(val3.x, m_lineVertices[i].x), Mathf.Max(val3.y, m_lineVertices[i].y), Mathf.Max(val3.z, m_lineVertices[i].z));
		}
		result = default(Bounds);
		((Bounds)(ref result)).min = val2 - val;
		((Bounds)(ref result)).max = val3 + val;
		return result;
	}

	public void UpdateBounds()
	{
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)null != (Object)(object)m_meshFilter)
		{
			Mesh sharedMesh = m_meshFilter.sharedMesh;
			if ((Object)null != (Object)(object)sharedMesh)
			{
				sharedMesh.bounds = CalculateBounds();
			}
		}
	}

	public void UpdateLineVertices(Vector3[] newSetOfVertices)
	{
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0071: 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_00a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: 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_00be: 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_0136: 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)
		//IL_0156: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c9: 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_01e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0203: Unknown result type (might be due to invalid IL or missing references)
		//IL_021b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0220: Unknown result type (might be due to invalid IL or missing references)
		//IL_0238: Unknown result type (might be due to invalid IL or missing references)
		//IL_023d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0255: Unknown result type (might be due to invalid IL or missing references)
		//IL_025a: 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_0277: Unknown result type (might be due to invalid IL or missing references)
		//IL_028f: 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_0394: Unknown result type (might be due to invalid IL or missing references)
		//IL_0399: Unknown result type (might be due to invalid IL or missing references)
		//IL_03b1: 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_03ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
		//IL_03f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_0408: Unknown result type (might be due to invalid IL or missing references)
		//IL_040d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0425: Unknown result type (might be due to invalid IL or missing references)
		//IL_042a: 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_0447: Unknown result type (might be due to invalid IL or missing references)
		//IL_045f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0464: Unknown result type (might be due to invalid IL or missing references)
		//IL_0493: Unknown result type (might be due to invalid IL or missing references)
		//IL_0498: 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_04b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_04c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_04cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_04e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_04e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_04fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0500: Unknown result type (might be due to invalid IL or missing references)
		//IL_0505: Unknown result type (might be due to invalid IL or missing references)
		//IL_051a: Unknown result type (might be due to invalid IL or missing references)
		//IL_051f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0524: Unknown result type (might be due to invalid IL or missing references)
		//IL_0539: Unknown result type (might be due to invalid IL or missing references)
		//IL_053e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0543: Unknown result type (might be due to invalid IL or missing references)
		//IL_0558: Unknown result type (might be due to invalid IL or missing references)
		//IL_055d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0562: 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)
		//IL_0306: Unknown result type (might be due to invalid IL or missing references)
		//IL_031e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0323: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c8: 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_033c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0341: Unknown result type (might be due to invalid IL or missing references)
		//IL_0359: Unknown result type (might be due to invalid IL or missing references)
		//IL_035e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0583: Unknown result type (might be due to invalid IL or missing references)
		//IL_0588: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a0: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_05bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_05c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_05c7: 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_05e4: Unknown result type (might be due to invalid IL or missing references)
		//IL_05e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_0625: Unknown result type (might be due to invalid IL or missing references)
		//IL_062a: 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_064d: Unknown result type (might be due to invalid IL or missing references)
		//IL_066b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0670: Unknown result type (might be due to invalid IL or missing references)
		//IL_068e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0693: Unknown result type (might be due to invalid IL or missing references)
		//IL_06b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_06b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_06bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_06d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_06de: Unknown result type (might be due to invalid IL or missing references)
		//IL_06e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0701: Unknown result type (might be due to invalid IL or missing references)
		//IL_0706: Unknown result type (might be due to invalid IL or missing references)
		//IL_070b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0729: Unknown result type (might be due to invalid IL or missing references)
		//IL_072e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0733: Unknown result type (might be due to invalid IL or missing references)
		if (newSetOfVertices == null)
		{
			return;
		}
		if (newSetOfVertices.Length < 3)
		{
			Debug.LogError((object)"Add at least 3 vertices to the VolumetricLineStrip");
			return;
		}
		m_lineVertices = newSetOfVertices;
		Vector3[] array = (Vector3[])(object)new Vector3[m_lineVertices.Length * 2 + 4];
		int[] array2 = new int[(m_lineVertices.Length * 2 + 2) * 3];
		int num = 0;
		int num2 = 0;
		array[num++] = m_lineVertices[0];
		array[num++] = m_lineVertices[0];
		for (int i = 0; i < m_lineVertices.Length; i++)
		{
			array[num++] = m_lineVertices[i];
			array[num++] = m_lineVertices[i];
			array2[num2++] = num - 2;
			array2[num2++] = num - 3;
			array2[num2++] = num - 4;
			array2[num2++] = num - 1;
			array2[num2++] = num - 2;
			array2[num2++] = num - 3;
		}
		array[num++] = m_lineVertices[m_lineVertices.Length - 1];
		array[num++] = m_lineVertices[m_lineVertices.Length - 1];
		array2[num2++] = num - 2;
		array2[num2++] = num - 3;
		array2[num2++] = num - 4;
		array2[num2++] = num - 1;
		array2[num2++] = num - 2;
		array2[num2++] = num - 3;
		Vector2[] array3 = (Vector2[])(object)new Vector2[array.Length];
		Vector2[] array4 = (Vector2[])(object)new Vector2[array.Length];
		int num3 = 0;
		int num4 = 0;
		array3[num3++] = new Vector2(1f, 0f);
		array3[num3++] = new Vector2(1f, 1f);
		array3[num3++] = new Vector2(0.5f, 0f);
		array3[num3++] = new Vector2(0.5f, 1f);
		array4[num4++] = new Vector2(1f, -1f);
		array4[num4++] = new Vector2(1f, 1f);
		array4[num4++] = new Vector2(0f, -1f);
		array4[num4++] = new Vector2(0f, 1f);
		for (int j = 1; j < m_lineVertices.Length - 1; j++)
		{
			if ((j & 1) == 1)
			{
				array3[num3++] = new Vector2(0.5f, 0f);
				array3[num3++] = new Vector2(0.5f, 1f);
			}
			else
			{
				array3[num3++] = new Vector2(0.5f, 0f);
				array3[num3++] = new Vector2(0.5f, 1f);
			}
			array4[num4++] = new Vector2(0f, 1f);
			array4[num4++] = new Vector2(0f, -1f);
		}
		array3[num3++] = new Vector2(0.5f, 0f);
		array3[num3++] = new Vector2(0.5f, 1f);
		array3[num3++] = new Vector2(0f, 0f);
		array3[num3++] = new Vector2(0f, 1f);
		array4[num4++] = new Vector2(0f, 1f);
		array4[num4++] = new Vector2(0f, -1f);
		array4[num4++] = new Vector2(1f, 1f);
		array4[num4++] = new Vector2(1f, -1f);
		Vector3[] array5 = (Vector3[])(object)new Vector3[array.Length];
		Vector4[] array6 = (Vector4[])(object)new Vector4[array.Length];
		int num5 = 0;
		int num6 = 0;
		array5[num5++] = m_lineVertices[1];
		array5[num5++] = m_lineVertices[1];
		array5[num5++] = m_lineVertices[1];
		array5[num5++] = m_lineVertices[1];
		array6[num6++] = Vector4.op_Implicit(m_lineVertices[1]);
		array6[num6++] = Vector4.op_Implicit(m_lineVertices[1]);
		array6[num6++] = Vector4.op_Implicit(m_lineVertices[1]);
		array6[num6++] = Vector4.op_Implicit(m_lineVertices[1]);
		for (int k = 1; k < m_lineVertices.Length - 1; k++)
		{
			array5[num5++] = m_lineVertices[k - 1];
			array5[num5++] = m_lineVertices[k - 1];
			array6[num6++] = Vector4.op_Implicit(m_lineVertices[k + 1]);
			array6[num6++] = Vector4.op_Implicit(m_lineVertices[k + 1]);
		}
		array5[num5++] = m_lineVertices[m_lineVertices.Length - 2];
		array5[num5++] = m_lineVertices[m_lineVertices.Length - 2];
		array5[num5++] = m_lineVertices[m_lineVertices.Length - 2];
		array5[num5++] = m_lineVertices[m_lineVertices.Length - 2];
		array6[num6++] = Vector4.op_Implicit(m_lineVertices[m_lineVertices.Length - 2]);
		array6[num6++] = Vector4.op_Implicit(m_lineVertices[m_lineVertices.Length - 2]);
		array6[num6++] = Vector4.op_Implicit(m_lineVertices[m_lineVertices.Length - 2]);
		array6[num6++] = Vector4.op_Implicit(m_lineVertices[m_lineVertices.Length - 2]);
		if ((Object)null != (Object)(object)m_meshFilter)
		{
			Mesh sharedMesh = m_meshFilter.sharedMesh;
			if ((Object)null != (Object)(object)sharedMesh)
			{
				sharedMesh.SetIndices((int[])null, (MeshTopology)0, 0);
				sharedMesh.vertices = array;
				sharedMesh.normals = array5;
				sharedMesh.tangents = array6;
				sharedMesh.uv = array3;
				sharedMesh.uv2 = array4;
				sharedMesh.SetIndices(array2, (MeshTopology)0, 0);
				UpdateBounds();
			}
		}
	}

	private void Start()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Expected O, but got Unknown
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		m_meshRenderer = ((Component)this).GetComponent<MeshRenderer>();
		Mesh mesh = new Mesh();
		m_meshFilter = ((Component)this).GetComponent<MeshFilter>();
		m_meshFilter.mesh = mesh;
		UpdateLineVertices(m_lineVertices);
		CreateMaterial();
		m_lineVertices[0] = Vector3.zero;
		lightsaberTrails = ((Component)this).GetComponentsInChildren<LightsaberTrail>();
	}

	private void OnDestroy()
	{
		if ((Object)null != (Object)(object)m_meshFilter)
		{
			if (Application.isPlaying)
			{
				Object.Destroy((Object)(object)m_meshFilter.sharedMesh);
			}
			else
			{
				Object.DestroyImmediate((Object)(object)m_meshFilter.sharedMesh);
			}
			m_meshFilter.sharedMesh = null;
		}
		DestroyMaterial();
	}

	private void Update()
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: 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_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: 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_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_0079: 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_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)
		targetLength = (start ? maxLengthVector : Vector3.zero);
		targetTrailLength = (start ? maxTrailLength : 0f);
		if (LineVertices[0] != targetLength)
		{
			Vector3 val = Vector3.Lerp(LineVertices[0], targetLength, speed * Time.deltaTime);
			LineVertices[0] = val;
			UpdateLineVertices(m_lineVertices);
			LightsaberTrail[] array = lightsaberTrails;
			foreach (LightsaberTrail lightsaberTrail in array)
			{
				lightsaberTrail.height = Mathf.Lerp(lightsaberTrail.height, targetTrailLength, speed * Time.deltaTime);
			}
		}
		if (!start && LineVertices[0] == Vector3.zero)
		{
			((Renderer)m_meshRenderer).enabled = false;
		}
		else
		{
			((Renderer)m_meshRenderer).enabled = true;
		}
		if (Object.op_Implicit((Object)(object)behaviour))
		{
			if (behaviour.start)
			{
				if (!hasStartDelay)
				{
					stopwatch = lengthDelay;
				}
				if (stopwatch < lengthDelay)
				{
					stopwatch += Time.deltaTime;
				}
			}
			else if (stopwatch > 0f)
			{
				stopwatch -= Time.deltaTime;
			}
			if (stopwatch >= lengthDelay)
			{
				if (play)
				{
					play = false;
				}
				start = true;
			}
			else if (stopwatch <= 0f)
			{
				if (!play)
				{
					play = true;
				}
				start = false;
			}
		}
		else if (start)
		{
			if (play)
			{
				play = false;
			}
		}
		else if (!play)
		{
			play = true;
		}
		if (((Component)this).transform.hasChanged)
		{
			UpdateLineScale();
			UpdateBounds();
		}
	}

	private void OnValidate()
	{
		//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_0021: 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)
		Scene scene = ((Component)this).gameObject.scene;
		if (!string.IsNullOrEmpty(((Scene)(ref scene)).name))
		{
			scene = ((Component)this).gameObject.scene;
			if (!string.IsNullOrEmpty(((Scene)(ref scene)).path))
			{
				CreateMaterial();
				SetAllMaterialProperties();
				UpdateBounds();
			}
		}
	}

	private void OnDrawGizmos()
	{
		//IL_0001: 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_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: 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)
		Gizmos.color = Color.green;
		if (m_lineVertices != null)
		{
			for (int i = 0; i < m_lineVertices.Length - 1; i++)
			{
				Gizmos.DrawLine(((Component)this).gameObject.transform.TransformPoint(m_lineVertices[i]), ((Component)this).gameObject.transform.TransformPoint(m_lineVertices[i + 1]));
			}
		}
	}
}

Dragon Ball Z/Dep/ModularMotion.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using ModularMotion.Core;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

[assembly: InternalsVisibleTo("ModularEditor")]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace ModularMotion.Core
{
	public class Motion
	{
		public enum MotionType
		{
			Position,
			Rotation,
			LocalScale,
			LightColor,
			LightIntensity,
			LightRange,
			FieldOfView,
			SpriteRendererColor,
			RawImageColor,
			ImageColor,
			AnchoredPosition,
			Size,
			Volume,
			Pitch,
			PanStereo,
			ShaderFloat,
			ShaderColor,
			ShaderInt,
			ShaderVector,
			Value,
			TextMeshColor,
			GUITextColor,
			TextColor,
			CanvasGroupAlpha,
			Spline
		}

		public enum LoopType
		{
			None,
			Loop,
			PingPong
		}

		public enum MotionStatus
		{
			Delayed,
			Running,
			Canceled,
			Stopped,
			Finished
		}

		public static List<MotionBase> currentMotions = new List<MotionBase>();

		private static MotionSystem _instance;

		private static AnimationCurve _easeIn;

		private static AnimationCurve _easeInStrong;

		private static AnimationCurve _easeOut;

		private static AnimationCurve _easeOutStrong;

		private static AnimationCurve _easeInOut;

		private static AnimationCurve _easeInOutStrong;

		private static AnimationCurve _easeInBack;

		private static AnimationCurve _easeOutBack;

		private static AnimationCurve _easeInOutBack;

		private static AnimationCurve _easeSpring;

		private static AnimationCurve _easeBounce;

		private static AnimationCurve _easeWobble;

		public static MotionSystem Instance
		{
			get
			{
				//IL_0028: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)_instance == (Object)null)
				{
					_instance = new GameObject("(Tween Engine)", new Type[1] { typeof(MotionSystem) }).GetComponent<MotionSystem>();
				}
				Object.DontDestroyOnLoad((Object)(object)((Component)_instance).gameObject);
				return _instance;
			}
		}

		public static AnimationCurve EaseLinear => new AnimationCurve((Keyframe[])(object)new Keyframe[2]
		{
			new Keyframe(0f, 0f, 0f, 0f, 0f, 0f),
			new Keyframe(1f, 1f, 0f, 0f, 0f, 0f)
		});

		public static AnimationCurve EaseIn
		{
			get
			{
				//IL_002b: 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_0050: 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_005a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0064: Expected O, but got Unknown
				if (_easeIn == null)
				{
					_easeIn = new AnimationCurve((Keyframe[])(object)new Keyframe[2]
					{
						new Keyframe(0f, 0f, 0f, 0f),
						new Keyframe(1f, 1f, 1f, 0f)
					});
				}
				return _easeIn;
			}
		}

		public static AnimationCurve EaseInStrong
		{
			get
			{
				//IL_002b: 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_0050: 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_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_009a: 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_00bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f8: Expected O, but got Unknown
				if (_easeInStrong == null)
				{
					_easeInStrong = new AnimationCurve((Keyframe[])(object)new Keyframe[6]
					{
						new Keyframe(0f, 0f, 0.03f, 0.03f),
						new Keyframe(0.45f, 0.03f, 0.2333333f, 0.2333333f),
						new Keyframe(0.7f, 0.13f, 0.7666667f, 0.7666667f),
						new Keyframe(0.85f, 0.3f, 2.233334f, 2.233334f),
						new Keyframe(0.925f, 0.55f, 4.666665f, 4.666665f),
						new Keyframe(1f, 1f, 5.999996f, 5.999996f)
					});
				}
				return _easeInStrong;
			}
		}

		public static AnimationCurve EaseOut
		{
			get
			{
				//IL_002b: 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_0050: 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_005a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0064: Expected O, but got Unknown
				if (_easeOut == null)
				{
					_easeOut = new AnimationCurve((Keyframe[])(object)new Keyframe[2]
					{
						new Keyframe(0f, 0f, 0f, 1f),
						new Keyframe(1f, 1f, 0f, 0f)
					});
				}
				return _easeOut;
			}
		}

		public static AnimationCurve EaseOutStrong
		{
			get
			{
				//IL_002b: 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_0050: 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_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_009a: 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_00bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f8: Expected O, but got Unknown
				if (_easeOutStrong == null)
				{
					_easeOutStrong = new AnimationCurve((Keyframe[])(object)new Keyframe[6]
					{
						new Keyframe(0f, 0f, 13.80198f, 13.80198f),
						new Keyframe(0.04670785f, 0.3973127f, 5.873408f, 5.873408f),
						new Keyframe(0.1421811f, 0.7066917f, 2.313627f, 2.313627f),
						new Keyframe(0.2483539f, 0.8539293f, 0.9141542f, 0.9141542f),
						new Keyframe(0.4751028f, 0.954047f, 0.264541f, 0.264541f),
						new Keyframe(1f, 1f, 0.03f, 0.03f)
					});
				}
				return _easeOutStrong;
			}
		}

		public static AnimationCurve EaseInOut
		{
			get
			{
				if (_easeInOut == null)
				{
					_easeInOut = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);
				}
				return _easeInOut;
			}
		}

		public static AnimationCurve EaseInOutStrong
		{
			get
			{
				//IL_002b: 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_0050: 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_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_0089: Expected O, but got Unknown
				if (_easeInOutStrong == null)
				{
					_easeInOutStrong = new AnimationCurve((Keyframe[])(object)new Keyframe[3]
					{
						new Keyframe(0f, 0f, 0.03f, 0.03f),
						new Keyframe(0.5f, 0.5f, 3.257158f, 3.257158f),
						new Keyframe(1f, 1f, 0.03f, 0.03f)
					});
				}
				return _easeInOutStrong;
			}
		}

		public static AnimationCurve EaseInBack
		{
			get
			{
				//IL_002b: 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_0050: 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_005a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0064: Expected O, but got Unknown
				if (_easeInBack == null)
				{
					_easeInBack = new AnimationCurve((Keyframe[])(object)new Keyframe[2]
					{
						new Keyframe(0f, 0f, -1.1095f, -1.1095f),
						new Keyframe(1f, 1f, 2f, 2f)
					});
				}
				return _easeInBack;
			}
		}

		public static AnimationCurve EaseOutBack
		{
			get
			{
				//IL_002b: 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_0050: 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_005a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0064: Expected O, but got Unknown
				if (_easeOutBack == null)
				{
					_easeOutBack = new AnimationCurve((Keyframe[])(object)new Keyframe[2]
					{
						new Keyframe(0f, 0f, 2f, 2f),
						new Keyframe(1f, 1f, -1.1095f, -1.1095f)
					});
				}
				return _easeOutBack;
			}
		}

		public static AnimationCurve EaseInOutBack
		{
			get
			{
				//IL_002b: 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_0050: 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_005a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0064: Expected O, but got Unknown
				if (_easeInOutBack == null)
				{
					_easeInOutBack = new AnimationCurve((Keyframe[])(object)new Keyframe[2]
					{
						new Keyframe(1f, 1f, -1.754543f, -1.754543f),
						new Keyframe(0f, 0f, -1.754543f, -1.754543f)
					});
				}
				return _easeInOutBack;
			}
		}

		public static AnimationCurve EaseSpring
		{
			get
			{
				//IL_002b: 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_0050: 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_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_009a: 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_00bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d3: Expected O, but got Unknown
				if (_easeSpring == null)
				{
					_easeSpring = new AnimationCurve((Keyframe[])(object)new Keyframe[5]
					{
						new Keyframe(0f, -0.0003805831f, 8.990726f, 8.990726f),
						new Keyframe(0.35f, 1f, -4.303913f, -4.303913f),
						new Keyframe(0.55f, 1f, 1.554695f, 1.554695f),
						new Keyframe(0.7730452f, 1f, -2.007816f, -2.007816f),
						new Keyframe(1f, 1f, -1.23451f, -1.23451f)
					});
				}
				return _easeSpring;
			}
		}

		public static AnimationCurve EaseBounce
		{
			get
			{
				//IL_002c: 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_0051: 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_0076: 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_009b: 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_00c0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c5: 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_00ea: Unknown result type (might be due to invalid IL or missing references)
				//IL_010a: Unknown result type (might be due to invalid IL or missing references)
				//IL_010f: 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_0154: 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_015e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0168: Expected O, but got Unknown
				if (_easeBounce == null)
				{
					_easeBounce = new AnimationCurve((Keyframe[])(object)new Keyframe[9]
					{
						new Keyframe(0f, 0f, 0f, 0f),
						new Keyframe(0.25f, 1f, 11.73749f, -5.336508f),
						new Keyframe(0.4f, 0.6f, -0.1904764f, -0.1904764f),
						new Keyframe(0.575f, 1f, 5.074602f, -3.89f),
						new Keyframe(0.7f, 0.75f, 0.001192093f, 0.001192093f),
						new Keyframe(0.825f, 1f, 4.18469f, -2.657566f),
						new Keyframe(0.895f, 0.9f, 0f, 0f),
						new Keyframe(0.95f, 1f, 3.196362f, -2.028364f),
						new Keyframe(1f, 1f, 2.258884f, 0.5f)
					});
				}
				return _easeBounce;
			}
		}

		public static AnimationCurve EaseWobble
		{
			get
			{
				//IL_002b: 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_0050: 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_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_009a: 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_00bf: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
				//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
				//IL_0109: Unknown result type (might be due to invalid IL or missing references)
				//IL_010e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0113: Unknown result type (might be due to invalid IL or missing references)
				//IL_011d: Expected O, but got Unknown
				if (_easeWobble == null)
				{
					_easeWobble = new AnimationCurve((Keyframe[])(object)new Keyframe[7]
					{
						new Keyframe(0f, 0f, 11.01978f, 30.76278f),
						new Keyframe(0.08054394f, 1f, 0f, 0f),
						new Keyframe(0.3153235f, -0.75f, 0f, 0f),
						new Keyframe(0.5614113f, 0.5f, 0f, 0f),
						new Keyframe(0.75f, -0.25f, 0f, 0f),
						new Keyframe(0.9086903f, 0.1361611f, 0f, 0f),
						new Keyframe(1f, 0f, -4.159244f, -1.351373f)
					});
				}
				return _easeWobble;
			}
		}

		public static MotionBase Value(Rect startValue, Rect endValue, Action<Rect> valueUpdatedCallback, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			ValueRect valueRect = new ValueRect(startValue, endValue, valueUpdatedCallback, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(valueRect, interrupt: true);
			return valueRect;
		}

		public static MotionBase Value(Vector4 startValue, Vector4 endValue, Action<Vector4> valueUpdatedCallback, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			ValueVector4 valueVector = new ValueVector4(startValue, endValue, valueUpdatedCallback, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(valueVector);
			return valueVector;
		}

		public static MotionBase Value(Vector3 startValue, Vector3 endValue, Action<Vector3> valueUpdatedCallback, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			ValueVector3 valueVector = new ValueVector3(startValue, endValue, valueUpdatedCallback, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(valueVector);
			return valueVector;
		}

		public static MotionBase Value(Vector2 startValue, Vector2 endValue, Action<Vector2> valueUpdatedCallback, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			ValueVector2 valueVector = new ValueVector2(startValue, endValue, valueUpdatedCallback, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(valueVector);
			return valueVector;
		}

		public static MotionBase Value(Color startValue, Color endValue, int instanceID, string targetComponent, Action<string, Color> valueUpdatedCallback, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			ValueColor valueColor = new ValueColor(startValue, endValue, instanceID, targetComponent, valueUpdatedCallback, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(valueColor, interrupt: true);
			return valueColor;
		}

		public static MotionBase Value(int startValue, int endValue, Action<int> valueUpdatedCallback, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			ValueInt valueInt = new ValueInt(startValue, endValue, valueUpdatedCallback, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(valueInt);
			return valueInt;
		}

		public static MotionBase Value(float startValue, float endValue, Action<float> valueUpdatedCallback, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			ValueFloat valueFloat = new ValueFloat(startValue, endValue, valueUpdatedCallback, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(valueFloat);
			return valueFloat;
		}

		public static MotionBase Size(RectTransform target, Vector2 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			Size size = new Size(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(size, interrupt: true);
			return size;
		}

		public static MotionBase Size(RectTransform target, Vector2 startValue, Vector2 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0001: 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)
			target.sizeDelta = startValue;
			return Size(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
		}

		public static MotionBase LocalScale(Transform target, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			LocalScale localScale = new LocalScale(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(localScale, interrupt: true);
			return localScale;
		}

		public static MotionBase LocalScale(Transform target, Vector3 startValue, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0001: 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)
			target.localScale = startValue;
			return LocalScale(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
		}

		public static MotionBase Position(Transform target, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			Position position = new Position(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(position, interrupt: true);
			return position;
		}

		public static MotionBase Position(Transform target, Vector3 startValue, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0001: 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)
			target.position = startValue;
			return Position(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
		}

		public static MotionBase AnchoredPosition(RectTransform target, Vector2 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			AnchoredPosition anchoredPosition = new AnchoredPosition(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(anchoredPosition, interrupt: true);
			return anchoredPosition;
		}

		public static MotionBase AnchoredPosition(RectTransform target, Vector2 startValue, Vector2 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0001: 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)
			target.anchoredPosition = startValue;
			return AnchoredPosition(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
		}

		public static MotionBase LocalPosition(Transform target, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			LocalPosition localPosition = new LocalPosition(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(localPosition, interrupt: true);
			return localPosition;
		}

		public static MotionBase LocalPosition(Transform target, Vector3 startValue, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0001: 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)
			target.localPosition = startValue;
			return LocalPosition(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
		}

		public static MotionBase Rotate(Transform target, Vector3 amount, Space space, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//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)
			Rotate rotate = new Rotate(target, amount, space, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(rotate, interrupt: true);
			return rotate;
		}

		public static MotionBase Rotation(Transform target, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: 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_0011: Unknown result type (might be due to invalid IL or missing references)
			Quaternion val = Quaternion.Euler(endValue);
			endValue = ((Quaternion)(ref val)).eulerAngles;
			Rotation rotation = new Rotation(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(rotation, interrupt: true);
			return rotation;
		}

		public static MotionBase Rotation(Transform target, Vector3 startValue, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: 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_0010: 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_0016: 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_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: 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)
			Quaternion val = Quaternion.Euler(startValue);
			startValue = ((Quaternion)(ref val)).eulerAngles;
			Quaternion val2 = Quaternion.Euler(endValue);
			endValue = ((Quaternion)(ref val2)).eulerAngles;
			target.rotation = Quaternion.Euler(startValue);
			return Rotation(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
		}

		public static MotionBase Rotation(Transform target, Quaternion endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			Rotation rotation = new Rotation(target, ((Quaternion)(ref endValue)).eulerAngles, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(rotation, interrupt: true);
			return rotation;
		}

		public static MotionBase Rotation(Transform target, Quaternion startValue, Quaternion endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0001: 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)
			target.rotation = startValue;
			return Rotation(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
		}

		public static MotionBase LocalRotation(Transform target, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: 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_0011: Unknown result type (might be due to invalid IL or missing references)
			Quaternion val = Quaternion.Euler(endValue);
			endValue = ((Quaternion)(ref val)).eulerAngles;
			LocalRotation localRotation = new LocalRotation(target, endValue, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(localRotation, interrupt: true);
			return localRotation;
		}

		public static MotionBase LocalRotation(Transform target, Vector3 startValue, Vector3 endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: 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_0010: 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_0016: 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_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: 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)
			Quaternion val = Quaternion.Euler(startValue);
			startValue = ((Quaternion)(ref val)).eulerAngles;
			Quaternion val2 = Quaternion.Euler(endValue);
			endValue = ((Quaternion)(ref val2)).eulerAngles;
			target.localRotation = Quaternion.Euler(startValue);
			return LocalRotation(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
		}

		public static MotionBase LocalRotation(Transform target, Quaternion endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			LocalRotation localRotation = new LocalRotation(target, ((Quaternion)(ref endValue)).eulerAngles, duration, delay, obeyTimescale, easeCurve, loop, startCallback, completeCallback);
			SendTweenForProcessing(localRotation, interrupt: true);
			return localRotation;
		}

		public static MotionBase LocalRotation(Transform target, Quaternion startValue, Quaternion endValue, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0001: 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)
			target.localRotation = startValue;
			return LocalRotation(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
		}

		public static MotionBase LookAt(Transform target, Transform targetToLookAt, Vector3 up, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//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_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: 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_001b: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = targetToLookAt.position - target.position;
			Quaternion endValue = Quaternion.LookRotation(val, up);
			return Rotation(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
		}

		public static MotionBase LookAt(Transform target, Vector3 positionToLookAt, Vector3 up, float duration, float delay, AnimationCurve easeCurve = null, LoopType loop = LoopType.None, Action startCallback = null, Action completeCallback = null, bool obeyTimescale = true)
		{
			//IL_0000: 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_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_000d: 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_000f: 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_0016: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = positionToLookAt - target.position;
			Quaternion endValue = Quaternion.LookRotation(val, up);
			return Rotation(target, endValue, duration, delay, easeCurve, loop, startCallback, completeCallback, obeyTimescale);
		}

		public static void Stop(int targetInstanceID, MotionType tweenType)
		{
			if (targetInstanceID == -1)
			{
				return;
			}
			for (int i = 0; i < currentMotions.Count; i++)
			{
				if (currentMotions[i].targetInstanceID == targetInstanceID && currentMotions[i].motionType == tweenType && currentMotions[i].Status != 0)
				{
					currentMotions[i].Stop();
				}
			}
		}

		public static void Stop(int targetInstanceID)
		{
			StopInstanceTarget(targetInstanceID);
		}

		public static void StopAll()
		{
			foreach (MotionBase currentMotion in currentMotions)
			{
				currentMotion.Stop();
			}
		}

		public static void FinishAll()
		{
			foreach (MotionBase currentMotion in currentMotions)
			{
				currentMotion.Finish();
			}
		}

		public static void Finish(int targetInstanceID)
		{
			FinishInstanceTarget(targetInstanceID);
		}

		public static void Cancel(int targetInstanceID)
		{
			CancelInstanceTarget(targetInstanceID);
		}

		public static void CancelAll()
		{
			foreach (MotionBase currentMotion in currentMotions)
			{
				currentMotion.Cancel();
			}
		}

		private static void StopInstanceTarget(int id)
		{
			for (int i = 0; i < currentMotions.Count; i++)
			{
				if (currentMotions[i].targetInstanceID == id)
				{
					currentMotions[i].Stop();
				}
			}
		}

		private static void StopInstanceTargetType(int id, MotionType type)
		{
			for (int i = 0; i < currentMotions.Count; i++)
			{
				if (currentMotions[i].targetInstanceID == id && currentMotions[i].motionType == type)
				{
					currentMotions[i].Stop();
				}
			}
		}

		private static void FinishInstanceTarget(int id)
		{
			for (int i = 0; i < currentMotions.Count; i++)
			{
				if (currentMotions[i].targetInstanceID == id)
				{
					currentMotions[i].Finish();
				}
			}
		}

		private static void CancelInstanceTarget(int id)
		{
			for (int i = 0; i < currentMotions.Count; i++)
			{
				if (currentMotions[i].targetInstanceID == id)
				{
					currentMotions[i].Cancel();
				}
			}
		}

		private static void SendTweenForProcessing(MotionBase tween, bool interrupt = false)
		{
			if (Application.isPlaying)
			{
				if (interrupt && tween.Delay == 0f)
				{
					StopInstanceTargetType(tween.targetInstanceID, tween.motionType);
				}
				Instance.ExecuteTween(tween);
			}
		}
	}
	[Serializable]
	public abstract class MotionBase
	{
		public int targetInstanceID;

		public Motion.MotionType motionType;

		protected float elapsedTime = 0f;

		public Motion.MotionStatus Status { get; private set; }

		public float Duration { get; private set; }

		public AnimationCurve Curve { get; private set; }

		public Keyframe[] CurveKeys { get; private set; }

		public bool ObeyTimescale { get; private set; }

		public Action StartCallback { get; private set; }

		public Action CompleteCallback { get; private set; }

		public float Delay { get; private set; }

		public Motion.LoopType LoopType { get; private set; }

		public float Percentage { get; private set; }

		public void Stop()
		{
			Status = Motion.MotionStatus.Stopped;
		}

		public void Start()
		{
			elapsedTime = 0f;
			if (Status == Motion.MotionStatus.Canceled || Status == Motion.MotionStatus.Finished || Status == Motion.MotionStatus.Stopped)
			{
				Status = Motion.MotionStatus.Running;
				Operation(0f);
				Motion.Instance.ExecuteTween(this);
			}
		}

		public void Resume()
		{
			if (Status == Motion.MotionStatus.Stopped && Status == Motion.MotionStatus.Stopped)
			{
				Status = Motion.MotionStatus.Running;
				Motion.Instance.ExecuteTween(this);
			}
		}

		public void Rewind()
		{
			Cancel();
			Operation(0f);
		}

		public void Cancel()
		{
			Status = Motion.MotionStatus.Canceled;
		}

		public void Finish()
		{
			Status = Motion.MotionStatus.Finished;
		}

		public bool Tick()
		{
			if (Status == Motion.MotionStatus.Stopped)
			{
				return false;
			}
			if (Status == Motion.MotionStatus.Canceled)
			{
				Operation(0f);
				Percentage = 0f;
				return false;
			}
			if (Status == Motion.MotionStatus.Finished)
			{
				Operation(1f);
				Percentage = 1f;
				if (CompleteCallback != null)
				{
					CompleteCallback();
				}
				return false;
			}
			float num = 0f;
			if (ObeyTimescale)
			{
				elapsedTime += Time.deltaTime;
			}
			else
			{
				elapsedTime += Time.unscaledDeltaTime;
			}
			num = Math.Max(elapsedTime, 0f);
			float num2 = Mathf.Min(num / Duration, 1f);
			if (num2 == 0f && Status != 0)
			{
				Status = Motion.MotionStatus.Delayed;
			}
			if (num2 > 0f && Status == Motion.MotionStatus.Delayed)
			{
				Motion.Stop(targetInstanceID, motionType);
				if (!SetStartValue())
				{
					return false;
				}
				if (StartCallback != null)
				{
					StartCallback();
				}
				Status = Motion.MotionStatus.Running;
			}
			float percentage = num2;
			if (Curve != null && CurveKeys.Length > 0)
			{
				percentage = MotionHelpers.EvaluateCurve(Curve, num2);
			}
			if (Status == Motion.MotionStatus.Running)
			{
				try
				{
					Operation(percentage);
					Percentage = percentage;
				}
				catch (Exception ex)
				{
					Debug.LogError((object)ex);
					return false;
				}
			}
			if (num2 == 1f)
			{
				if (CompleteCallback != null)
				{
					CompleteCallback();
				}
				switch (LoopType)
				{
				case Motion.LoopType.Loop:
					Loop();
					break;
				case Motion.LoopType.PingPong:
					PingPong();
					break;
				default:
					Status = Motion.MotionStatus.Finished;
					return false;
				}
			}
			return true;
		}

		protected void ResetStartTime()
		{
			elapsedTime = 0f - Delay;
		}

		protected void SetEssentials(Motion.MotionType motionType, int targetInstanceID, float duration, float delay, bool obeyTimeScale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
		{
			this.motionType = motionType;
			this.targetInstanceID = targetInstanceID;
			if (delay > 0f)
			{
				Status = Motion.MotionStatus.Delayed;
			}
			Duration = duration;
			Delay = delay;
			Curve = curve;
			CurveKeys = ((curve != null) ? curve.keys : null);
			StartCallback = startCallback;
			CompleteCallback = completeCallback;
			LoopType = loop;
			ObeyTimescale = obeyTimeScale;
			ResetStartTime();
		}

		protected abstract bool SetStartValue();

		protected abstract void Operation(float percentage);

		public abstract void Loop();

		public abstract void PingPong();
	}
	public class MotionHelpers : MonoBehaviour
	{
		public static void GenerateAnimationCurvePropertyCode(AnimationCurve curve)
		{
			//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)
			string text = "get { return new AnimationCurve (";
			for (int i = 0; i < curve.keys.Length; i++)
			{
				Keyframe val = curve.keys[i];
				string text2 = text;
				text = text2 + "new Keyframe (" + ((Keyframe)(ref val)).time + "f, " + ((Keyframe)(ref val)).value + "f, " + ((Keyframe)(ref val)).inTangent + "f, " + ((Keyframe)(ref val)).outTangent + "f)";
				if (i < curve.keys.Length - 1)
				{
					text += ", ";
				}
			}
			text += "); }";
			Debug.Log((object)text);
		}

		public static float LinearInterpolate(float from, float to, float percentage)
		{
			return (to - from) * percentage + from;
		}

		public static Vector2 LinearInterpolate(Vector2 from, Vector2 to, float percentage)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			return new Vector2(LinearInterpolate(from.x, to.x, percentage), LinearInterpolate(from.y, to.y, percentage));
		}

		public static Vector3 LinearInterpolate(Vector3 from, Vector3 to, float percentage)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			return new Vector3(LinearInterpolate(from.x, to.x, percentage), LinearInterpolate(from.y, to.y, percentage), LinearInterpolate(from.z, to.z, percentage));
		}

		public static Vector3 LinearInterpolateRotational(Vector3 from, Vector3 to, float percentage)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			return new Vector3(CylindricalLerp(from.x, to.x, percentage), CylindricalLerp(from.y, to.y, percentage), CylindricalLerp(from.z, to.z, percentage));
		}

		public static Vector4 LinearInterpolate(Vector4 from, Vector4 to, float percentage)
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			return new Vector4(LinearInterpolate(from.x, to.x, percentage), LinearInterpolate(from.y, to.y, percentage), LinearInterpolate(from.z, to.z, percentage), LinearInterpolate(from.w, to.w, percentage));
		}

		public static Rect LinearInterpolate(Rect from, Rect to, float percentage)
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			return new Rect(LinearInterpolate(((Rect)(ref from)).x, ((Rect)(ref to)).x, percentage), LinearInterpolate(((Rect)(ref from)).y, ((Rect)(ref to)).y, percentage), LinearInterpolate(((Rect)(ref from)).width, ((Rect)(ref to)).width, percentage), LinearInterpolate(((Rect)(ref from)).height, ((Rect)(ref to)).height, percentage));
		}

		public static Color LinearInterpolate(Color from, Color to, float percentage)
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			return new Color(LinearInterpolate(from.r, to.r, percentage), LinearInterpolate(from.g, to.g, percentage), LinearInterpolate(from.b, to.b, percentage), LinearInterpolate(from.a, to.a, percentage));
		}

		public static float EvaluateCurve(AnimationCurve curve, float percentage)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			Keyframe val = curve[curve.length - 1];
			return curve.Evaluate(((Keyframe)(ref val)).time * percentage);
		}

		private static float CylindricalLerp(float from, float to, float percentage)
		{
			float num = 0f;
			float num2 = 360f;
			float num3 = Mathf.Abs((num2 - num) * 0.5f);
			float num4 = 0f;
			float num5 = 0f;
			if (to - from < 0f - num3)
			{
				num5 = (num2 - from + to) * percentage;
				return from + num5;
			}
			if (to - from > num3)
			{
				num5 = (0f - (num2 - to + from)) * percentage;
				return from + num5;
			}
			return from + (to - from) * percentage;
		}
	}
	public static class CanvasPositioningExtensions
	{
		public static Vector3 WorldToCanvasPosition(this Canvas canvas, Vector3 worldPosition, Camera camera = null)
		{
			//IL_0014: 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_001c: 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)
			if ((Object)(object)camera == (Object)null)
			{
				camera = Camera.main;
			}
			Vector3 viewportPosition = camera.WorldToViewportPoint(worldPosition);
			return canvas.ViewportToCanvasPosition(viewportPosition);
		}

		public static Vector3 ScreenToCanvasPosition(this Canvas canvas, Vector3 screenPosition)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			Vector3 viewportPosition = default(Vector3);
			((Vector3)(ref viewportPosition))..ctor(screenPosition.x / (float)Screen.width, screenPosition.y / (float)Screen.height, 0f);
			return canvas.ViewportToCanvasPosition(viewportPosition);
		}

		public static Vector3 ViewportToCanvasPosition(this Canvas canvas, Vector3 viewportPosition)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: 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_0023: 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_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: 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_0030: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = viewportPosition - new Vector3(0.5f, 0.5f, 0f);
			RectTransform component = ((Component)canvas).GetComponent<RectTransform>();
			Vector2 sizeDelta = component.sizeDelta;
			return Vector3.Scale(val, Vector2.op_Implicit(sizeDelta));
		}
	}
	[ExecuteInEditMode]
	public class MotionSound : MonoBehaviour
	{
		public static MotionSound main;

		public static float masterVolume;

		private void Awake()
		{
		}

		private void Start()
		{
			main = this;
			masterVolume = 1f;
		}

		public void PlaySound(AudioClip Clip)
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Expected O, but got Unknown
			AudioSource[] componentsInChildren = ((Component)this).GetComponentsInChildren<AudioSource>();
			AudioSource[] array = componentsInChildren;
			foreach (AudioSource val in array)
			{
				if (((Object)val).name == ((Object)Clip).name)
				{
					return;
				}
			}
			GameObject val2 = new GameObject();
			val2.transform.SetParent(((Component)this).gameObject.transform);
			val2.AddComponent<AudioSource>();
			((Object)val2).name = ((Object)Clip).name;
			val2.GetComponent<AudioSource>().clip = Clip;
			val2.GetComponent<AudioSource>().Play();
		}

		public void PlaySound(string SoundPath, float Pitch, Vector3 Location)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject();
			val.transform.position = Location;
			val.transform.parent = ((Component)this).gameObject.transform;
			val.AddComponent<AudioSource>();
			((Object)val).name = SoundPath;
			val.GetComponent<AudioSource>().clip = Resources.Load<AudioClip>(SoundPath);
			val.GetComponent<AudioSource>().rolloffMode = (AudioRolloffMode)1;
			val.GetComponent<AudioSource>().spatialBlend = 1f;
			val.GetComponent<AudioSource>().maxDistance = 15f;
			val.GetComponent<AudioSource>().pitch = Pitch;
			if (Pitch < 0f)
			{
				val.GetComponent<AudioSource>().timeSamples = val.GetComponent<AudioSource>().clip.samples - 1;
			}
			val.GetComponent<AudioSource>().Play();
		}

		public void PlaySound(string SoundPath, Vector3 Location, params float[] Volume)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject();
			val.transform.position = Location;
			val.transform.parent = ((Component)this).gameObject.transform;
			val.AddComponent<AudioSource>();
			((Object)val).name = SoundPath;
			val.GetComponent<AudioSource>().clip = Resources.Load<AudioClip>(SoundPath);
			val.GetComponent<AudioSource>().rolloffMode = (AudioRolloffMode)1;
			val.GetComponent<AudioSource>().spatialBlend = 1f;
			val.GetComponent<AudioSource>().maxDistance = 15f;
			if (Volume.Length > 0)
			{
				val.GetComponent<AudioSource>().volume = Volume[0] * masterVolume;
			}
			val.GetComponent<AudioSource>().Play();
		}

		public void PlaySound(AudioClip SoundClip, Vector3 Location, float Pitch, params float[] Volume)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject();
			val.transform.position = Location;
			val.transform.parent = ((Component)this).gameObject.transform;
			val.AddComponent<AudioSource>();
			((Object)val).name = ((Object)SoundClip).name;
			val.GetComponent<AudioSource>().clip = SoundClip;
			val.GetComponent<AudioSource>().rolloffMode = (AudioRolloffMode)1;
			val.GetComponent<AudioSource>().spatialBlend = 1f;
			val.GetComponent<AudioSource>().maxDistance = 100f;
			if (Volume.Length > 0)
			{
				val.GetComponent<AudioSource>().volume = Volume[0] * masterVolume;
			}
			val.GetComponent<AudioSource>().pitch = Pitch;
			val.GetComponent<AudioSource>().Play();
		}

		public void PlaySound(AudioClip SoundClip, float Pitch, float Volume, float MinRange, float MaxRange, bool AllowMultipleSounds)
		{
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			if (!AllowMultipleSounds)
			{
				AudioSource[] componentsInChildren = ((Component)this).GetComponentsInChildren<AudioSource>();
				AudioSource[] array = componentsInChildren;
				foreach (AudioSource val in array)
				{
					if (((Object)val).name == ((Object)SoundClip).name)
					{
						return;
					}
				}
			}
			GameObject val2 = new GameObject();
			val2.transform.SetParent(((Component)this).gameObject.transform);
			val2.AddComponent<AudioSource>();
			((Object)val2).name = ((Object)SoundClip).name;
			val2.GetComponent<AudioSource>().clip = SoundClip;
			val2.GetComponent<AudioSource>().volume = Volume * masterVolume;
			val2.GetComponent<AudioSource>().pitch = Pitch;
			float num2;
			if (Pitch < 0f)
			{
				val2.GetComponent<AudioSource>().timeSamples = val2.GetComponent<AudioSource>().clip.samples - 1;
				float num = val2.GetComponent<AudioSource>().clip.length * (MaxRange - MinRange);
				val2.GetComponent<AudioSource>().time = val2.GetComponent<AudioSource>().clip.length - val2.GetComponent<AudioSource>().clip.length * MinRange - 0.01f;
				num2 = num / Mathf.Abs(Pitch);
			}
			else
			{
				val2.GetComponent<AudioSource>().time = val2.GetComponent<AudioSource>().clip.length * MinRange;
				num2 = val2.GetComponent<AudioSource>().clip.length * (MaxRange - MinRange);
			}
			float time = val2.GetComponent<AudioSource>().time;
			val2.GetComponent<AudioSource>().Play();
			val2.GetComponent<AudioSource>().SetScheduledEndTime(AudioSettings.dspTime + (double)(num2 - time));
		}

		public void PlaySound(string SoundPath)
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Expected O, but got Unknown
			AudioSource[] componentsInChildren = ((Component)this).GetComponentsInChildren<AudioSource>();
			AudioSource[] array = componentsInChildren;
			foreach (AudioSource val in array)
			{
				if (((Object)val).name == SoundPath)
				{
					return;
				}
			}
			GameObject val2 = new GameObject();
			val2.transform.SetParent(((Component)this).gameObject.transform);
			val2.AddComponent<AudioSource>();
			((Object)val2).name = SoundPath;
			val2.GetComponent<AudioSource>().clip = Resources.Load<AudioClip>(SoundPath);
			val2.GetComponent<AudioSource>().Play();
		}

		public void PlaySound(string SoundPath, float pitch)
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Expected O, but got Unknown
			AudioSource[] componentsInChildren = ((Component)this).GetComponentsInChildren<AudioSource>();
			AudioSource[] array = componentsInChildren;
			foreach (AudioSource val in array)
			{
				if (((Object)val).name == SoundPath)
				{
					return;
				}
			}
			GameObject val2 = new GameObject();
			val2.transform.SetParent(((Component)this).gameObject.transform);
			val2.AddComponent<AudioSource>();
			((Object)val2).name = SoundPath;
			val2.GetComponent<AudioSource>().clip = Resources.Load<AudioClip>(SoundPath);
			val2.GetComponent<AudioSource>().pitch = pitch;
			if (pitch < 0f)
			{
				val2.GetComponent<AudioSource>().timeSamples = val2.GetComponent<AudioSource>().clip.samples - 1;
			}
			val2.GetComponent<AudioSource>().Play();
		}

		public void PlaySound(string SoundPath, float pitch, float Volume, bool AllowMultipleSounds = false, bool Loop = false)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Expected O, but got Unknown
			if (!AllowMultipleSounds)
			{
				AudioSource[] componentsInChildren = ((Component)this).GetComponentsInChildren<AudioSource>();
				AudioSource[] array = componentsInChildren;
				foreach (AudioSource val in array)
				{
					if (((Object)val).name == SoundPath)
					{
						return;
					}
				}
			}
			GameObject val2 = new GameObject();
			val2.transform.SetParent(((Component)this).gameObject.transform);
			val2.AddComponent<AudioSource>();
			((Object)val2).name = SoundPath;
			val2.GetComponent<AudioSource>().clip = Resources.Load<AudioClip>(SoundPath);
			val2.GetComponent<AudioSource>().volume = Volume * masterVolume;
			val2.GetComponent<AudioSource>().pitch = pitch;
			val2.GetComponent<AudioSource>().loop = Loop;
			if (pitch < 0f)
			{
				val2.GetComponent<AudioSource>().timeSamples = val2.GetComponent<AudioSource>().clip.samples - 1;
			}
			val2.GetComponent<AudioSource>().Play();
		}

		public void StopSound(string SoundName)
		{
			AudioSource[] componentsInChildren = ((Component)this).GetComponentsInChildren<AudioSource>();
			AudioSource[] array = componentsInChildren;
			foreach (AudioSource val in array)
			{
				if (((Object)val.clip).name == SoundName)
				{
					Object.Destroy((Object)(object)((Component)val).gameObject);
				}
			}
		}

		public void StopFirstSound(string SoundName)
		{
			AudioSource[] componentsInChildren = ((Component)this).GetComponentsInChildren<AudioSource>();
			AudioSource[] array = componentsInChildren;
			foreach (AudioSource val in array)
			{
				if (((Object)val.clip).name == SoundName)
				{
					Object.Destroy((Object)(object)((Component)val).gameObject);
					break;
				}
			}
		}

		private void Update()
		{
			AudioSource[] componentsInChildren = ((Component)this).GetComponentsInChildren<AudioSource>();
			AudioSource[] array = componentsInChildren;
			foreach (AudioSource val in array)
			{
				if (!((Component)val).GetComponent<AudioSource>().isPlaying)
				{
					Object.Destroy((Object)(object)((Component)val).gameObject);
				}
			}
		}
	}
	public class MotionSystem : MonoBehaviour
	{
		public void ExecuteTween(MotionBase tween)
		{
			Motion.currentMotions.Add(tween);
		}

		private void Update()
		{
			for (int num = Motion.currentMotions.Count - 1; num >= 0; num--)
			{
				if (!Motion.currentMotions[num].Tick())
				{
					Motion.currentMotions.RemoveAt(num);
				}
			}
		}
	}
}
internal class AnchoredPosition : MotionBase
{
	private RectTransform _target;

	private Vector2 _start;

	public Vector2 EndValue { get; private set; }

	public AnchoredPosition(RectTransform target, Vector2 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		SetEssentials(Motion.MotionType.AnchoredPosition, ((Object)target).GetInstanceID(), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_target = target;
		EndValue = endValue;
	}

	protected override bool SetStartValue()
	{
		//IL_001a: 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)
		if ((Object)(object)_target == (Object)null)
		{
			return false;
		}
		_start = _target.anchoredPosition;
		return true;
	}

	protected override void Operation(float percentage)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: 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_0012: 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_001e: 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)
		Vector3 val = Vector2.op_Implicit(MotionHelpers.LinearInterpolate(_start, EndValue, percentage));
		_target.anchoredPosition = Vector2.op_Implicit(val);
	}

	public override void Loop()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		_target.anchoredPosition = _start;
	}

	public override void PingPong()
	{
		//IL_000d: 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_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		_target.anchoredPosition = EndValue;
		EndValue = _start;
		_start = _target.anchoredPosition;
	}
}
internal class LocalPosition : MotionBase
{
	private Transform _target;

	private Vector3 _start;

	public Vector3 EndValue { get; private set; }

	public LocalPosition(Transform target, Vector3 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		SetEssentials(Motion.MotionType.Position, ((Object)target).GetInstanceID(), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_target = target;
		EndValue = endValue;
	}

	protected override bool SetStartValue()
	{
		//IL_001a: 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)
		if ((Object)(object)_target == (Object)null)
		{
			return false;
		}
		_start = _target.localPosition;
		return true;
	}

	protected override void Operation(float percentage)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: 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_0012: 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)
		Vector3 localPosition = MotionHelpers.LinearInterpolate(_start, EndValue, percentage);
		_target.localPosition = localPosition;
	}

	public override void Loop()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		_target.localPosition = _start;
	}

	public override void PingPong()
	{
		//IL_000d: 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_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		_target.localPosition = EndValue;
		EndValue = _start;
		_start = _target.localPosition;
	}
}
internal class LocalRotation : MotionBase
{
	private Transform _target;

	private Vector3 _start;

	public Vector3 EndValue { get; private set; }

	public LocalRotation(Transform target, Vector3 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		SetEssentials(Motion.MotionType.Rotation, ((Object)target).GetInstanceID(), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_target = target;
		EndValue = endValue;
	}

	protected override bool SetStartValue()
	{
		//IL_001a: 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)
		if ((Object)(object)_target == (Object)null)
		{
			return false;
		}
		_start = _target.localEulerAngles;
		return true;
	}

	protected override void Operation(float percentage)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: 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_0012: 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_001e: Unknown result type (might be due to invalid IL or missing references)
		Quaternion localRotation = Quaternion.Euler(MotionHelpers.LinearInterpolateRotational(_start, EndValue, percentage));
		_target.localRotation = localRotation;
	}

	public override void Loop()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		_target.localEulerAngles = _start;
	}

	public override void PingPong()
	{
		//IL_000d: 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_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		_target.localEulerAngles = EndValue;
		EndValue = _start;
		_start = _target.localEulerAngles;
	}
}
internal class LocalScale : MotionBase
{
	private Transform _target;

	private Vector3 _start;

	public Vector3 EndValue { get; private set; }

	public LocalScale(Transform target, Vector3 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		SetEssentials(Motion.MotionType.LocalScale, ((Object)target).GetInstanceID(), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_target = target;
		EndValue = endValue;
	}

	protected override bool SetStartValue()
	{
		//IL_001a: 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)
		if ((Object)(object)_target == (Object)null)
		{
			return false;
		}
		_start = _target.localScale;
		return true;
	}

	protected override void Operation(float percentage)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: 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_0012: 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)
		Vector3 localScale = MotionHelpers.LinearInterpolate(_start, EndValue, percentage);
		_target.localScale = localScale;
	}

	public override void Loop()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		_target.localScale = _start;
	}

	public override void PingPong()
	{
		//IL_000d: 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_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		_target.localScale = EndValue;
		EndValue = _start;
		_start = _target.localScale;
	}
}
internal class Position : MotionBase
{
	private Transform _target;

	private Vector3 _start;

	public Vector3 EndValue { get; private set; }

	public Position(Transform target, Vector3 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		SetEssentials(Motion.MotionType.Position, ((Object)target).GetInstanceID(), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_target = target;
		EndValue = endValue;
	}

	protected override bool SetStartValue()
	{
		//IL_001a: 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)
		if ((Object)(object)_target == (Object)null)
		{
			return false;
		}
		_start = _target.position;
		return true;
	}

	protected override void Operation(float percentage)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: 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_0012: 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)
		Vector3 position = MotionHelpers.LinearInterpolate(_start, EndValue, percentage);
		_target.position = position;
	}

	public override void Loop()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		_target.position = _start;
	}

	public override void PingPong()
	{
		//IL_000d: 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_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		_target.position = EndValue;
		EndValue = _start;
		_start = _target.position;
	}
}
internal class Rotate : MotionBase
{
	private Transform _target;

	private Vector3 _start;

	private Space _space;

	private Vector3 _previous;

	public Vector3 EndValue { get; private set; }

	public Rotate(Transform target, Vector3 endValue, Space space, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		//IL_0029: 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)
		SetEssentials(Motion.MotionType.Rotation, ((Object)target).GetInstanceID(), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_target = target;
		EndValue = endValue;
		_space = space;
	}

	protected override bool SetStartValue()
	{
		//IL_001a: 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)
		if ((Object)(object)_target == (Object)null)
		{
			return false;
		}
		_start = _target.localEulerAngles;
		return true;
	}

	protected override void Operation(float percentage)
	{
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: 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_002d: 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_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: 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_003d: 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_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_0053: 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_0012: Unknown result type (might be due to invalid IL or missing references)
		if (percentage == 0f)
		{
			_target.localEulerAngles = _start;
		}
		Vector3 val = MotionHelpers.LinearInterpolate(Vector3.zero, EndValue, percentage);
		Vector3 val2 = val - _previous;
		_previous += val2;
		_target.Rotate(val2, _space);
	}

	public override void Loop()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		_previous = Vector3.zero;
		ResetStartTime();
	}

	public override void PingPong()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: 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_0017: Unknown result type (might be due to invalid IL or missing references)
		_previous = Vector3.zero;
		EndValue *= -1f;
		ResetStartTime();
	}
}
internal class Rotation : MotionBase
{
	private Transform _target;

	private Vector3 _start;

	public Vector3 EndValue { get; private set; }

	public Rotation(Transform target, Vector3 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		SetEssentials(Motion.MotionType.Rotation, ((Object)target).GetInstanceID(), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_target = target;
		EndValue = endValue;
	}

	protected override bool SetStartValue()
	{
		//IL_001a: 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)
		if ((Object)(object)_target == (Object)null)
		{
			return false;
		}
		_start = _target.eulerAngles;
		return true;
	}

	protected override void Operation(float percentage)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: 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_0012: 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_001e: Unknown result type (might be due to invalid IL or missing references)
		Quaternion rotation = Quaternion.Euler(MotionHelpers.LinearInterpolateRotational(_start, EndValue, percentage));
		_target.rotation = rotation;
	}

	public override void Loop()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		_target.eulerAngles = _start;
	}

	public override void PingPong()
	{
		//IL_000d: 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_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		_target.eulerAngles = EndValue;
		EndValue = _start;
		_start = _target.eulerAngles;
	}
}
internal class Size : MotionBase
{
	private RectTransform _target;

	private Vector2 _start;

	public Vector2 EndValue { get; private set; }

	public Size(RectTransform target, Vector2 endValue, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		SetEssentials(Motion.MotionType.Size, ((Object)target).GetInstanceID(), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_target = target;
		EndValue = endValue;
	}

	protected override bool SetStartValue()
	{
		//IL_001a: 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)
		if ((Object)(object)_target == (Object)null)
		{
			return false;
		}
		_start = _target.sizeDelta;
		return true;
	}

	protected override void Operation(float percentage)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: 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_0012: 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)
		Vector2 sizeDelta = MotionHelpers.LinearInterpolate(_start, EndValue, percentage);
		_target.sizeDelta = sizeDelta;
	}

	public override void Loop()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		_target.sizeDelta = _start;
	}

	public override void PingPong()
	{
		//IL_000d: 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_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		_target.sizeDelta = EndValue;
		EndValue = _start;
		_start = _target.sizeDelta;
	}
}
internal class ValueColor : MotionBase
{
	private Action<string, Color> _valueUpdatedAdvanceCallback;

	private string _targetComponent;

	private Color _start;

	public Color EndValue { get; private set; }

	public ValueColor(Color startValue, Color endValue, int InstanceID, string targetComponent, Action<string, Color> valueUpdatedAdvanceCallback, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		SetEssentials(Motion.MotionType.Value, InstanceID, duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_valueUpdatedAdvanceCallback = valueUpdatedAdvanceCallback;
		_targetComponent = targetComponent;
		_start = startValue;
		EndValue = endValue;
	}

	protected override bool SetStartValue()
	{
		return true;
	}

	protected override void Operation(float percentage)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: 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_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		Color arg = MotionHelpers.LinearInterpolate(_start, EndValue, percentage);
		if (_valueUpdatedAdvanceCallback != null)
		{
			_valueUpdatedAdvanceCallback(_targetComponent, arg);
		}
	}

	public override void Loop()
	{
		ResetStartTime();
	}

	public override void PingPong()
	{
		//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_000f: 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_001a: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		Color start = _start;
		_start = EndValue;
		EndValue = start;
	}
}
internal class ValueFloat : MotionBase
{
	private Action<float> _valueUpdatedCallback;

	private float _start;

	public float EndValue { get; private set; }

	public ValueFloat(float startValue, float endValue, Action<float> valueUpdatedCallback, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		SetEssentials(Motion.MotionType.Value, GetHashCode(), duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_valueUpdatedCallback = valueUpdatedCallback;
		_start = startValue;
		EndValue = endValue;
	}

	protected override bool SetStartValue()
	{
		return true;
	}

	protected override void Operation(float percentage)
	{
		float obj = MotionHelpers.LinearInterpolate(_start, EndValue, percentage);
		_valueUpdatedCallback(obj);
	}

	public override void Loop()
	{
		ResetStartTime();
	}

	public override void PingPong()
	{
		ResetStartTime();
		float start = _start;
		_start = EndValue;
		EndValue = start;
	}
}
internal class ValueInt : MotionBase
{
	private Action<int> _valueUpdatedCallback;

	private float _start;

	public float EndValue { get; private set; }

	public ValueInt(int startValue, int endValue, Action<int> valueUpdatedCallback, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		SetEssentials(Motion.MotionType.Value, -1, duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_valueUpdatedCallback = valueUpdatedCallback;
		_start = startValue;
		EndValue = endValue;
	}

	protected override bool SetStartValue()
	{
		return true;
	}

	protected override void Operation(float percentage)
	{
		float num = MotionHelpers.LinearInterpolate(_start, EndValue, percentage);
		_valueUpdatedCallback((int)num);
	}

	public override void Loop()
	{
		ResetStartTime();
	}

	public override void PingPong()
	{
		ResetStartTime();
		float start = _start;
		_start = EndValue;
		EndValue = start;
	}
}
internal class ValueRect : MotionBase
{
	private Action<Rect> _valueUpdatedCallback;

	private Rect _start;

	public Rect EndValue { get; private set; }

	public ValueRect(Rect startValue, Rect endValue, Action<Rect> valueUpdatedCallback, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		//IL_0025: 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_002c: Unknown result type (might be due to invalid IL or missing references)
		SetEssentials(Motion.MotionType.Value, -1, duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_valueUpdatedCallback = valueUpdatedCallback;
		_start = startValue;
		EndValue = endValue;
	}

	protected override bool SetStartValue()
	{
		return true;
	}

	protected override void Operation(float percentage)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: 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_0012: 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)
		Rect obj = MotionHelpers.LinearInterpolate(_start, EndValue, percentage);
		_valueUpdatedCallback(obj);
	}

	public override void Loop()
	{
		ResetStartTime();
	}

	public override void PingPong()
	{
		//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_000f: 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_001a: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		Rect start = _start;
		_start = EndValue;
		EndValue = start;
	}
}
internal class ValueVector2 : MotionBase
{
	private Action<Vector2> _valueUpdatedCallback;

	private Vector2 _start;

	public Vector2 EndValue { get; private set; }

	public ValueVector2(Vector2 startValue, Vector2 endValue, Action<Vector2> valueUpdatedCallback, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		//IL_0025: 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_002c: Unknown result type (might be due to invalid IL or missing references)
		SetEssentials(Motion.MotionType.Value, -1, duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_valueUpdatedCallback = valueUpdatedCallback;
		_start = startValue;
		EndValue = endValue;
	}

	protected override bool SetStartValue()
	{
		return true;
	}

	protected override void Operation(float percentage)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: 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_0012: 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)
		Vector2 obj = MotionHelpers.LinearInterpolate(_start, EndValue, percentage);
		_valueUpdatedCallback(obj);
	}

	public override void Loop()
	{
		ResetStartTime();
	}

	public override void PingPong()
	{
		//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_000f: 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_001a: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		Vector2 start = _start;
		_start = EndValue;
		EndValue = start;
	}
}
internal class ValueVector3 : MotionBase
{
	private Action<Vector3> _valueUpdatedCallback;

	private Vector3 _start;

	public Vector3 EndValue { get; private set; }

	public ValueVector3(Vector3 startValue, Vector3 endValue, Action<Vector3> valueUpdatedCallback, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		//IL_0025: 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_002c: Unknown result type (might be due to invalid IL or missing references)
		SetEssentials(Motion.MotionType.Value, -1, duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_valueUpdatedCallback = valueUpdatedCallback;
		_start = startValue;
		EndValue = endValue;
	}

	protected override bool SetStartValue()
	{
		return true;
	}

	protected override void Operation(float percentage)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: 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_0012: 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)
		Vector3 obj = MotionHelpers.LinearInterpolate(_start, EndValue, percentage);
		_valueUpdatedCallback(obj);
	}

	public override void Loop()
	{
		ResetStartTime();
	}

	public override void PingPong()
	{
		//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_000f: 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_001a: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		Vector3 start = _start;
		_start = EndValue;
		EndValue = start;
	}
}
internal class ValueVector4 : MotionBase
{
	private Action<Vector4> _valueUpdatedCallback;

	private Vector4 _start;

	public Vector4 EndValue { get; private set; }

	public ValueVector4(Vector4 startValue, Vector4 endValue, Action<Vector4> valueUpdatedCallback, float duration, float delay, bool obeyTimescale, AnimationCurve curve, Motion.LoopType loop, Action startCallback, Action completeCallback)
	{
		//IL_0025: 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_002c: Unknown result type (might be due to invalid IL or missing references)
		SetEssentials(Motion.MotionType.Value, -1, duration, delay, obeyTimescale, curve, loop, startCallback, completeCallback);
		_valueUpdatedCallback = valueUpdatedCallback;
		_start = startValue;
		EndValue = endValue;
	}

	protected override bool SetStartValue()
	{
		return true;
	}

	protected override void Operation(float percentage)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: 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_0012: 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)
		Vector4 obj = MotionHelpers.LinearInterpolate(_start, EndValue, percentage);
		_valueUpdatedCallback(obj);
	}

	public override void Loop()
	{
		ResetStartTime();
	}

	public override void PingPong()
	{
		//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_000f: 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_001a: Unknown result type (might be due to invalid IL or missing references)
		ResetStartTime();
		Vector4 start = _start;
		_start = EndValue;
		EndValue = start;
	}
}
namespace ModularMotion
{
	public enum KeyframeMode
	{
		Single,
		Multiple
	}
	public enum KeyFrame
	{
		Start,
		End
	}
	public enum EasingMode
	{
		Preset,
		Graph
	}
	public enum Easing
	{
		EaseLinear,
		EaseIn,
		EaseInStrong,
		EaseOut,
		EaseOutStrong,
		EaseInOut,
		EaseInOutStrong,
		EaseInBack,
		EaseOutBack,
		EaseInOutBack,
		EaseSpring,
		EaseBounce,
		EaseWobble
	}
	public enum Wrap
	{
		Once,
		Loop,
		PingPong
	}
	public enum ModeAuto
	{
		FirstKeyframe,
		ToLastKeyframe
	}
	public enum PlayType
	{
		Play,
		PlayForward,
		PlayBackward,
		PlayTillTheEnd,
		PlayTillTheEndForward,
		PlayTillTheEndBackward
	}
	public static class UIMotionUtility
	{
		public static float Map(float OriginalMin, float OriginalMax, float NewMin, float NewMax, float Value)
		{
			float num = OriginalMax - OriginalMin;
			float num2 = NewMax - NewMin;
			return (Value - OriginalMin) * num2 / num + NewMin;
		}

		private static Type GetTypeFromClass(string className)
		{
			Assembly assembly = null;
			try
			{
				assembly = Assembly.Load("Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null");
			}
			catch (Exception ex)
			{
				Debug.Log((object)("Failed to Load Assembly" + ex.Message));
			}
			if (assembly == null)
			{
				return null;
			}
			Type type = assembly.GetType(className);
			return (!(type == null)) ? type : null;
		}

		public static Type GetType(string ScriptName, string ClassName)
		{
			Debug.Log((object)"Called");
			DirectoryInfo directoryInfo = new DirectoryInfo(Application.dataPath);
			Debug.Log((object)Application.dataPath);
			FileInfo[] files = directoryInfo.GetFiles("*.cs", SearchOption.AllDirectories);
			FileInfo[] array = files;
			foreach (FileInfo fileInfo in array)
			{
				if (fileInfo.Name.Contains(ScriptName))
				{
					return GetTypeFromClass(ClassName);
				}
			}
			return null;
		}
	}
	[Serializable]
	public class MotionKeyframe
	{
		public Vector3 Position;

		public Vector3 Rotation;

		public Vector3 Scale;

		public Vector2 SizeDelta;

		public Color Color;

		public float Duration;

		public float Delay;

		public EasingMode Mode;

		public Easing Easing;

		public AnimationCurve Animation;

		public AudioClip Sound;

		public float Pitch;

		public float Volume;

		public float MaxRange;

		public float MinRange;

		public Vector2 AnchorMin;

		public Vector2 AnchorMax;

		public Vector2 Pivot;

		public int FontSize;

		public float TMPFontSize;

		public float TMPCharacter;

		public float TMPWord;

		public float TMPLine;

		public float TMPParagraph;

		public Color TMPColor;

		public float FillAmount;

		public FillMethod FillMethod;

		public int FillOrigin;

		public bool FillClockwise;

		public float BorderWidth;

		public float FalloffDistance;

		public float UniformValue;

		public Transform LinkTransform;

		public bool Sticky;
	}
	public class AnimationPrompt
	{
		public Vector3 PositionStart;

		public Vector3 PositionEnd;

		public Vector3 RotationStart;

		public Vector3 RotationEnd;

		public Vector3 ScaleStart;

		public Vector3 ScaleEnd;

		public Vector2 SizeDeltaStart;

		public Vector2 SizeDeltaEnd;

		public Color ColorStart;

		public Color ColorEnd;

		public AnimationCurve SelectedGraph = null;

		public Vector2 AnchorMinStart;

		public Vector2 AnchorMinEnd;

		public Vector2 AnchorMaxStart;

		public Vector2 AnchorMaxEnd;

		public Vector2 PivotStart;

		public Vector2 PivotEnd;

		public int FontSizeStart;

		public int FontSizeEnd;

		public float TMPCharacterStart;

		public float TMPCharacterEnd;

		public float TMPWordStart;

		public float TMPWordEnd;

		public float TMPLineStart;

		public float TMPLineEnd;

		public float TMPParagraphStart;

		public float TMPParagraphEnd;

		public Color TMPColorStart;

		public Color TMPColorEnd;

		public float TMPFontSizeStart;

		public float TMPFontSizeEnd;

		public float FillAmountStart;

		public float FillAmountEnd;

		public float BorderWidthStart;

		public float BorderWidthEnd;

		public float FalloffStart;

		public float FalloffEnd;

		public float UniformStart;

		public float UniformEnd;

		public AnimationPrompt()
		{
			//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_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_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)
			//IL_002f: 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_003f: 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_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)
			//IL_0055: 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_0060: 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_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: 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_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: 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_00a0: 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_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: 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_00a9: 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_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: 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_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: 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_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			PositionStart = Vector3.zero;
			PositionEnd = Vector3.zero;
			RotationStart = Vector3.zero;
			RotationEnd = Vector3.zero;