using System;
using System.Collections;
using System.Collections.Generic;
using DarkTonic.MasterAudio;
using Kino;
using UnityEngine;

// Token: 0x02000049 RID: 73
public class RallyStage : MonoBehaviour
{
	// Token: 0x060008C1 RID: 2241 RVA: 0x000BE6C8 File Offset: 0x000BC8C8
	private void Start()
	{
		foreach (GameObject gameObject in this.stages)
		{
			gameObject.SetActive(false);
		}
	}

	// Token: 0x060008C2 RID: 2242 RVA: 0x000BE71C File Offset: 0x000BC91C
	public void SetupStage(string n, Character attackingCharacter, Character targetCharacter)
	{
		int num = 0;
		for (int i = 0; i < this.names.Count; i++)
		{
			if (this.names[i] == n)
			{
				num = i;
				break;
			}
		}
		base.StartCoroutine(this.Stage(num, attackingCharacter, targetCharacter));
	}

	// Token: 0x060008C3 RID: 2243 RVA: 0x000BE769 File Offset: 0x000BC969
	private IEnumerator Stage(int index, Character attackingCharacter, Character targetCharacter)
	{
		this.playing = true;
		this.targetDies = false;
		Camera cam = this.cameras[index];
		cam.enabled = false;
		this.rallyCamera = cam;
		this.flag = this.flags[index];
		this.flag.ClearAll();
		this.targetDamage = -1f;
		this.projectile = null;
		this.stage = this.names[index];
		this.damageNumber.inRally = true;
		this.damageNumber.GetVariables();
		if (!Records.x.editor)
		{
			this.debug = false;
		}
		Vector3 startPositionAttacker = this.attacker[index].position;
		Vector3 startPositionTarget = this.target[index].position;
		Quaternion startRotationAttacker = this.attacker[index].rotation;
		Quaternion startRotationTarget = this.target[index].rotation;
		this.sources = this.stages[index].GetComponentsInChildren<AudioSource>(true);
		foreach (AudioSource audioSource in this.sources)
		{
			audioSource.volume = Links.x.options.soundVolume / 2f;
			audioSource.loop = false;
			audioSource.spatialBlend = 0f;
			audioSource.priority = 1;
		}
		if (!cam.GetComponent<Obscurance>())
		{
			Obscurance obscurance = cam.gameObject.AddComponent<Obscurance>();
			obscurance.enabled = true;
			obscurance.intensity = 3f;
			obscurance.radius = 0.1f;
		}
		this.attacking = attackingCharacter;
		this.targeting = targetCharacter;
		this.stages[index].SetActive(true);
		Shader.SetGlobalFloat("_NoFogOfWar", 1f);
		Vector3 attackerPosition = this.attacking.tr.position;
		string animController = this.attacking.animControllerName;
		bool changedAnimators = false;
		if (this.attacking.animator.runtimeAnimatorController.name.Contains("Multi") || this.attacking.animator.runtimeAnimatorController.name.Contains("Shield"))
		{
			string weaponControllerPrefix = Records.x.GetWeaponControllerPrefix(this.attacking.invRow1, null, this.attacking.stats.race, true);
			string text = this.attacking.animationPrefix + weaponControllerPrefix;
			AnimatorOverrideController overrideController = Links.x.archives.GetOverrideController(text);
			if (overrideController != null)
			{
				this.attacking.animator.runtimeAnimatorController = overrideController;
			}
			changedAnimators = true;
		}
		Links.x.gameplay.skipText.SetActive(false);
		Links.x.gameplay.confirmText.SetActive(false);
		string text2 = "Bff_HyperRally _ ScepterSingle";
		if (this.stage == "Impact")
		{
			text2 = "Bff_HyperRally_GiantScepter";
		}
		if (this.stage == "Bow")
		{
			text2 = "Bff_HyperRally_Bow";
		}
		if (this.stage == "ShortSword")
		{
			text2 = "Bff_HyperRally_SwordSingle";
		}
		if (this.stage == "Pole")
		{
			text2 = "Bff_HyperRally_Spear";
		}
		if (this.stage == "Ax")
		{
			text2 = "Bff_HyperRally_AxSingle";
		}
		if (this.stage == "Elyxir")
		{
			text2 = "Bff_HyperRally_Elyxer";
		}
		if (this.stage == "Unarmed")
		{
			text2 = "Bff_HyperRally_Unarmed";
		}
		if (this.stage == "Whip")
		{
			text2 = "Bff_HyperRally_Whip";
		}
		if (this.stage == "ScepterSingle")
		{
			text2 = "Bff_HyperRally _ ScepterSingle";
		}
		if (this.stage == "LongSword")
		{
			text2 = "Bff_HyperRally_GiantSword";
		}
		if (this.stage == "Sling")
		{
			text2 = "Bff_HyperRally_Sling";
		}
		if (this.stage == "Yeti_Scepter")
		{
			text2 = "Bff_HyperRally_Yeti_SingleWeapon";
		}
		if (this.stage == "Yeti_Spear")
		{
			text2 = "Bff_HyperRally_Yeti_Spear";
		}
		if (this.stage == "Yeti_Sword")
		{
			text2 = "Bff_HyperRally_Yeti_SingleWeapon";
		}
		if (this.stage == "Yeti_Unarmed")
		{
			text2 = "Bff_HyperRally_Yeti_Unarmed";
		}
		MasterAudio.PlaySoundAndForget("Rallies", 1f, new float?(1f), 0f, text2, null);
		for (int j = 0; j < 2; j++)
		{
			Character character = this.attacking;
			if (j == 1)
			{
				character = this.targeting;
			}
			string model = character.stats.model;
			GameObject gameObject = Links.x.archives.InstantiateBody(model, this.point);
			gameObject.SetActive(true);
			this.body = gameObject.GetComponent<Body>();
			this.body.Reset();
			this.body.model = model;
			this.body.name = model;
			this.body.animationPrefix = character.animationPrefix;
			if (!this.body.anim)
			{
				this.body.anim = this.body.gameObject.GetComponent<Animator>();
			}
			this.body.inMenu = true;
			this.body.isPortrait = false;
			this.body.anim.runtimeAnimatorController = character.body.anim.runtimeAnimatorController;
			this.body.anim.updateMode = AnimatorUpdateMode.Normal;
			this.body.anim.applyRootMotion = true;
			this.body.gameObject.layer = 25;
			this.body.SetGrounderState(false);
			this.body.SetupHead(character.stats.headModel);
			this.body.GatherRenderers(true);
			this.body.SetupTextures(character.stats.race, character.stats.sex, character.stats.characterRow, character.stats.skinTexture, character.stats.hairTexture, false);
			int invNum = character.GetInvNum(16);
			int invNum2 = character.GetInvNum(0);
			int invNum3 = character.GetInvNum(24);
			if (invNum > 1 || invNum3 > 1 || invNum2 > 1)
			{
				this.SetupEquippedItems(this.body, invNum, invNum3, invNum2);
			}
			this.body.gameObject.layer = 25;
			if (j == 0)
			{
				gameObject.transform.position = this.attacker[index].position;
				gameObject.transform.rotation = this.attacker[index].rotation;
			}
			else
			{
				gameObject.transform.position = this.target[index].position;
				gameObject.transform.rotation = this.target[index].rotation;
			}
			if (this.body.headAnim)
			{
				this.body.headAnim.FreshBlink();
			}
			this.body.lookAtController.EndLook();
			float num;
			if (j == 0)
			{
				num = (float)this.attacking.stats.HealthCurrent() / (float)this.attacking.stats.HealthMax();
			}
			else
			{
				num = (float)this.targeting.stats.HealthCurrent() / (float)this.targeting.stats.HealthMax();
			}
			float num2 = 0f;
			if (num < 0.166f)
			{
				num2 = 5f;
			}
			if (num >= 0.166f && num < 0.33f)
			{
				num2 = 4f;
			}
			if (num >= 0.33f && num < 0.5f)
			{
				num2 = 3f;
			}
			if (num >= 0.5f && num < 0.667f)
			{
				num2 = 2f;
			}
			if ((double)num >= 0.667 && num < 0.883f)
			{
				num2 = 1f;
			}
			this.body.SetBlood(num2);
			this.body.EndHold();
			this.body.anim.speed = 1f;
			this.body.anim.updateMode = AnimatorUpdateMode.Normal;
			if (j == 0)
			{
				this.attackingModel = model;
				this.attackingGo = gameObject;
				this.attackingBody = this.body;
				this.attackingBody.anim.cullingMode = AnimatorCullingMode.AlwaysAnimate;
				this.attacking.body.anim.cullingMode = AnimatorCullingMode.AlwaysAnimate;
				this.attackingBody.anim.Rebind();
				this.attacking.body.anim.Rebind();
				this.attacking.OverridePocketPause();
				this.attacking.animator.speed = 1f;
				this.attacking.PlayAnimation("SynergyAttack2", 0f);
				this.attackingBody.anim.Play("Combat_synergy_2");
				this.attacking.body.anim.Update(0f);
				this.attackingBody.anim.Update(0f);
				if (this.attackingBody.ammoItem)
				{
					this.attackingBody.ammoItem.GetComponent<MeshRenderer>().sharedMaterial.shader = this.pbr;
				}
			}
			else
			{
				this.targetingModel = model;
				this.targetingGo = gameObject;
				this.targetingBody = this.body;
			}
		}
		bool flag = false;
		bool listenForBounce = false;
		if (this.stage == "Pole" || this.stage == "Unarmed" || this.stage == "LongSword" || this.stage == "Whip" || this.stage == "Yeti_Unarmed" || this.stage == "Yeti_Spear")
		{
			flag = true;
		}
		if (this.stage == "Ax")
		{
			listenForBounce = true;
		}
		cam.enabled = true;
		Links.x.worldCamera.enabled = false;
		Links.x.rtsCamera.topCam.enabled = false;
		bool didQTE = false;
		if (flag)
		{
			if (this.debug)
			{
				Debug.Log("Listen for transform");
			}
			if (this.stage == "LongSword")
			{
				while (!this.flag.animate)
				{
					yield return null;
				}
				MasterAudio.PlaySound3DAtVector3AndForget("Dagger Hit", this.attacking.tr.position, Random.Range(0.6f, 0.7f), new float?(1f), 0f, "", null);
			}
			if (!(this.stage == "Unarmed") && !(this.stage == "Whip"))
			{
				if (!(this.stage == "Yeti_Spear"))
				{
					goto IL_0BF3;
				}
			}
			while (!this.flag.startQTE)
			{
				yield return null;
			}
			Links.x.qte.playing = true;
			Links.x.qte.StartQTE("MoonPunch", 1f);
			didQTE = true;
			IL_0BF3:
			if (this.stage == "Whip")
			{
				while (!this.flag.animate)
				{
					yield return null;
				}
				this.targetingBody.anim.Play("Hit");
				this.targetingBody.anim.Update(0f);
				MasterAudio.PlaySound3DAtVector3AndForget("Dagger Hit", this.attacking.tr.position, Random.Range(0.6f, 0.7f), new float?(1f), 0f, "", null);
			}
			while (!this.flag.targetFollow)
			{
				yield return null;
			}
			bool flying = this.targeting.stats.flying;
			this.targetingBody.tr.SetParent(this.target[index]);
			if (this.debug)
			{
				Debug.Log("target follow");
			}
			this.targetingBody.anim.SetBool("Bounce Over", false);
			this.targetingBody.anim.Play("Hit_bounce");
			this.targetingBody.anim.Update(0f);
			Vector3 vector = this.targetingBody.tr.position + new Vector3(0f, this.targeting.stats.characterRow._Height, 0f);
			Vector3 position = this.targetingBody.tr.position;
			if (flying)
			{
				vector = this.targetingBody.tr.GetChild(0).position;
			}
			Vector3 vector2 = Vector3.Lerp(position, vector, 0.8f);
			vector2 = this.targetingBody.tr.position - vector2;
			if (this.debug)
			{
				Debug.Log(vector2);
			}
			this.targetingBody.tr.localPosition = vector2 * 0.4f;
			this.targetingBody.tr.localRotation = Quaternion.Euler(Vector3.zero);
			if (this.stage == "Pole" || this.stage == "Yeti_Spear")
			{
				MasterAudio.PlaySound3DAtVector3AndForget("Dagger Hit", this.attacking.tr.position, Random.Range(0.6f, 0.7f), new float?(1f), 0f, "", null);
			}
		}
		if (!didQTE)
		{
			while (!this.flag.startQTE)
			{
				yield return null;
			}
			Links.x.qte.playing = true;
			Links.x.qte.StartQTE("MoonPunch", 1f);
		}
		if (this.debug)
		{
			Debug.Log("start qte");
		}
		while (!this.flag.hitTarget)
		{
			yield return null;
		}
		if (this.debug)
		{
			string text3 = "hit target ";
			Projectile projectile = this.projectile;
			Debug.Log(text3 + ((projectile != null) ? projectile.ToString() : null));
		}
		if (this.projectile)
		{
			if (this.debug)
			{
				string text4 = "Projectile ";
				Projectile projectile2 = this.projectile;
				Debug.Log(text4 + ((projectile2 != null) ? projectile2.ToString() : null));
			}
			this.projectile.Hit(this.targeting);
		}
		CollisionListener bouncer = null;
		Vector3 vector3 = this.targetingBody.tr.position;
		vector3.y -= 1f;
		bool flag2 = true;
		if (this.names[index] == "Bow")
		{
			flag2 = false;
		}
		if (this.targetDies)
		{
			this.targetingBody.tr.parent = null;
			GameObject gameObject2 = Links.x.archives.CheckRecycledDeaths(this.targeting.stats.characterRow._DeathID, "Random");
			if (gameObject2 == null)
			{
				gameObject2 = Links.x.library.GetDeath(this.targeting.stats.characterRow._DeathID, "Random");
				if (gameObject2)
				{
					GameObject gameObject3 = Object.Instantiate<GameObject>(gameObject2, this.targetingBody.tr.position, this.targetingBody.tr.rotation, Links.x.cellar.tr);
					gameObject3.SetActive(false);
					gameObject2 = gameObject3;
					Gore gore = gameObject3.AddComponent<Gore>();
					gore.Setup();
					gore.character = this.targeting;
					gore.startTime = Links.x.gameplay.seconds;
				}
			}
			if (gameObject2)
			{
				gameObject2.transform.parent = null;
				gameObject2.transform.position = this.targetingBody.tr.position + new Vector3(0f, 0.5f, 0f);
				gameObject2.transform.rotation = this.targetingBody.tr.rotation;
				this.targetingBody.goreObj = gameObject2;
				Gore component = gameObject2.GetComponent<Gore>();
				if (component)
				{
					component.DoReset();
				}
				this.targetingBody.StartDead(vector3);
				Links.x.combat.preDome = false;
				gameObject2.SetActive(true);
				if (this.stage == "Unarmed")
				{
					this.targetingBody.AddDeadForce(Quaternion.LookRotation(this.targetingBody.tr.position - new Vector3(this.attackingBody.tr.position.x, this.targetingBody.tr.position.y, this.attackingBody.tr.position.z)) * Vector3.forward, 200f);
					this.targetingBody.AddDeadForce(Vector3.up, 300f);
				}
				else
				{
					this.targetingBody.AddDeadForce(Quaternion.LookRotation(vector3 - this.attackingBody.tr.position) * Vector3.forward, 500f);
				}
			}
			else
			{
				vector3 = this.targetingBody.tr.position;
				vector3.y -= 1f;
				this.targetingBody.StartDead(vector3);
			}
		}
		else if (flag2 && !listenForBounce)
		{
			bouncer = this.Bounce();
		}
		else if (listenForBounce)
		{
			this.targetingBody.anim.SetBool("Bounce Over", false);
			this.targetingBody.anim.Play("Hit_bounce");
			this.targetingBody.anim.Update(0f);
		}
		else
		{
			this.targetingBody.tr.parent = null;
			this.targetingBody.anim.Play("Hit");
		}
		Quaternion quaternion = Quaternion.LookRotation(this.attackingBody.tr.position - this.targetingBody.tr.position);
		MasterAudio.PlaySound3DAtVector3AndForget("Blood Hit", this.targetingBody.tr.position, 1f, new float?(1f), 0.1f, "", null);
		Animator blood = Links.x.cellar.GetBlood();
		blood.gameObject.SetActive(true);
		blood.transform.position = this.targetingBody.HeadPosition(0f);
		blood.transform.rotation = quaternion;
		int num3 = Random.Range(0, 3);
		if (num3 == 1)
		{
			blood.Play("Blood_animation_B");
		}
		if (num3 == 2)
		{
			blood.Play("Blood_animation_C");
		}
		this.meshes = blood.GetComponentsInChildren<MeshRenderer>();
		MeshRenderer[] array2 = this.meshes;
		for (int i = 0; i < array2.Length; i++)
		{
			array2[i].sharedMaterial.shader = this.pbr;
		}
		Animator blood2 = Links.x.cellar.GetBlood();
		blood2.gameObject.SetActive(true);
		blood2.transform.position = this.targetingBody.HeadPosition(0f) - new Vector3(0f, 0.5f, 0f);
		blood2.transform.rotation = quaternion;
		int num4 = Random.Range(0, 1);
		if (num4 == 0)
		{
			blood.Play("Blood_animation_D");
		}
		if (num4 == 1)
		{
			blood.Play("Blood_animation_E");
		}
		this.meshes = blood2.GetComponentsInChildren<MeshRenderer>();
		array2 = this.meshes;
		for (int i = 0; i < array2.Length; i++)
		{
			array2[i].sharedMaterial.shader = this.pbr;
		}
		while (this.targetDamage == -1f && !this.flag.end)
		{
			yield return null;
		}
		if (this.debug)
		{
			Debug.Log("target damage " + this.targetDamage.ToString());
		}
		Animator rollOutcome = null;
		if (this.targetDamage > -1f)
		{
			rollOutcome = Links.x.cellar.GetAnimatedText("RallyDmgTotal", this.targetDamage.ToString(), Records.x.IsTextLeft(this.attacking, this.targeting));
			Vector3 vector4 = this.targetingBody.HeadPosition(0f) - new Vector3(0f, 0.5f, 0f) + cam.transform.forward * -1f;
			if (this.rallyCamera.WorldToScreenPoint(vector4).y / (float)Screen.height > 0.7f)
			{
				vector4 = this.targetingBody.HeadPosition(0f) - new Vector3(0f, 1f, 0f) + cam.transform.forward * -1f;
			}
			rollOutcome.gameObject.transform.position = vector4;
			rollOutcome.gameObject.SetActive(true);
		}
		this.attacking.animator.Play("Idle");
		this.attacking.tr.position = attackerPosition;
		this.attacking.FirstPosition(null);
		if (listenForBounce)
		{
			while (!this.flag.bounce && !this.flag.end)
			{
				yield return null;
			}
			MasterAudio.PlaySound3DAtVector3AndForget("Skull Crush", this.attacking.tr.position, 1f, new float?(1f), 0f, "", null);
			MasterAudio.PlaySound3DAtVector3AndForget("Body Fall", this.attacking.currentPosition, 1f, new float?(1f), 0f, "", null);
			bouncer = this.Bounce();
		}
		float startTime = Time.timeSinceLevelLoad;
		while (!this.flag.end && Time.timeSinceLevelLoad < startTime + 5f)
		{
			yield return null;
		}
		if (this.debug)
		{
			Debug.Log("Flag end");
		}
		if (this.targetDies && this.targetingBody.goreObj)
		{
			Links.x.archives.RecycleDeath(this.targetingBody.goreObj, this.targeting.goreType, this.targeting.stats.characterRow._DeathID);
		}
		if (this.attackingBody.ammoItem)
		{
			this.attackingBody.ammoItem.GetComponent<MeshRenderer>().sharedMaterial.shader = this.characterShader;
		}
		if (changedAnimators)
		{
			AnimatorOverrideController overrideController2 = Links.x.archives.GetOverrideController(animController);
			if (overrideController2 != null)
			{
				this.attacking.animator.runtimeAnimatorController = overrideController2;
			}
			this.attacking.animator.SetBool("Party", this.attacking.party);
			if (this.attacking.body)
			{
				this.attacking.body.anim.Rebind();
				this.attacking.body.anim.Update(0f);
			}
		}
		this.targetingBody.tr.parent = null;
		this.targetingBody.tr.position = Vector3.zero;
		this.targetingBody.tr.rotation = Quaternion.Euler(Vector3.zero);
		this.stages[index].SetActive(false);
		if (this.attackingGo != null)
		{
			this.RecycleModel(this.attackingGo, this.attackingModel, this.attacking.name);
		}
		if (this.targetingGo != null)
		{
			this.RecycleModel(this.targetingGo, this.targetingModel, this.targeting.name);
		}
		this.meshes = blood.GetComponentsInChildren<MeshRenderer>();
		array2 = this.meshes;
		for (int i = 0; i < array2.Length; i++)
		{
			array2[i].sharedMaterial.shader = this.bloodShader;
		}
		this.meshes = blood2.GetComponentsInChildren<MeshRenderer>();
		array2 = this.meshes;
		for (int i = 0; i < array2.Length; i++)
		{
			array2[i].sharedMaterial.shader = this.bloodShader;
		}
		this.attacker[index].position = startPositionAttacker;
		this.target[index].position = startPositionTarget;
		this.attacker[index].rotation = startRotationAttacker;
		this.target[index].rotation = startRotationTarget;
		this.targeting.OverridePocketPause();
		cam.enabled = false;
		Links.x.worldCamera.enabled = true;
		Links.x.rtsCamera.topCam.enabled = true;
		this.playing = false;
		this.flag.ClearAll();
		if (this.targeting.dead && this.targeting.goreObj && this.targeting.body)
		{
			this.targeting.body.AddDeadForce(Quaternion.LookRotation(this.targeting.tr.position - this.attacking.tr.position) * Vector3.forward, 600f);
		}
		this.damageNumber.inRally = false;
		this.damageNumber.GetVariables();
		if (rollOutcome)
		{
			rollOutcome = Links.x.cellar.GetAnimatedText("RallyDmgTotal", this.targetDamage.ToString(), Records.x.IsTextLeft(this.attacking, this.targeting));
			rollOutcome.gameObject.transform.position = this.targeting.body.HeadPosition(0f) + new Vector3(Random.Range(0f, 1f), Random.Range(0f, 1f), 0f);
			rollOutcome.gameObject.SetActive(true);
		}
		if (bouncer)
		{
			bouncer.EndNow();
			Object.Destroy(bouncer.gameObject);
		}
		Shader.SetGlobalFloat("_NoFogOfWar", 0f);
		Links.x.hudControl.UsedRallyAttackSpecial();
		yield break;
	}

	// Token: 0x060008C4 RID: 2244 RVA: 0x000BE790 File Offset: 0x000BC990
	private CollisionListener Bounce()
	{
		this.targetingBody.tr.parent = null;
		this.targetingBody.anim.SetBool("Bounce Over", false);
		this.targetingBody.anim.Play("Hit_bounce");
		this.targetingBody.anim.Update(0f);
		GameObject gameObject = GameObject.CreatePrimitive(PrimitiveType.Cube);
		gameObject.transform.localScale = Vector3.one * 1f;
		CollisionListener collisionListener = gameObject.AddComponent<CollisionListener>();
		collisionListener.rbody = gameObject.AddComponent<Rigidbody>();
		collisionListener.rbody.mass = 7f;
		gameObject.GetComponent<BoxCollider>().material = Links.x.bounceFriction;
		gameObject.layer = 20;
		if (Records.x.editor)
		{
			gameObject.transform.SetParent(Links.x.cellar.tr);
		}
		gameObject.GetComponent<MeshRenderer>().enabled = false;
		collisionListener.gameObject.SetActive(true);
		collisionListener.c = null;
		collisionListener.body = this.targetingBody;
		collisionListener.StartLisening("Hit");
		collisionListener.gameObject.transform.position = this.targetingBody.tr.position + new Vector3(0f, this.targeting.characterHeight / 2f, 0f);
		Vector3 vector = Quaternion.LookRotation(this.targetingBody.tr.position - new Vector3(this.attackingBody.tr.position.x, this.targetingBody.tr.position.y, this.attackingBody.tr.position.z)) * Vector3.forward;
		float num = 4000f;
		float num2 = 1000f;
		if (this.stage == "Ax")
		{
			num = 5000f;
			num2 = 1000f;
			vector = Vector3.forward * -1f;
		}
		if (this.stage == "Unarmed")
		{
			num2 = 1500f;
			vector = Quaternion.LookRotation(this.targetingBody.tr.position - new Vector3(this.attackingBody.tr.position.x, this.targetingBody.tr.position.y, this.attackingBody.tr.position.z)) * Vector3.forward * -1f;
		}
		collisionListener.rbody.AddForce(vector * num, ForceMode.Force);
		collisionListener.rbody.AddForce(Vector3.up * num2, ForceMode.Force);
		this.targetingBody.tr.position = collisionListener.rbody.transform.position;
		return collisionListener;
	}

	// Token: 0x060008C5 RID: 2245 RVA: 0x000BEA70 File Offset: 0x000BCC70
	public void SetupEquippedItems(Body body, int id8, int id12, int id0)
	{
		body.CreateMenuItems(id8, 1, new Vector3(-1f, -1f, -1f), new Vector3(-1f, -1f, -1f), new Vector2(100f, 100f), 8, null);
		if (id0 > 1)
		{
			body.CreateMenuItems(id0, 1, new Vector3(-1f, -1f, -1f), new Vector3(-1f, -1f, -1f), new Vector2(100f, 100f), 0, null);
		}
		body.CreateMenuItems(id12, 1, new Vector3(-1f, -1f, -1f), new Vector3(-1f, -1f, -1f), new Vector2(100f, 100f), 12, null);
	}

	// Token: 0x060008C6 RID: 2246 RVA: 0x000BEB56 File Offset: 0x000BCD56
	public void RecycleModel(GameObject go, string model, string n)
	{
		Links.x.archives.RecycleBody(go, model, n);
		if (go)
		{
			go.SetActive(false);
		}
		go = null;
		this.body = null;
	}

	// Token: 0x04000DCA RID: 3530
	[Header("Stages")]
	public List<GameObject> stages = new List<GameObject>();

	// Token: 0x04000DCB RID: 3531
	public List<string> names = new List<string>();

	// Token: 0x04000DCC RID: 3532
	public List<Transform> attacker = new List<Transform>();

	// Token: 0x04000DCD RID: 3533
	public List<Transform> target = new List<Transform>();

	// Token: 0x04000DCE RID: 3534
	public List<Camera> cameras = new List<Camera>();

	// Token: 0x04000DCF RID: 3535
	public List<AnimationFlags> flags = new List<AnimationFlags>();

	// Token: 0x04000DD0 RID: 3536
	public bool playing;

	// Token: 0x04000DD1 RID: 3537
	public AnimationFlags flag;

	// Token: 0x04000DD2 RID: 3538
	public Projectile projectile;

	// Token: 0x04000DD3 RID: 3539
	public Billboard damageNumber;

	// Token: 0x04000DD4 RID: 3540
	public string stage;

	// Token: 0x04000DD5 RID: 3541
	private AudioSource[] sources;

	// Token: 0x04000DD6 RID: 3542
	private bool debug = true;

	// Token: 0x04000DD7 RID: 3543
	[Header("Characters")]
	public GameObject attackingGo;

	// Token: 0x04000DD8 RID: 3544
	public GameObject targetingGo;

	// Token: 0x04000DD9 RID: 3545
	public Camera rallyCamera;

	// Token: 0x04000DDA RID: 3546
	public Body attackingBody;

	// Token: 0x04000DDB RID: 3547
	public Body targetingBody;

	// Token: 0x04000DDC RID: 3548
	private Body body;

	// Token: 0x04000DDD RID: 3549
	private Transform point;

	// Token: 0x04000DDE RID: 3550
	private string attackingModel;

	// Token: 0x04000DDF RID: 3551
	private string targetingModel;

	// Token: 0x04000DE0 RID: 3552
	public bool targetDies;

	// Token: 0x04000DE1 RID: 3553
	public float targetDamage;

	// Token: 0x04000DE2 RID: 3554
	private Character attacking;

	// Token: 0x04000DE3 RID: 3555
	private Character targeting;

	// Token: 0x04000DE4 RID: 3556
	[Header("Materials")]
	public Shader pbr;

	// Token: 0x04000DE5 RID: 3557
	public Shader bloodShader;

	// Token: 0x04000DE6 RID: 3558
	public Shader characterShader;

	// Token: 0x04000DE7 RID: 3559
	private MeshRenderer[] meshes;
}
