using System;
using UnityEngine;
using wf;

public class BenchMarkScore : PartsMgrBase
{
	public static int BenchScore { get; private set; }

	protected override void Start()
	{
		base.Start();
		base.gameObject.SetActive(base.IsActive);
	}

	private void Update()
	{
		if (this.m_CountStart)
		{
			this.m_BenchScore++;
		}
		this.m_ScoreLabel.text = Utility.ConvertMoneyText(this.m_BenchScore);
	}

	public override void StartAction()
	{
		this.m_CountStart = true;
	}

	public override void EndAction()
	{
		BenchMarkScore.BenchScore = this.m_BenchScore;
		Func<bool, string> func = (bool condition) => (!condition) ? "Off" : "On";
		Result_Display.SetResultData("BenchScore", Utility.ConvertMoneyText(this.m_BenchScore), Result_Display.ResultType.String);
		string str = (!BenchSetting.Setting.IsFullScreen) ? "Window" : "FullScreen";
		Result_Display.SetResultData("Screen", "スクリーンモード：" + str, Result_Display.ResultType.String);
		Result_Display.SetResultData("Resolution", string.Concat(new object[]
		{
			"画面解像度：",
			BenchSetting.Setting.ResolutionX,
			"x",
			BenchSetting.Setting.ResolutionY
		}), Result_Display.ResultType.String);
		Result_Display.SetResultData("Antialiasing", "アンチエイリアス：" + BenchSetting.Setting.Antialiasing.ToString(), Result_Display.ResultType.String);
		Result_Display.SetResultData("ShadowQuality", "影のクオリティ：" + BenchSetting.Setting.ShadowQuality.ToString(), Result_Display.ResultType.String);
		Result_Display.SetResultData("TextureQuality", "テクスチャクオリティ：" + BenchSetting.Setting.TextureQuality.ToString(), Result_Display.ResultType.String);
		Result_Display.SetResultData("Bloom", "ブルーム：" + BenchSetting.Setting.BloomValue.ToString(), Result_Display.ResultType.String);
		Result_Display.SetResultData("DepthofField", "被写界深度：" + func(BenchSetting.Setting.DepthFieldOn), Result_Display.ResultType.String);
		Result_Display.SetResultData("CutinProduct", "カットイン演出：" + Appeal_Mgr.GradeTostring(BenchSetting.Setting.CutInGrade), Result_Display.ResultType.String);
		Result_Display.SetResultData("NoteSePlay", "ノートSE再生：" + func(BenchSetting.Setting.NoteSePlay), Result_Display.ResultType.String);
	}

	[SerializeField]
	private UILabel m_ScoreLabel;

	private bool m_CountStart;

	private int m_BenchScore;
}
