1 文件已重命名
13个文件已修改
6 文件已复制
7个文件已添加
5个文件已删除
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A5 05 公会跨服互通信息 #tagSCFamilyCrossInfo
|
| | |
|
| | | public class DTCA505_tagSCFamilyCrossInfo : DtcBasic {
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HA505_tagSCFamilyCrossInfo vNetData = vNetPack as HA505_tagSCFamilyCrossInfo;
|
| | | GuildManager.Instance.OnRefreshCrossServerInfo(vNetData);
|
| | | }
|
| | | }
|
| File was renamed from Main/Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA521_tagMCFamilyChange.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 95872d70a4fcdaf47a7089e954db72fb |
| | | guid: b6a841aca303f3d4bb7fa214596b9fb4 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A5 24 公会成员删除 #tagSCFamilyMemDel
|
| | |
|
| | | public class DTCA524_tagSCFamilyMemDel : DtcBasic {
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HA524_tagSCFamilyMemDel vNetData = vNetPack as HA524_tagSCFamilyMemDel;
|
| | | PlayerDatas.Instance.fairyData.DeleteMember(vNetData);
|
| | | }
|
| | | }
|
copy from Main/Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA521_tagMCFamilyChange.cs.meta
copy to Main/Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA524_tagSCFamilyMemDel.cs.meta
| File was copied from Main/Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA521_tagMCFamilyChange.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 95872d70a4fcdaf47a7089e954db72fb |
| | | guid: de4a083265d8ebf438ab2e65d0925d9e |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | |
| | | Register(typeof(HA512_tagMCFamilyZhenbaogeInfo), typeof(DTCA512_tagMCFamilyZhenbaogeInfo)); |
| | | Register(typeof(HA513_tagMCFamilyActionInfo), typeof(DTCA513_tagMCFamilyActionInfo)); |
| | | Register(typeof(HA520_tagMCRoleFamilyInfo), typeof(DTCA520_tagMCRoleFamilyInfo)); |
| | | Register(typeof(HA521_tagMCFamilyChange), typeof(DTCA521_tagMCFamilyChange)); |
| | | Register(typeof(HA524_tagSCFamilyMemDel), typeof(DTCA524_tagSCFamilyMemDel)); |
| | | Register(typeof(HA505_tagSCFamilyCrossInfo), typeof(DTCA505_tagSCFamilyCrossInfo)); |
| | | Register(typeof(HA522_tagMCFamilyReqJoinInfo), typeof(DTCA522_tagMCFamilyReqJoinInfo)); |
| | | Register(typeof(HA523_tagMCFamilyViewList), typeof(DTCA523_tagMCFamilyViewList)); |
| | | Register(typeof(HA009_tagSCGameRecInfo), typeof(DTCA009_tagSCGameRecInfo)); |
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // A5 05 公会跨服互通信息 #tagSCFamilyCrossInfo
|
| | |
|
| | | public class HA505_tagSCFamilyCrossInfo : GameNetPackBasic {
|
| | | public byte ZoneID; // 所属分区
|
| | | public ushort ServerCnt;
|
| | | public uint[] ServerIDList; // 互通服务器ID列表
|
| | |
|
| | | public HA505_tagSCFamilyCrossInfo () {
|
| | | _cmd = (ushort)0xA505;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out ZoneID, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ServerCnt, vBytes, NetDataType.WORD);
|
| | | TransBytes (out ServerIDList, vBytes, NetDataType.DWORD, ServerCnt);
|
| | | }
|
| | |
|
| | | }
|
copy from Main/Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA521_tagMCFamilyChange.cs.meta
copy to Main/Core/NetworkPackage/ServerPack/HA5_Family/HA505_tagSCFamilyCrossInfo.cs.meta
| File was copied from Main/Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA521_tagMCFamilyChange.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 95872d70a4fcdaf47a7089e954db72fb |
| | | guid: 2975d104ad2db9747a57b40c35de08e2 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | |
| | | public uint LeaderID; //族长玩家ID
|
| | | public byte MemberCount; //人数
|
| | | public tagMCRoleFamilyMember[] MemberList; //size = MemberCount
|
| | | public uint Extra1; //附加字段1
|
| | |
|
| | | public HA520_tagMCRoleFamilyInfo () {
|
| | | _cmd = (ushort)0xA520;
|
| | |
| | | TransBytes (out MemberList[i].DonateCntDay, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out MemberList[i].OffTime, vBytes, NetDataType.DWORD);
|
| | | }
|
| | | TransBytes (out Extra1, vBytes, NetDataType.DWORD);
|
| | | }
|
| | |
|
| | | public class tagMCRoleFamilyMember {
|
| | |
| | | public byte TotalPage; //一共有多少页
|
| | | public byte FamilyCount;
|
| | | public tagMCFamilyView[] FamilyList; //本页家族信息列表
|
| | | public uint Rank; //玩家公会所在名次,0-没有公会或没有在榜上;>0-对应排名
|
| | |
|
| | | public HA523_tagMCFamilyViewList () {
|
| | | _cmd = (ushort)0xA523;
|
| | |
| | | TransBytes (out FamilyList[i].FightPowerEx, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out FamilyList[i].MemberCount, vBytes, NetDataType.BYTE);
|
| | | }
|
| | | TransBytes (out Rank, vBytes, NetDataType.DWORD);
|
| | | }
|
| | |
|
| | | public class tagMCFamilyView {
|
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // A5 24 公会成员删除 #tagSCFamilyMemDel
|
| | |
|
| | | public class HA524_tagSCFamilyMemDel : GameNetPackBasic {
|
| | | public byte Type; // 0-踢出;1-主动退出
|
| | | public uint PlayerID;
|
| | | public byte NameLen;
|
| | | public string Name;
|
| | |
|
| | | public HA524_tagSCFamilyMemDel () {
|
| | | _cmd = (ushort)0xA524;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out Type, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out PlayerID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out NameLen, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out Name, vBytes, NetDataType.Chars, NameLen);
|
| | | }
|
| | |
|
| | | }
|
copy from Main/Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA521_tagMCFamilyChange.cs.meta
copy to Main/Core/NetworkPackage/ServerPack/HA5_Family/HA524_tagSCFamilyMemDel.cs.meta
| File was copied from Main/Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA521_tagMCFamilyChange.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 95872d70a4fcdaf47a7089e954db72fb |
| | | guid: 824719d9672072944a5ff55b15e93e52 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | |
| | | if (PlayerDatas.Instance.fairyData.fairy == null) |
| | | return; |
| | | |
| | | GuildManager.Instance.RequestGuildData(); |
| | | GlobalTimeEvent.Instance.secondEvent += OnSecondEvent; |
| | | GlobalTimeEvent.Instance.fiveSecondEvent += OnFiveSecondEvent; |
| | | ChatManager.Instance.OnUpdateTalkEvent += OnUpdateTalkEvent; |
| | |
| | | |
| | | void ShowTime() |
| | | { |
| | | if (GuildManager.Instance.TryGetFamilyActions(GuildManager.CustomyActionType, out var familyActions)) |
| | | if (PlayerDatas.Instance.fairyData.fairy != null) |
| | | { |
| | | var lastTime = familyActions.IsNullOrEmpty() ? 0 : familyActions[0].Value1; |
| | | var cdTime = GuildManager.Instance.renameFairyNameCD * 3600 - (TimeUtility.AllSeconds - (int)lastTime); |
| | | var lastTime = PlayerDatas.Instance.fairyData.fairy.lastChangeNameTick; |
| | | var cdTime = GuildManager.Instance.renameFairyNameCD * 3600 - (TimeUtility.AllSeconds - lastTime); |
| | | if (cdTime <= 0) |
| | | { |
| | | cdTimeText.text = Language.Get("Guild_51", GuildManager.Instance.renameFairyNameCD); |
| | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | GuildManager.Instance.RequestGuildData(); |
| | | |
| | | GuildManager.Instance.memberOPIndex = -1; |
| | | GuildManager.Instance.MemberOPIndexEvent += OnMemberOPIndexEvent; |
| | |
| | | [SerializeField] Button quicklyJoinGuildBtn; |
| | | [SerializeField] ScrollerController guildListScroller; |
| | | [SerializeField] Transform noGuildTf; |
| | | [SerializeField] Button serversBtn; |
| | | |
| | | string lastQuery = ""; |
| | | int lastPage = 0; |
| | |
| | | findBtn.AddListener(() => OnFindBtnClick()); |
| | | createGuildBtn.AddListener(OnCreateGuildBtnClick); |
| | | quicklyJoinGuildBtn.AddListener(OnQuicklyJoinGuildBtnClick); |
| | | serversBtn.AddListener(()=> |
| | | { |
| | | UIHelper.ShowServersPanel(GuildManager.Instance.crossServerIDList); |
| | | }); |
| | | } |
| | | protected override void OnPreOpen() |
| | | { |
| | |
| | | |
| | | void Display() |
| | | { |
| | | serversBtn.SetActive(GuildManager.Instance.zoneID != 0); |
| | | CreateScroller(); |
| | | } |
| | | |
| New file |
| | |
| | |
|
| | |
|
| | | // 跨服公会
|
| | | using System;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | public partial class GuildManager : GameSystemManager<GuildManager>
|
| | | {
|
| | | public int zoneID;
|
| | | public List<int> crossServerIDList = new List<int>();
|
| | | public event Action OnRefreshCrossServerInfoEvent;
|
| | |
|
| | | public void OnRefreshCrossServerInfo(HA505_tagSCFamilyCrossInfo vNetData)
|
| | | {
|
| | | zoneID = vNetData.ZoneID;
|
| | | crossServerIDList.Clear();
|
| | | for (int i = 0; i < vNetData.ServerCnt; i++)
|
| | | {
|
| | | crossServerIDList.Add((int)vNetData.ServerIDList[i]);
|
| | | }
|
| | | crossServerIDList.Sort();
|
| | | OnRefreshCrossServerInfoEvent?.Invoke();
|
| | | }
|
| | |
|
| | | // 获取当前时间, 公会跨区前取本服时间,跨服后取跨服时间
|
| | | public DateTime GetServerNow()
|
| | | {
|
| | | if (zoneID == 0)
|
| | | {
|
| | | return TimeUtility.ServerNow;
|
| | | }
|
| | | else
|
| | | {
|
| | | return TimeUtility.CrossServerNow;
|
| | | }
|
| | | }
|
| | |
|
| | | public int GetServerTick()
|
| | | {
|
| | | if (zoneID == 0)
|
| | | {
|
| | | return TimeUtility.AllSeconds;
|
| | | }
|
| | | else
|
| | | {
|
| | | return TimeUtility.AllSecondsCrossServer;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
|
copy from Main/Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA521_tagMCFamilyChange.cs.meta
copy to Main/System/Guild/GuildManager.CrossServer.cs.meta
| File was copied from Main/Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA521_tagMCFamilyChange.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 95872d70a4fcdaf47a7089e954db72fb |
| | | guid: 60391b6aaece70d44818911cfde90870 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | |
| | | using UnityEngine;
|
| | |
|
| | |
|
| | | public class GuildManager : GameSystemManager<GuildManager>
|
| | | public partial class GuildManager : GameSystemManager<GuildManager>
|
| | | {
|
| | | // 家族自定义记录类型
|
| | | public const int CustomyActionType = 0; //通用
|
| | | public const int MemberChangeActionType = 12; //公会变更记录
|
| | | public const int FamilyActionsType = 15; // 公会记录徽章类型15
|
| | | public const int ZBGFamilyActionType = 16; // 珍宝阁记录类型
|
| | |
| | |
|
| | | void OnBeforePlayerDataInitializeEx()
|
| | | {
|
| | | guildChanged = false;
|
| | | isQueryZBGYet = false;
|
| | | }
|
| | |
|
| | |
| | | PlayerDatas.Instance.baseData.FamilyId = 0;
|
| | | m_FairyRequesteds.Clear();
|
| | | familyActions.Clear();
|
| | | guildChanged = false;
|
| | | applyList.Clear();
|
| | | PlayerDatas.Instance.fairyData.ClearData();
|
| | |
|
| | |
| | |
|
| | | // 查找的公会ID:公会数据
|
| | | public Dictionary<int, FairyData> guildsDict = new Dictionary<int, FairyData>();
|
| | | public int myFairyRank;
|
| | | // 按查询页存储
|
| | | public List<int> pageIndexList = new List<int>(); //正常是按页查询,顺序添加即可
|
| | | public int curPageIndex;
|
| | |
| | | SetFairyViewData(data, guildInfo);
|
| | | pageIndexList.Add((int)guildInfo.FamilyID);
|
| | | }
|
| | |
|
| | | myFairyRank = (int)vNetData.Rank; //0-没有公会或没有在榜上;>0-对应排名
|
| | |
|
| | | if (OnRefreshFairyList != null)
|
| | | {
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | float lastChangeMarkTime = 0; //打开界面情况下避免短时间多次立即请求,C/S通信也是有时间间隔
|
| | | public bool guildChanged = false;
|
| | | //Type:0-无;1-成员加入;2-成员退出;3-收人设置修改;4-公告修改;5-徽章修改;6-盟主变更;7-成员职位变更;8-成员上线;9-成员离线;
|
| | | //公会数据变化,请求新的公会信息,如在打开公会列表时请求,其他功能根据自身情况请求
|
| | | public void UpdateGuildDataChangeMark(HA521_tagMCFamilyChange netPack)
|
| | | {
|
| | | guildChanged = true;
|
| | | if (Time.time - lastChangeMarkTime < 0.2f)
|
| | | {
|
| | | //小优化 如果有问题也可以去除
|
| | | return;
|
| | | }
|
| | | lastChangeMarkTime = Time.time;
|
| | | if ((netPack.Type == 1 || netPack.Type == 2) && UIManager.Instance.IsOpened<GuildBaseWin>())
|
| | | {
|
| | | RequestGuildData();
|
| | | }
|
| | | }
|
| | |
|
| | | public void RequestGuildData()
|
| | | {
|
| | | if (guildChanged)
|
| | | {
|
| | | guildChanged = false;
|
| | | var pack = new CA626_tagCMGetFamilyInfo();
|
| | | GameNetSystem.Instance.SendInfo(pack);
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | public void SendKickFairy(uint playerID)
|
| | | {
|
| | |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | GuildManager.Instance.RequestGuildData(); |
| | | |
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo += OnRefreshFairyInfo; |
| | | Display(); |
| | |
| | | // 0-成员,1-精英,2-副盟主,3-盟主
|
| | | public int leaderID;
|
| | | public string leaderName;
|
| | | // // 精英
|
| | | public List<int> elitePlayerIDList = new List<int>();
|
| | | // // 副盟主
|
| | | public List<int> deputyLeaderPlayerIDList = new List<int>();
|
| | |
|
| | | //差异更新 需增删改 memberDic memberIDList deputyLeaderPlayerIDList
|
| | | public void OnRefreshGuildInfo(HA520_tagMCRoleFamilyInfo vNetData)
|
| | | {
|
| | | if (fairy == null)
|
| | |
| | | fairy.totalFightPower = vNetData.FightPowerEx * Constants.ExpPointValue + vNetData.FightPower;
|
| | | fairy.Broadcast = vNetData.Broadcast;
|
| | | fairy.LeaderID = (int)vNetData.LeaderID;
|
| | | fairy.MemberCount = vNetData.MemberCount;
|
| | | |
| | | fairy.lastChangeNameTick = (int)vNetData.Extra1;
|
| | |
|
| | | mine = null;
|
| | |
|
| | | memberDic.Clear();
|
| | | memberIDList.Clear();
|
| | | deputyLeaderPlayerIDList.Clear();
|
| | | for (int i = 0; i < vNetData.MemberCount; i++)
|
| | | {
|
| | | FairyMember member = new FairyMember();
|
| | |
| | | OnRefreshFairyMine?.Invoke();
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | // 0-成员,1-精英,2-副盟主,3-盟主
|
| | |
|
| | | // if (member.FmLV == 1)
|
| | | // {
|
| | | // elitePlayerIDList.Add(member.PlayerID);
|
| | | // }
|
| | | if (member.FmLV == 2)
|
| | | if (deputyLeaderPlayerIDList.Contains(member.PlayerID) && member.FmLV != 2)
|
| | | {
|
| | | deputyLeaderPlayerIDList.Remove(member.PlayerID);
|
| | | }
|
| | | else if (member.FmLV == 2 && !deputyLeaderPlayerIDList.Contains(member.PlayerID))
|
| | | {
|
| | | // 对应的变更 和 退出需同步修改
|
| | | deputyLeaderPlayerIDList.Add(member.PlayerID);
|
| | | }
|
| | |
|
| | |
|
| | | if (member.FmLV == 3)
|
| | | {
|
| | | leaderID = (int)member.PlayerID;
|
| | | leaderID = member.PlayerID;
|
| | | leaderName = member.Name;
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | memberIDList.AddRange(memberDic.Keys);
|
| | | memberIDList.Sort(SortMember);
|
| | | |
| | | if (mine.FmLV == 3 && mine.PlayerID != leaderID)
|
| | | {
|
| | | mine.FmLV = 0;
|
| | | }
|
| | | RefreshMemberIDList();
|
| | |
|
| | | if (OnRefreshFairyInfo != null) OnRefreshFairyInfo();
|
| | | }
|
| | |
|
| | |
|
| | | public void DeleteMember(HA524_tagSCFamilyMemDel netPack)
|
| | | {
|
| | | if (memberDic.ContainsKey((int)netPack.PlayerID))
|
| | | {
|
| | | memberDic.Remove((int)netPack.PlayerID);
|
| | | RefreshMemberIDList();
|
| | | }
|
| | | if (deputyLeaderPlayerIDList.Contains((int)netPack.PlayerID))
|
| | | {
|
| | | deputyLeaderPlayerIDList.Remove((int)netPack.PlayerID);
|
| | | }
|
| | |
|
| | | OnRefreshFairyInfo?.Invoke();
|
| | | }
|
| | |
|
| | | void RefreshMemberIDList()
|
| | | {
|
| | | memberIDList.Clear();
|
| | | memberIDList.AddRange(memberDic.Keys);
|
| | | memberIDList.Sort(SortMember);
|
| | | fairy.MemberCount = memberIDList.Count;
|
| | | }
|
| | |
|
| | | public FairyMember GetMember(int playerid)
|
| | |
| | | public string Broadcast;
|
| | | public int LeaderID; //族长玩家ID
|
| | | public int MemberCount;
|
| | | public int lastChangeNameTick;
|
| | |
|
| | | //查找增加的字段
|
| | | public string LeaderName;
|
| New file |
| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | |
| | | public class ServersSmallTipCell : CellView |
| | | { |
| | | [SerializeField] Text[] serversText; |
| | | |
| | | |
| | | |
| | | public void Display(int index) |
| | | { |
| | | for (int i = 0; i < serversText.Length; i++) |
| | | { |
| | | int listIndex = index + i; |
| | | if (listIndex >= ServersSmallTipWin.serverIDList.Count) |
| | | { |
| | | serversText[i].text = ""; |
| | | return; |
| | | } |
| | | serversText[i].SetActive(true); |
| | | var serverID = ServersSmallTipWin.serverIDList[index + i]; |
| | | serversText[i].text = ServerListCenter.Instance.GetServerName(serverID); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
copy from Main/Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA521_tagMCFamilyChange.cs.meta
copy to Main/System/Guild/ServersSmallTipCell.cs.meta
| File was copied from Main/Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA521_tagMCFamilyChange.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 95872d70a4fcdaf47a7089e954db72fb |
| | | guid: 36a723a4b576693468a90ba111d5b58c |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| New file |
| | |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | public class ServersSmallTipWin : UIBase |
| | | { |
| | | [SerializeField] RectTransform content; |
| | | [SerializeField] RectTransform arrow; |
| | | [SerializeField] ScrollerController serversScroller; |
| | | |
| | | public static List<int> serverIDList; |
| | | protected override void OnPreOpen() |
| | | { |
| | | serversScroller.OnRefreshCell += OnRefreshCell; |
| | | Display(); |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | serversScroller.OnRefreshCell -= OnRefreshCell; |
| | | } |
| | | |
| | | |
| | | protected override void NextFrameAfterOpen() |
| | | { |
| | | var worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition); |
| | | |
| | | |
| | | Vector2 screenAdjustedPos = CameraManager.uiCamera.WorldToScreenPoint(worldPos); |
| | | |
| | | var beforePos = screenAdjustedPos; |
| | | var beforeAdjustedPos = CameraManager.uiCamera.ScreenToWorldPoint(beforePos); |
| | | |
| | | var rectWidth = content.rect.width * Screen.width / canvasScaler.referenceResolution.x; |
| | | screenAdjustedPos.x = Mathf.Clamp(screenAdjustedPos.x, rectWidth * 0.5f, Screen.width - rectWidth * 0.5f); |
| | | screenAdjustedPos.y -= 40; |
| | | var adjustedPos = CameraManager.uiCamera.ScreenToWorldPoint(screenAdjustedPos); |
| | | adjustedPos.z = 0; |
| | | content.position = adjustedPos; |
| | | |
| | | arrow.position = new Vector3(beforeAdjustedPos.x, arrow.position.y, 0); |
| | | } |
| | | |
| | | |
| | | public void Display() |
| | | { |
| | | serversScroller.Refresh(); |
| | | for (int i = 0; i < serverIDList.Count; i++) |
| | | { |
| | | if (i % 4 == 0) |
| | | { |
| | | serversScroller.AddCell(ScrollerDataType.Header, i); |
| | | } |
| | | } |
| | | serversScroller.Restart(); |
| | | } |
| | | |
| | | void OnRefreshCell(ScrollerDataType type, CellView cell) |
| | | { |
| | | var _cell = cell.GetComponent<ServersSmallTipCell>(); |
| | | _cell.Display(cell.index); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
copy from Main/Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA521_tagMCFamilyChange.cs.meta
copy to Main/System/Guild/ServersSmallTipWin.cs.meta
| File was copied from Main/Core/NetworkPackage/DTCFile/ServerPack/HA5_Family/DTCA521_tagMCFamilyChange.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 95872d70a4fcdaf47a7089e954db72fb |
| | | guid: d3c0b72418f3c5345ba779c8382e0eb0 |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using Jace.Operations; |
| | | using LitJson; |
| | | |
| | | using UnityEngine; |
| | |
| | | } |
| | | } |
| | | |
| | | public static int AllSecondsCrossServer |
| | | { |
| | | get |
| | | { |
| | | TimeSpan t = CrossServerNow - OriginalTime; |
| | | return (int)t.TotalSeconds; |
| | | } |
| | | } |
| | | |
| | | //1年中的第几周,以服务端为准,python和c#算出来不一样 |
| | | public static int WeekOfYear |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | public static void ShowServersPanel(List<int> serverIDList) |
| | | { |
| | | if (UIManager.Instance.IsOpened<ServersSmallTipWin>()) |
| | | { |
| | | UIManager.Instance.CloseWindow<ServersSmallTipWin>(); |
| | | } |
| | | ServersSmallTipWin.serverIDList = serverIDList; |
| | | UIManager.Instance.OpenWindow<ServersSmallTipWin>(); |
| | | } |
| | | |
| | | } |