using System;
using Cpp2IlInjected;
using UnityEngine;

// Token: 0x02000362 RID: 866
[Token(Token = "0x2000362")]
[Serializable]
public class NobetaMeshController
{
	// Token: 0x06002195 RID: 8597 RVA: 0x000516D0 File Offset: 0x0004F8D0
	[Token(Token = "0x6002195")]
	[Address(RVA = "0xF1AF40", Offset = "0xF19F40", VA = "0x180F1AF40")]
	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: 0x06002196 RID: 8598 RVA: 0x000517C4 File Offset: 0x0004F9C4
	[Token(Token = "0x6002196")]
	[Address(RVA = "0xF1AD50", Offset = "0xF19D50", VA = "0x180F1AD50")]
	public void EnableAllParts(bool enable)
	{
		if (this.enableAllParts != enable)
		{
			this.enableAllParts = enable;
			this.UpdateAppearance();
			return;
		}
	}

	// Token: 0x06002197 RID: 8599 RVA: 0x000517E8 File Offset: 0x0004F9E8
	[Token(Token = "0x6002197")]
	[Address(RVA = "0xF1AD60", Offset = "0xF19D60", VA = "0x180F1AD60")]
	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: 0x06002198 RID: 8600 RVA: 0x0005182C File Offset: 0x0004FA2C
	[Token(Token = "0x6002198")]
	[Address(RVA = "0xF1ADF0", Offset = "0xF19DF0", VA = "0x180F1ADF0")]
	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: 0x06002199 RID: 8601 RVA: 0x00051880 File Offset: 0x0004FA80
	[Token(Token = "0x6002199")]
	[Address(RVA = "0xF1AC90", Offset = "0xF19C90", VA = "0x180F1AC90")]
	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: 0x0600219A RID: 8602 RVA: 0x000518D4 File Offset: 0x0004FAD4
	[Token(Token = "0x600219A")]
	[Address(RVA = "0xF1AEA0", Offset = "0xF19EA0", VA = "0x180F1AEA0")]
	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: 0x0600219B RID: 8603 RVA: 0x00051924 File Offset: 0x0004FB24
	[Token(Token = "0x600219B")]
	[Address(RVA = "0xF1B0F0", Offset = "0xF1A0F0", VA = "0x180F1B0F0")]
	public NobetaMeshController()
	{
	}

	// Token: 0x04002BB4 RID: 11188
	[FieldOffset(Offset = "0x10")]
	[Token(Token = "0x4002BB4")]
	[SerializeField]
	private bool systemEnable = true;

	// Token: 0x04002BB5 RID: 11189
	[FieldOffset(Offset = "0x11")]
	[Token(Token = "0x4002BB5")]
	[SerializeField]
	private bool enableAllParts;

	// Token: 0x04002BB6 RID: 11190
	[FieldOffset(Offset = "0x12")]
	[Token(Token = "0x4002BB6")]
	[SerializeField]
	private bool enableAccessories;

	// Token: 0x04002BB7 RID: 11191
	[FieldOffset(Offset = "0x13")]
	[Token(Token = "0x4002BB7")]
	[SerializeField]
	private bool enableHat;

	// Token: 0x04002BB8 RID: 11192
	[FieldOffset(Offset = "0x14")]
	[Token(Token = "0x4002BB8")]
	[SerializeField]
	private bool enableStoryBag;

	// Token: 0x04002BB9 RID: 11193
	[FieldOffset(Offset = "0x18")]
	[Token(Token = "0x4002BB9")]
	[SerializeField]
	private SkinnedMeshRenderer[] body;

	// Token: 0x04002BBA RID: 11194
	[FieldOffset(Offset = "0x20")]
	[Token(Token = "0x4002BBA")]
	[SerializeField]
	private SkinnedMeshRenderer bag;

	// Token: 0x04002BBB RID: 11195
	[FieldOffset(Offset = "0x28")]
	[Token(Token = "0x4002BBB")]
	[SerializeField]
	private MeshRenderer weapon;

	// Token: 0x04002BBC RID: 11196
	[FieldOffset(Offset = "0x30")]
	[Token(Token = "0x4002BBC")]
	[SerializeField]
	private SkinnedMeshRenderer storyHat;

	// Token: 0x04002BBD RID: 11197
	[FieldOffset(Offset = "0x38")]
	[Token(Token = "0x4002BBD")]
	[SerializeField]
	private SkinnedMeshRenderer storyBag;
}
