using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x0200021C RID: 540
[Token(Token = "0x200021C")]
public class TreasureBox : AttackableObject
{
	// Token: 0x06001574 RID: 5492 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001574")]
	[Address(RVA = "0xF675A0", Offset = "0xF665A0", VA = "0x180F675A0", Slot = "4")]
	public override void Init()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001575 RID: 5493 RVA: 0x00030980 File Offset: 0x0002EB80
	[Token(Token = "0x6001575")]
	[Address(RVA = "0x479410", Offset = "0x478410", VA = "0x180479410")]
	public void InitTreasureData(int index)
	{
		this.index = index;
	}

	// Token: 0x06001576 RID: 5494 RVA: 0x00030994 File Offset: 0x0002EB94
	[Token(Token = "0x6001576")]
	[Address(RVA = "0xF67500", Offset = "0xF66500", VA = "0x180F67500", Slot = "9")]
	public override void HitPhysical(AttackData AD)
	{
		base.HitPhysical(AD);
		if (!this.hasOpened)
		{
			this.SetOpen();
			Game.GetAchievementsSystem().IncreaseTreasureChestCollection();
		}
	}

	// Token: 0x06001577 RID: 5495 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001577")]
	[Address(RVA = "0x29E8B0", Offset = "0x29D8B0", VA = "0x18029E8B0", Slot = "10")]
	public override void HitMagic(AttackData AD)
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001578 RID: 5496 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x6001578")]
	[Address(RVA = "0xF67980", Offset = "0xF66980", VA = "0x180F67980")]
	protected void SetOpen()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x06001579 RID: 5497 RVA: 0x000309CC File Offset: 0x0002EBCC
	[Token(Token = "0x6001579")]
	[Address(RVA = "0xF67880", Offset = "0xF66880", VA = "0x180F67880")]
	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: 0x0600157A RID: 5498 RVA: 0x000020D3 File Offset: 0x000002D3
	[Token(Token = "0x600157A")]
	[Address(RVA = "0xF67750", Offset = "0xF66750", VA = "0x180F67750")]
	private new void OnEnable()
	{
		throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
	}

	// Token: 0x0600157B RID: 5499 RVA: 0x00030A34 File Offset: 0x0002EC34
	[Token(Token = "0x600157B")]
	[Address(RVA = "0xF67C30", Offset = "0xF66C30", VA = "0x180F67C30")]
	public TreasureBox()
	{
	}

	// Token: 0x04002099 RID: 8345
	[FieldOffset(Offset = "0x68")]
	[Token(Token = "0x4002099")]
	public ItemSystem.ItemType ItemType;

	// Token: 0x0400209A RID: 8346
	[FieldOffset(Offset = "0x70")]
	[Token(Token = "0x400209A")]
	public ParticleSystem PS;

	// Token: 0x0400209B RID: 8347
	[FieldOffset(Offset = "0x78")]
	[Token(Token = "0x400209B")]
	public SceneEvent[] OpenEvent;

	// Token: 0x0400209C RID: 8348
	[FieldOffset(Offset = "0x80")]
	[Token(Token = "0x400209C")]
	public BoxCollider OpenCollider;

	// Token: 0x0400209D RID: 8349
	[FieldOffset(Offset = "0x88")]
	[Token(Token = "0x400209D")]
	[SerializeField]
	private int index;

	// Token: 0x0400209E RID: 8350
	[FieldOffset(Offset = "0x8C")]
	[Token(Token = "0x400209E")]
	[SerializeField]
	private bool hasOpened;

	// Token: 0x0400209F RID: 8351
	[FieldOffset(Offset = "0x90")]
	[Token(Token = "0x400209F")]
	private Vector3 g_v3Center;

	// Token: 0x040020A0 RID: 8352
	[FieldOffset(Offset = "0xA0")]
	[Token(Token = "0x40020A0")]
	private Animator g_Ani;
}
