using System.Collections.Generic;
using UnityEngine;

public class Nat2Field : NateField
{
	public override int FieldId => 32;

	public Nat2Field(string bgmId = "NONE")
		: base(bgmId)
	{
	}

	protected override void BattleFieldBuild()
	{
		BattleCoroutine.GetInstance().StartCoroutine(BackGroundBase.ObjectChecker(0.5f, _str3DFieldPath, delegate
		{
			base.Field = GameObject.Find(_str3DFieldPath);
			base.Field.transform.parent = GameMgr.GetIns().m_GameManagerObj.transform;
			GimicAudioList = base.Field.GetComponent<AudioList>().GimicAudioList;
			_fieldModel = base.Field.transform.Find("md_bf_nat2_root").gameObject;
			_fieldParticles = _fieldModel.transform.Find("Particles" + FieldId).gameObject;
			_fieldParticleSystemDictionary.Add("gimic_on1", _fieldParticles.transform.Find("gimic_on1").GetComponent<ParticleSystem>());
			_fieldParticleSystemDictionary.Add("gimic_on2", _fieldParticles.transform.Find("gimic_on2").GetComponent<ParticleSystem>());
			_fieldParticleSystemDictionary.Add("shake_1", _fieldParticles.transform.Find("shake_1").GetComponent<ParticleSystem>());
			_fieldObjDictionary.Add(_fieldParticles.name, _fieldParticles);
			List<string> list = new List<string>(_fieldObjDictionary.Keys);
			List<GameObject> list2 = new List<GameObject>();
			for (int i = 0; i < _fieldObjDictionary.Count; i++)
			{
				list2.Add(_fieldObjDictionary[list[i]]);
			}
			GameMgr.GetIns().GetEffectMgr().SetUIParticleShader(list2, delegate
			{
				base.SetShaderGlobalColorBG = base.Field.transform.Find("SetMaterialColorBGManager").GetComponent<SetShaderGlobalColorBG>();
				base.IsLoadDone = true;
			}, isBattle: true, isField: true);
		}));
	}

	public override void StartFieldSetEffect(Vector3 pos)
	{
		GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_SET_32, pos);
	}

	public override void StartFieldTapEffect(int areaId, Vector3 pos)
	{
		base.StartFieldTapEffect(areaId, pos);
		GameMgr.GetIns().GetEffectMgr().Start(EffectMgr.EffectType.CMN_FIELD_TAP_32_1, pos);
	}
}
