using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x0200030D RID: 781
[Token(Token = "0x200030D")]
[Serializable]
public class NobetaMeshController
{
	// Token: 0x06001EE6 RID: 7910 RVA: 0x0004A754 File Offset: 0x00048954
	[Token(Token = "0x6001EE6")]
	[Address(RVA = "0xECEEB0", Offset = "0xECDCB0", VA = "0x180ECEEB0")]
	public void UpdateAppearance()
	{
		int num;
		SkinnedMeshRenderer skinnedMeshRenderer5;
		do
		{
			num = 0;
			if ((this.systemEnable ? 1 : 0) != num)
			{
			}
			SkinnedMeshRenderer[] array = this.body;
			bool flag = num != 0;
			if (num < array.Length)
			{
				array[num].enabled = flag;
				SkinnedMeshRenderer[] array2 = this.body;
				num++;
			}
			SkinnedMeshRenderer skinnedMeshRenderer = this.bag;
			if (num == 0)
			{
			}
			bool flag2 = (this.enableStoryBag ? 1 : 0) == num;
			skinnedMeshRenderer.enabled = flag2;
			SkinnedMeshRenderer skinnedMeshRenderer2 = this.storyBag;
			int num2 = 0;
			if (skinnedMeshRenderer2 != num2)
			{
				SkinnedMeshRenderer skinnedMeshRenderer3 = this.storyBag;
				if (num == 0)
				{
					continue;
				}
				bool flag3 = this.enableStoryBag;
				skinnedMeshRenderer3.enabled = flag3;
			}
			if ((this.enableAccessories ? 1 : 0) == num)
			{
				return;
			}
			SkinnedMeshRenderer skinnedMeshRenderer4 = this.storyHat;
			int num3 = 0;
			if (!(skinnedMeshRenderer4 != num3))
			{
				return;
			}
			skinnedMeshRenderer5 = this.storyHat;
		}
		while (num == 0);
		bool flag4 = this.enableHat;
		skinnedMeshRenderer5.enabled = flag4;
	}

	// Token: 0x06001EE7 RID: 7911 RVA: 0x0004A848 File Offset: 0x00048A48
	[Token(Token = "0x6001EE7")]
	[Address(RVA = "0xECECC0", Offset = "0xECDAC0", VA = "0x180ECECC0")]
	public void EnableAllParts(bool enable)
	{
		if (this.enableAllParts != enable)
		{
			this.enableAllParts = enable;
			this.UpdateAppearance();
			return;
		}
	}

	// Token: 0x06001EE8 RID: 7912 RVA: 0x0004A86C File Offset: 0x00048A6C
	[Token(Token = "0x6001EE8")]
	[Address(RVA = "0xECECD0", Offset = "0xECDAD0", VA = "0x180ECECD0")]
	public void EnableHat(bool enable)
	{
		this.enableHat = enable;
		SkinnedMeshRenderer skinnedMeshRenderer = this.storyHat;
		int num = 0;
		if (skinnedMeshRenderer != num)
		{
			SkinnedMeshRenderer skinnedMeshRenderer2 = this.storyHat;
			bool flag = this.enableHat;
			skinnedMeshRenderer2.enabled = flag;
		}
	}

	// Token: 0x06001EE9 RID: 7913 RVA: 0x0004A8B0 File Offset: 0x00048AB0
	[Token(Token = "0x6001EE9")]
	[Address(RVA = "0xECED60", Offset = "0xECDB60", VA = "0x180ECED60")]
	public void EnableStoryBag(bool enable)
	{
		SkinnedMeshRenderer skinnedMeshRenderer = this.bag;
		this.enableStoryBag = enable;
		skinnedMeshRenderer.enabled = enable;
		SkinnedMeshRenderer skinnedMeshRenderer2 = this.storyBag;
		int num = 0;
		if (skinnedMeshRenderer2 != num)
		{
			SkinnedMeshRenderer skinnedMeshRenderer3 = this.storyBag;
			bool flag = this.enableStoryBag;
			skinnedMeshRenderer3.enabled = flag;
		}
	}

	// Token: 0x06001EEA RID: 7914 RVA: 0x0004A904 File Offset: 0x00048B04
	[Token(Token = "0x6001EEA")]
	[Address(RVA = "0xECEC00", Offset = "0xECDA00", VA = "0x180ECEC00")]
	public void EnableAccessories(bool enable)
	{
		this.enableAccessories = enable;
		if (this.enableAllParts)
		{
			int num = 0;
			SkinnedMeshRenderer skinnedMeshRenderer = this.storyHat;
			int num2 = 0;
			if (skinnedMeshRenderer != num2)
			{
				SkinnedMeshRenderer skinnedMeshRenderer2 = this.storyHat;
				if (enable)
				{
				}
				bool flag = num != 0;
				skinnedMeshRenderer2.enabled = flag;
			}
		}
	}

	// Token: 0x06001EEB RID: 7915 RVA: 0x0004A958 File Offset: 0x00048B58
	[Token(Token = "0x6001EEB")]
	[Address(RVA = "0xECEE10", Offset = "0xECDC10", VA = "0x180ECEE10")]
	public void SwapSystemEnabled()
	{
		bool flag = !this.systemEnable;
		this.systemEnable = flag;
		this.UpdateAppearance();
		if (this.weapon)
		{
			MeshRenderer meshRenderer = this.weapon;
			bool flag2 = this.systemEnable;
			meshRenderer.enabled = flag2;
		}
	}

	// Token: 0x06001EEC RID: 7916 RVA: 0x0004A9A8 File Offset: 0x00048BA8
	[Token(Token = "0x6001EEC")]
	[Address(RVA = "0xECF060", Offset = "0xECDE60", VA = "0x180ECF060")]
	public NobetaMeshController()
	{
	}

	// Token: 0x040028D6 RID: 10454
	[FieldOffset(Offset = "0x10")]
	[Token(Token = "0x40028D6")]
	[SerializeField]
	private bool systemEnable = true;

	// Token: 0x040028D7 RID: 10455
	[FieldOffset(Offset = "0x11")]
	[Token(Token = "0x40028D7")]
	[SerializeField]
	private bool enableAllParts;

	// Token: 0x040028D8 RID: 10456
	[FieldOffset(Offset = "0x12")]
	[Token(Token = "0x40028D8")]
	[SerializeField]
	private bool enableAccessories;

	// Token: 0x040028D9 RID: 10457
	[FieldOffset(Offset = "0x13")]
	[Token(Token = "0x40028D9")]
	[SerializeField]
	private bool enableHat;

	// Token: 0x040028DA RID: 10458
	[FieldOffset(Offset = "0x14")]
	[Token(Token = "0x40028DA")]
	[SerializeField]
	private bool enableStoryBag;

	// Token: 0x040028DB RID: 10459
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x40028DB")]
	[SerializeField]
	private SkinnedMeshRenderer[] body;

	// Token: 0x040028DC RID: 10460
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x40028DC")]
	[SerializeField]
	private SkinnedMeshRenderer bag;

	// Token: 0x040028DD RID: 10461
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x40028DD")]
	[SerializeField]
	private MeshRenderer weapon;

	// Token: 0x040028DE RID: 10462
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x40028DE")]
	[SerializeField]
	private SkinnedMeshRenderer storyHat;

	// Token: 0x040028DF RID: 10463
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x40028DF")]
	[SerializeField]
	private SkinnedMeshRenderer storyBag;
}
