using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

// Token: 0x02000095 RID: 149
public class Bag : MonoBehaviour
{
	// Token: 0x06000E5E RID: 3678 RVA: 0x0011444A File Offset: 0x0011264A
	private void Awake()
	{
		this.Setup();
	}

	// Token: 0x06000E5F RID: 3679 RVA: 0x00114454 File Offset: 0x00112654
	public void Setup()
	{
		if (this.gridTrs.Count == 0)
		{
			foreach (object obj in this.gridTr)
			{
				Transform transform = (Transform)obj;
				if (transform != this.gridTr)
				{
					this.gridImg.Add(transform.gameObject.GetComponent<Image>());
					this.gridTrs.Add(transform);
					this.gridState.Add(false);
					transform.gameObject.GetComponent<Image>().sprite = this.emptySprite;
				}
			}
		}
	}

	// Token: 0x06000E60 RID: 3680 RVA: 0x00114508 File Offset: 0x00112708
	public void End()
	{
		for (int i = 0; i < this.gridImg.Count; i++)
		{
			if (!this.gridImg[i].sprite != this.emptySprite)
			{
				this.gridImg[i].sprite = this.emptySprite;
			}
			this.gridState[i] = false;
		}
	}

	// Token: 0x06000E61 RID: 3681 RVA: 0x00114578 File Offset: 0x00112778
	public Vector3 SubtractVectors(Vector3 a, Vector3 b)
	{
		Vector3 vector;
		vector.x = a.x - b.x;
		vector.y = a.y - b.y;
		vector.z = a.z - b.z;
		return vector;
	}

	// Token: 0x040016D9 RID: 5849
	public Transform gridTr;

	// Token: 0x040016DA RID: 5850
	public int gridAmt;

	// Token: 0x040016DB RID: 5851
	public int mainBagX = 6;

	// Token: 0x040016DC RID: 5852
	public int mainBagY = 6;

	// Token: 0x040016DD RID: 5853
	public List<Image> gridImg = new List<Image>();

	// Token: 0x040016DE RID: 5854
	public List<bool> gridState = new List<bool>();

	// Token: 0x040016DF RID: 5855
	public List<Transform> gridTrs = new List<Transform>();

	// Token: 0x040016E0 RID: 5856
	public List<int> dragHoverImg = new List<int>();

	// Token: 0x040016E1 RID: 5857
	public bool secondary;

	// Token: 0x040016E2 RID: 5858
	public Sprite emptySprite;
}
