blob: 3d7d8d150b96bacbb88bea4d03f5b7deac99fcc4 (
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
|
using System;
using System.Collections.Generic;
using UILib;
using UnityEngine;
using XUtliPoolLib;
namespace XMainClient
{
internal class XSubSysRedPointMgr
{
public List<XSubSysRedPointMgr.RedPointInfo> _btns = new List<XSubSysRedPointMgr.RedPointInfo>();
public class RedPointInfo
{
public IXUIObject _btn = null;
public Transform redPoint = null;
}
public void SetupRedPoints(IXUIObject[] btns)
{
this._btns.Clear();
this.Append(btns);
this.UpdateRedPointUI();
}
public void Append(IXUIObject[] btns)
{
bool flag = btns != null;
if (flag)
{
foreach (IXUIObject btn in btns)
{
this.Append(btn);
}
}
}
public void Append(IXUIObject btn)
{
bool flag = btn != null;
if (flag)
{
XSubSysRedPointMgr.RedPointInfo redPointInfo = new XSubSysRedPointMgr.RedPointInfo();
redPointInfo._btn = btn;
redPointInfo.redPoint = btn.gameObject.transform.Find("RedPoint");
this._btns.Add(redPointInfo);
}
}
public void UpdateRedPointUI()
{
bool flag = this._btns == null;
if (!flag)
{
XGameSysMgr singleton = XSingleton<XGameSysMgr>.singleton;
for (int i = 0; i < this._btns.Count; i++)
{
XSubSysRedPointMgr.RedPointInfo redPointInfo = this._btns[i];
bool flag2 = redPointInfo._btn == null || redPointInfo.redPoint == null;
if (!flag2)
{
XSysDefine sys = (XSysDefine)redPointInfo._btn.ID;
redPointInfo.redPoint.gameObject.SetActive(singleton.GetSysRedPointState(sys));
}
}
}
}
}
}
|