1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using LitJson;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class TopManager : MonoSingleton<TopManager>
- {
- public GameObject root;
- public GameObject icon;
- public void exitUser()
- {
- List<string> backTip = new List<string>();
- JsonData data = new JsonData();
- data["type"] = "40001";
- backTip.Add("1");
- backTip.Add(data.ToJson());
- backTip.Add("3");
- WindowsManager.Instance.show(WindowConfig.windowType.Error, false, WindowsManager.Instance.getErrorData("提示", "是否退出账号?", Color.gray, "icon", backTip, false, "自动退出", 5, "", "退出", "返回").ToJson());
- }
- public void exitUserOk()
- {
- if (ChangeCameraSaoMiao.Instance)
- {
- ChangeCameraSaoMiao.Instance.close();
- ChangeCameraSaoMiao.Instance.checkLuXiang();
- }
- if (LineManager.Instance)
- LineManager.Instance.stop();
- if (WindowGenSui.Instance)
- WindowGenSui.Instance.jd = 30;
- LoginManager.Instance.ExitUser();
- WindowsManager.Instance.show(WindowConfig.windowType.Login);
- }
- private void OnEnable()
- {
- if (TopManager.Instance.icon.transform.localPosition != Vector3.zero)
- {
- TopManager.Instance.root.SetActive(false);
- UserManager.Instance.MoveIcon(Vector3.zero, TopManager.Instance.icon.transform, () => { TopManager.Instance.root.SetActive(true); });
- }
- }
- }
|