summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/Tutorial/XTutorialHelper.cs
blob: 6e174fa9e4260ab5fe66c0889dd69733af4bbb26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
using System;
using System.Collections.Generic;
using UnityEngine;
using XUtliPoolLib;

namespace XMainClient
{
	internal class XTutorialHelper : XSingleton<XTutorialHelper>
	{
		protected List<uint> _newOpenedSystem;

		public bool SkillLevelup;

		public bool SkillBind;

		public bool UseItem;

		public bool GetReward;

		public bool Moved;

		public bool ArtSkillOver;

		public bool MeetEnemy;

		public bool HasBoss;

		public bool HasTarget;

		public bool FashionCompose;

		public bool ReinforceItem;

		public bool EnhanceItem;

		public bool SwitchProf;

		public bool Smelting;

		public bool DragonCrusadeOpen;

		public bool HasTeam;

		public bool HitDownOnGround;

		public bool SelectView;

		public bool SelectSkipTutorial;

		public bool ActivityOpen;

		public bool BattleNPCTalkEnd;

		public override bool Init()
		{
			this._newOpenedSystem = new List<uint>();
			this.SkillLevelup = false;
			this.SkillBind = false;
			this.UseItem = false;
			this.GetReward = false;
			this.Moved = false;
			this.MeetEnemy = false;
			this.HasTarget = false;
			this.ArtSkillOver = false;
			this.HasBoss = false;
			this.FashionCompose = false;
			this.ReinforceItem = false;
			this.EnhanceItem = false;
			this.SwitchProf = false;
			this.HasTeam = false;
			this.Smelting = false;
			this.ActivityOpen = false;
			this.HitDownOnGround = false;
			this.DragonCrusadeOpen = false;
			this.BattleNPCTalkEnd = false;
			this.SelectView = false;
			this.SelectSkipTutorial = false;
			return true;
		}

		public void NextCmdClear()
		{
			XSingleton<XTutorialHelper>.singleton.BattleNPCTalkEnd = false;
		}

		public override void Uninit()
		{
			this._newOpenedSystem.Clear();
		}

		public void AddNewOpenSystem(uint sysID)
		{
			this._newOpenedSystem.Add(sysID);
		}

		public bool IsSysOpend(uint SysID)
		{
			for (int i = 0; i < this._newOpenedSystem.Count; i++)
			{
				bool flag = this._newOpenedSystem[i] == SysID;
				if (flag)
				{
					return true;
				}
			}
			return false;
		}

		public static Vector2 BaseScreenPos2Real(Vector2 basePos)
		{
			float num = basePos.x / (float)XSingleton<XGameUI>.singleton.Base_UI_Width * (float)Screen.width;
			float num2 = basePos.y / (float)XSingleton<XGameUI>.singleton.Base_UI_Height * (float)Screen.height;
			return new Vector2(num, num2);
		}
	}
}