using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x020001DF RID: 479
[Token(Token = "0x20001DF")]
public class TreasureBox : AttackableObject
{
	// Token: 0x060013BF RID: 5055 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60013BF")]
	[Address(RVA = "0x756DD0", Offset = "0x755BD0", VA = "0x180756DD0", Slot = "4")]
	public override void Init()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060013C0 RID: 5056 RVA: 0x0002D0DC File Offset: 0x0002B2DC
	[Token(Token = "0x60013C0")]
	[Address(RVA = "0x417B40", Offset = "0x416940", VA = "0x180417B40")]
	public void InitTreasureData(int index)
	{
		this.index = index;
	}

	// Token: 0x060013C1 RID: 5057 RVA: 0x0002D0F0 File Offset: 0x0002B2F0
	[Token(Token = "0x60013C1")]
	[Address(RVA = "0x756D30", Offset = "0x755B30", VA = "0x180756D30", Slot = "9")]
	public override void HitPhysical(AttackData AD)
	{
		base.HitPhysical(AD);
		if (!this.hasOpened)
		{
			this.SetOpen();
			Game.GetAchievementsSystem().IncreaseTreasureChestCollection();
		}
	}

	// Token: 0x060013C2 RID: 5058 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60013C2")]
	[Address(RVA = "0x297F00", Offset = "0x296D00", VA = "0x180297F00", Slot = "10")]
	public override void HitMagic(AttackData AD)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060013C3 RID: 5059 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60013C3")]
	[Address(RVA = "0x7571B0", Offset = "0x755FB0", VA = "0x1807571B0")]
	protected void SetOpen()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060013C4 RID: 5060 RVA: 0x0002D128 File Offset: 0x0002B328
	[Token(Token = "0x60013C4")]
	[Address(RVA = "0x7570B0", Offset = "0x755EB0", VA = "0x1807570B0")]
	public void SetIsOpen(bool bOpen)
	{
		if (bOpen)
		{
			this.hasOpened = true;
			if (base.gameObject.activeInHierarchy)
			{
				this.g_Ani.Play("Open");
			}
			this.PS.Stop(true);
			BoxCollider openCollider = this.OpenCollider;
			int num = 0;
			if (openCollider != num)
			{
				this.OpenCollider.enabled = true;
			}
		}
	}

	// Token: 0x060013C5 RID: 5061 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x60013C5")]
	[Address(RVA = "0x756F80", Offset = "0x755D80", VA = "0x180756F80")]
	private new void OnEnable()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x060013C6 RID: 5062 RVA: 0x0002D190 File Offset: 0x0002B390
	[Token(Token = "0x60013C6")]
	[Address(RVA = "0x757460", Offset = "0x756260", VA = "0x180757460")]
	public TreasureBox()
	{
	}

	// Token: 0x04001EC3 RID: 7875
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x4001EC3")]
	public ItemSystem.ItemType ItemType;

	// Token: 0x04001EC4 RID: 7876
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x4001EC4")]
	public ParticleSystem PS;

	// Token: 0x04001EC5 RID: 7877
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x4001EC5")]
	public SceneEvent[] OpenEvent;

	// Token: 0x04001EC6 RID: 7878
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x4001EC6")]
	public BoxCollider OpenCollider;

	// Token: 0x04001EC7 RID: 7879
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x4001EC7")]
	[SerializeField]
	private int index;

	// Token: 0x04001EC8 RID: 7880
	[FieldOffset(Offset = "0x8C")]
	[Token(Token = "0x4001EC8")]
	[SerializeField]
	private bool hasOpened;

	// Token: 0x04001EC9 RID: 7881
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x4001EC9")]
	private Vector3 g_v3Center;

	// Token: 0x04001ECA RID: 7882
	[FieldOffset(Offset = "0xA0")]
	[Token(Token = "0x4001ECA")]
	private Animator g_Ani;
}
