using System;
using System.Collections.Generic;
using System.Linq;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x020000B1 RID: 177
[Token(Token = "0x20000B1")]
public class EnemiesManager
{
	// Token: 0x1700002E RID: 46
	// (get) Token: 0x0600077C RID: 1916 RVA: 0x00010DB8 File Offset: 0x0000EFB8
	[Token(Token = "0x1700002E")]
	public LockPointsManager LockPointsManager
	{
		[Token(Token = "0x600077C")]
		[Address(RVA = "0x2EF530", Offset = "0x2EE530", VA = "0x1802EF530")]
		get;
	}

	// Token: 0x0600077D RID: 1917 RVA: 0x00010DCC File Offset: 0x0000EFCC
	[Token(Token = "0x600077D")]
	[Address(RVA = "0xD086D0", Offset = "0xD076D0", VA = "0x180D086D0")]
	public void Init()
	{
		List<EnemiesManager.EnemyData> list = new List();
		this.enemies = list;
		this.<LockPointsManager>k__BackingField.Init();
		GameObject[] array = GameObject.FindGameObjectsWithTag("Enemy");
		int num = 0;
		int length = array.Length;
		if (num < length)
		{
			GameObject gameObject = array[num];
			this.AddEnemy(gameObject);
			num++;
		}
	}

	// Token: 0x0600077E RID: 1918 RVA: 0x00010E24 File Offset: 0x0000F024
	[Token(Token = "0x600077E")]
	[Address(RVA = "0xD079D0", Offset = "0xD069D0", VA = "0x180D079D0")]
	public void AddEnemy(GameObject enemy)
	{
		int num = 0;
		if (!(enemy == num))
		{
			EnemiesManager.EnemyData enemyData = new EnemiesManager.EnemyData();
			NPCManage component = enemy.GetComponent<NPCManage>();
			enemyData.Npc = component;
			NPCManage npc = enemyData.Npc;
			int num2 = 0;
			if (npc == num2)
			{
				Debug.LogError("新增敵人NPCManage錯誤");
			}
			List<EnemiesManager.EnemyData> list = this.enemies;
			NPCManage npc2 = enemyData.Npc;
			int size = list._size;
			npc2.Init(size);
			NPCManage npc3 = enemyData.Npc;
			if (npc3.g_AILevel == NPCManage.AILevel.Monster)
			{
				Action<NPCManage> action = new Action(this.AddMonsterHPBar);
				npc3.hpBarHandler = action;
			}
			CharacterBaseData charData = enemyData.CharData;
			int num3 = 0;
			if (charData == num3)
			{
				Debug.LogError("新增敵人CharacterBaseData錯誤");
			}
			if (enemyData.Npc.g_LockPosition.Length != 0)
			{
				Transform posTipsPosition = enemyData.PosTipsPosition;
				int num4 = 0;
				if (posTipsPosition == num4)
				{
					Debug.LogError("新增敵人位置提示錯誤");
				}
			}
			this.enemies.Add(enemyData);
			NPCManage npc4 = enemyData.Npc;
			LockPointsManager lockPointsManager = this.<LockPointsManager>k__BackingField;
			LockPoint[] g_LockPosition = npc4.g_LockPosition;
			lockPointsManager.AddLockPoints(g_LockPosition);
			return;
		}
		Debug.LogError("新增敵人資料錯誤");
	}

	// Token: 0x0600077F RID: 1919 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600077F")]
	[Address(RVA = "0xD087C0", Offset = "0xD077C0", VA = "0x180D087C0")]
	public void RemoveObjectID(int id)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000780 RID: 1920 RVA: 0x00010F54 File Offset: 0x0000F154
	[Token(Token = "0x6000780")]
	[Address(RVA = "0xD07D70", Offset = "0xD06D70", VA = "0x180D07D70")]
	private void AddMonsterHPBar(NPCManage npc)
	{
		NPCManage npc2 = npc;
		if (!npc2.<HasHPBarAttached>k__BackingField)
		{
			npc2.<HasHPBarAttached>k__BackingField = true;
			List<EnemiesManager.EnemyData> list = this.enemies;
			Func<EnemiesManager.EnemyData, bool> func = delegate(EnemiesManager.EnemyData enemy)
			{
				NPCManage npc3 = enemy.Npc;
				NPCManage npc4 = npc;
				return npc3 == npc4;
			};
			EnemiesManager.EnemyData enemyData = Enumerable.FirstOrDefault<EnemiesManager.EnemyData>(list, func);
			if (enemyData != 0)
			{
				Game.AddEnemyHPBar(enemyData);
			}
		}
	}

	// Token: 0x06000781 RID: 1921 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000781")]
	[Address(RVA = "0xD08150", Offset = "0xD07150", VA = "0x180D08150")]
	public Transform GetSceneCenterEnemy(Camera playerCamera, Vector3 v3Center, float fSDistance, float fWDistance)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000782 RID: 1922 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000782")]
	[Address(RVA = "0xD07EC0", Offset = "0xD06EC0", VA = "0x180D07EC0")]
	public void AreaShowEnemy(GameObject Scane)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000783 RID: 1923 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000783")]
	[Address(RVA = "0xD088D0", Offset = "0xD078D0", VA = "0x180D088D0")]
	public void ResetEnemyDeath()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000784 RID: 1924 RVA: 0x00010FB4 File Offset: 0x0000F1B4
	[Token(Token = "0x6000784")]
	[Address(RVA = "0x32FD80", Offset = "0x32ED80", VA = "0x18032FD80")]
	public List<EnemiesManager.EnemyData> GetAllEnemyData()
	{
		return this.enemies;
	}

	// Token: 0x06000785 RID: 1925 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6000785")]
	[Address(RVA = "0xD089C0", Offset = "0xD079C0", VA = "0x180D089C0")]
	public void SetTimeScale(float timeScale)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06000786 RID: 1926 RVA: 0x00010FC8 File Offset: 0x0000F1C8
	[Token(Token = "0x6000786")]
	[Address(RVA = "0xD08AE0", Offset = "0xD07AE0", VA = "0x180D08AE0")]
	public EnemiesManager()
	{
		LockPointsManager lockPointsManager = new LockPointsManager();
		this.LockPointsManager = lockPointsManager;
		base..ctor();
	}

	// Token: 0x0400086C RID: 2156
	[FieldOffset(Offset = "0x10")]
	[Token(Token = "0x400086C")]
	private List<EnemiesManager.EnemyData> enemies;

	// Token: 0x020000B2 RID: 178
	[Token(Token = "0x20000B2")]
	public class EnemyData
	{
		// Token: 0x1700002F RID: 47
		// (get) Token: 0x06000787 RID: 1927 RVA: 0x00010FE8 File Offset: 0x0000F1E8
		[Token(Token = "0x1700002F")]
		public CharacterBaseData CharData
		{
			[Token(Token = "0x6000787")]
			[Address(RVA = "0x19BD2C0", Offset = "0x19BC2C0", VA = "0x1819BD2C0")]
			get
			{
				return this.Npc.g_CharData;
			}
		}

		// Token: 0x17000030 RID: 48
		// (get) Token: 0x06000788 RID: 1928 RVA: 0x00011008 File Offset: 0x0000F208
		[Token(Token = "0x17000030")]
		public Transform HPPosition
		{
			[Token(Token = "0x6000788")]
			[Address(RVA = "0x19BD2E0", Offset = "0x19BC2E0", VA = "0x1819BD2E0")]
			get
			{
				return this.Npc.HpPosition;
			}
		}

		// Token: 0x17000031 RID: 49
		// (get) Token: 0x06000789 RID: 1929 RVA: 0x00011028 File Offset: 0x0000F228
		[Token(Token = "0x17000031")]
		public Transform PosTipsPosition
		{
			[Token(Token = "0x6000789")]
			[Address(RVA = "0x19BD300", Offset = "0x19BC300", VA = "0x1819BD300")]
			get
			{
				return this.Npc.g_LockPosition[0].transform;
			}
		}

		// Token: 0x0600078A RID: 1930 RVA: 0x00011054 File Offset: 0x0000F254
		[Token(Token = "0x600078A")]
		[Address(RVA = "0x36ABD0", Offset = "0x369BD0", VA = "0x18036ABD0")]
		public EnemyData()
		{
		}

		// Token: 0x0400086E RID: 2158
		[FieldOffset(Offset = "0x10")]
		[Token(Token = "0x400086E")]
		public NPCManage Npc;
	}
}
