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

public class OnaholeMotion : MonoBehaviour
{
	private bool IsFinish
	{
		get
		{
			return this.finishFlag;
		}
	}

	public void SetOwner(OnaholeCharaManager owner)
	{
		this.charaMgr = owner;
	}

	public OnaholeMotion.MODE GetMode()
	{
		return this.mode;
	}

	public OnaholeMotion.ANIM_TYPE GetAnimType()
	{
		return this.playAnime;
	}

	public OnaholeMotion.PISTON_MODE GetPistonMode()
	{
		return this.pistonMode;
	}

	private bool IsNextModePermit
	{
		get
		{
			return this.nextModePermit;
		}
	}

	public static readonly string[] animeTypeNameArray = new string[]
	{
		"NON",
		"待機",
		"挿入",
		"ピストン",
		"抜き",
		"ピストン深い",
		"射精(中)",
		"射精後(中)",
		"射精IN(中)",
		"射精(外)",
		"射精後(外)",
		"射精IN(外)"
	};

	private OnaholeCharaManager charaMgr;

	private TBody tBody;

	[SerializeField]
	private OnaholeMotion.MODE mode = OnaholeMotion.MODE.WAIT;

	[SerializeField]
	private MaidTouch.POINT activeSexMode;

	private OnaholeMotion.ANIM_TYPE playAnime;

	private OnaholeMotion.ANIM_TYPE shaseiType;

	private AnimationState lastAnime;

	[SerializeField]
	private OnaholeMotion.PISTON_MODE pistonMode = OnaholeMotion.PISTON_MODE.PISTON;

	private Dictionary<MaidTouch.POINT, OnaholeMotion.MoitonScriptData> motionScriptDataDic = new Dictionary<MaidTouch.POINT, OnaholeMotion.MoitonScriptData>();

	private Dictionary<MaidTouch.POINT, OnaholeMotion.BlendAnimeData> blendAnimeDic = new Dictionary<MaidTouch.POINT, OnaholeMotion.BlendAnimeData>();

	private Animation anime;

	private Dictionary<string, string> pistonSe = new Dictionary<string, string>();

	private OnaholeMotion.BlendAnimeData beforeBlendData;

	private string motionScriptFN = string.Empty;

	private string[] motionScriptTextArray;

	public float startWaitTime = 1f;

	public float plugLerp;

	public float pistonUnPlugWaitTime;

	private bool finishFlag;

	private bool hakaFlag;

	public string animeTypeName = string.Empty;

	private bool insertFlag;

	[SerializeField]
	private string lastAnimeName = string.Empty;

	public bool animeEndCheck;

	public bool nextModePermit;

	[Obsolete]
	public bool nextModePermitHarf;

	public string blendAnimeName = string.Empty;

	public string blendAnimeNameBefore = string.Empty;

	public float blendPlugMultiple;

	[SerializeField]
	[Obsolete]
	public float blendStopTime;

	public List<string> loadedAnimeList = new List<string>();

	public List<string> loadedAnimeListBefore = new List<string>();

	public OnaholeFeelings.PISTON_SPEED playedPistonSeType = OnaholeFeelings.PISTON_SPEED.NO_DATA;

	private float playPistonSeCoolTime;

	public List<string> debugStringList = new List<string>();

	public enum MODE
	{
		START,
		WAIT,
		PLUG,
		PISTON,
		UNPLUG,
		SHASEI,
		SHASEIGO,
		SHASEIGO_IN
	}

	public enum ANIM_TYPE
	{
		NON,
		WAIT,
		PLUG,
		PISTON,
		UNPLUG,
		PISTON_BLEND,
		SHASEI_NAKA,
		SHASEIGO_NAKA,
		SHASEIGO_NAKA_IN,
		SHASEI_SOTO,
		SHASEIGO_SOTO,
		SHASEIGO_SOTO_IN,
		MAX
	}

	public enum PISTON_MODE
	{
		CHANGE,
		PISTON
	}

	private enum BlendAnime
	{
		Start,
		Inter,
		End
	}

	private class MoitonScriptData
	{
		public string fileName = string.Empty;

		public Dictionary<OnaholeMotion.ANIM_TYPE, string> labelDic = new Dictionary<OnaholeMotion.ANIM_TYPE, string>();

		public Dictionary<OnaholeMotion.ANIM_TYPE, string> labelDic2 = new Dictionary<OnaholeMotion.ANIM_TYPE, string>();
	}

	private class BlendAnimeData
	{
		[Obsolete]
		public string key = string.Empty;

		[Obsolete]
		public MaidTouch.POINT point;

		public AnimationState start;

		public AnimationState end;

		public Dictionary<int, AnimationState> inter = new Dictionary<int, AnimationState>();
	}
}
