Core/NetworkPackage/DTCFile/ServerPack/HAD_SaleActivity.meta
New file @@ -0,0 +1,9 @@ fileFormatVersion: 2 guid: 3e05761d690b75440a6be79207d0fb01 folderAsset: yes timeCreated: 1547643019 licenseType: Pro DefaultImporter: userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/DTCFile/ServerPack/HAE_Truck.meta
New file @@ -0,0 +1,9 @@ fileFormatVersion: 2 guid: 1d70ccd06161e0443b7a802ad94292f8 folderAsset: yes timeCreated: 1547643019 licenseType: Pro DefaultImporter: userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/DTCFile/ServerPack/HAF_Merge.meta
New file @@ -0,0 +1,9 @@ fileFormatVersion: 2 guid: 71e878ac60c49ad4f964dd2dbc725739 folderAsset: yes timeCreated: 1547643019 licenseType: Pro DefaultImporter: userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/DTCFile/ServerPack/HB0_Event.meta
New file @@ -0,0 +1,9 @@ fileFormatVersion: 2 guid: eed34091b0568664b9fb42f0634496c1 folderAsset: yes timeCreated: 1547643019 licenseType: Pro DefaultImporter: userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/ServerPack/HAD_SaleActivity.meta
New file @@ -0,0 +1,9 @@ fileFormatVersion: 2 guid: 32ceb8b7faf99f84a8b73ce53c5e3e4d folderAsset: yes timeCreated: 1547643019 licenseType: Pro DefaultImporter: userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/ServerPack/HAE_Truck.meta
New file @@ -0,0 +1,9 @@ fileFormatVersion: 2 guid: 77f69c2b862d1704299a32d0d8eeb71e folderAsset: yes timeCreated: 1547643019 licenseType: Pro DefaultImporter: userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/ServerPack/HAF_Merge.meta
New file @@ -0,0 +1,9 @@ fileFormatVersion: 2 guid: fa14960fa44b0d1439bab471a764e34f folderAsset: yes timeCreated: 1547643019 licenseType: Pro DefaultImporter: userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/ServerPack/HB0_Event.meta
New file @@ -0,0 +1,9 @@ fileFormatVersion: 2 guid: d914565b65f8e8145988734c4d915834 folderAsset: yes timeCreated: 1547643019 licenseType: Pro DefaultImporter: userData: assetBundleName: assetBundleVariant: Fight/Actor/AI/Process.meta
New file @@ -0,0 +1,9 @@ fileFormatVersion: 2 guid: e7041053eb7e74b40b6a3298fff62903 folderAsset: yes timeCreated: 1555593811 licenseType: Pro DefaultImporter: userData: assetBundleName: assetBundleVariant: Fight/Actor/AI/Process/PN_AttackCount.cs
New file @@ -0,0 +1,4 @@ public class PN_AttackCount { } Fight/Actor/AI/Process/PN_AttackCount.cs.metacopy from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta copy to Fight/Actor/AI/Process/PN_AttackCount.cs.meta
File was copied from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: cacea0d413c9c3d4baee55316ebd32d0 timeCreated: 1528968656 guid: 9f7049684ebfcb646a6585689fa3de47 timeCreated: 1555595526 licenseType: Pro MonoImporter: serializedVersion: 2 Fight/Actor/AI/Process/PN_BeAttackCount.cs
New file @@ -0,0 +1,4 @@ public class PN_BeAttackCount { } Fight/Actor/AI/Process/PN_BeAttackCount.cs.metacopy from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta copy to Fight/Actor/AI/Process/PN_BeAttackCount.cs.meta
File was copied from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: cacea0d413c9c3d4baee55316ebd32d0 timeCreated: 1528968656 guid: b016e67df5e40db40a5d4b803f46ce93 timeCreated: 1555595526 licenseType: Pro MonoImporter: serializedVersion: 2 Fight/Actor/AI/Process/PN_HpPer.cs
New file @@ -0,0 +1,4 @@ public class PN_HpPer { } Fight/Actor/AI/Process/PN_HpPer.cs.meta
File was renamed from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: cacea0d413c9c3d4baee55316ebd32d0 timeCreated: 1528968656 guid: 1b7cc8404bc5faa488b3175940188a39 timeCreated: 1555595631 licenseType: Pro MonoImporter: serializedVersion: 2 Fight/Actor/AI/Process/PN_LockHp.cs
New file @@ -0,0 +1,4 @@ public class PN_LockHp { } Fight/Actor/AI/Process/PN_LockHp.cs.metacopy from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta copy to Fight/Actor/AI/Process/PN_LockHp.cs.meta
File was copied from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: cacea0d413c9c3d4baee55316ebd32d0 timeCreated: 1528968656 guid: e1fdf91c00e5e2d40b25abf24e149579 timeCreated: 1555595631 licenseType: Pro MonoImporter: serializedVersion: 2 Fight/Actor/AI/Process/PN_UnLockHp.cs
New file @@ -0,0 +1,4 @@ public class PN_UnLockHp { } Fight/Actor/AI/Process/PN_UnLockHp.cs.metacopy from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta copy to Fight/Actor/AI/Process/PN_UnLockHp.cs.meta
File was copied from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: cacea0d413c9c3d4baee55316ebd32d0 timeCreated: 1528968656 guid: 340d0053aa71b8245a3a68531cd61475 timeCreated: 1555595631 licenseType: Pro MonoImporter: serializedVersion: 2 Fight/Actor/AI/Process/ProcessManager.cs.cs
New file @@ -0,0 +1,29 @@ using System.Collections.Generic; public class ProcessManager : Singleton<ProcessManager> { private Queue<ProcessNode> m_NodeQueue = new Queue<ProcessNode>(); public void Load(int npcID) { m_NodeQueue.Clear(); } public void Update() { if (m_NodeQueue.Count == 0) { return; } var _node = m_NodeQueue.Peek(); _node.Update(); if (_node.IsOver()) { m_NodeQueue.Dequeue(); } } } Fight/Actor/AI/Process/ProcessManager.cs.cs.metacopy from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta copy to Fight/Actor/AI/Process/ProcessManager.cs.cs.meta
File was copied from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: cacea0d413c9c3d4baee55316ebd32d0 timeCreated: 1528968656 guid: bc619663298bfa443bcd0facb86a84ed timeCreated: 1555593845 licenseType: Pro MonoImporter: serializedVersion: 2 Fight/Actor/AI/Process/ProcessNode.cs
New file @@ -0,0 +1,18 @@ public abstract class ProcessNode { public enum E_ProcessType { BeAttackCount, AttackCount, HpPer, LockHp, UnLockHp, } public int param; public abstract void Init(); public abstract void Update(); public abstract void UnInit(); public abstract bool IsOver(); } Fight/Actor/AI/Process/ProcessNode.cs.metacopy from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta copy to Fight/Actor/AI/Process/ProcessNode.cs.meta
File was copied from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: cacea0d413c9c3d4baee55316ebd32d0 timeCreated: 1528968656 guid: 4175daffae66495419f74e38170105de timeCreated: 1555593811 licenseType: Pro MonoImporter: serializedVersion: 2 System/Dungeon/DungeonAncientAchieveWin.cs
@@ -9,7 +9,8 @@ using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { namespace Snxxz.UI { public class DungeonAncientAchieveWin : Window { @@ -28,7 +29,7 @@ protected override void OnPreOpen() { m_AchieveTargetBehaviour.Init(31160); MainInterfaceWin.Event_Duplicates += OnChangeFuncBtnPosEvent; MainPositionTween.switchFunctionStateEvent += OnChangeFuncBtnPosEvent; } protected override void OnAfterOpen() @@ -37,20 +38,22 @@ protected override void OnPreClose() { MainInterfaceWin.Event_Duplicates -= OnChangeFuncBtnPosEvent; MainPositionTween.switchFunctionStateEvent -= OnChangeFuncBtnPosEvent; } protected override void OnAfterClose() { } #endregion private void OnChangeFuncBtnPosEvent(bool open, float _speed) private void OnChangeFuncBtnPosEvent(bool immedidately) { if (open) if (!MainPositionTween.isDefaultState) { CloseImmediately(); } } } } System/Dungeon/DungeonAncientKingWin.cs
@@ -30,7 +30,7 @@ protected override void OnPreOpen() { MainInterfaceWin.Event_Duplicates += OnChangeFuncBtnPosEvent; MainPositionTween.switchFunctionStateEvent += OnChangeFuncBtnPosEvent; model.updateMissionEvent += DisplayPosition; DisplayAward(); DisplayPosition(); @@ -42,7 +42,7 @@ protected override void OnPreClose() { MainInterfaceWin.Event_Duplicates -= OnChangeFuncBtnPosEvent; MainPositionTween.switchFunctionStateEvent -= OnChangeFuncBtnPosEvent; model.updateMissionEvent -= DisplayPosition; } @@ -76,9 +76,9 @@ } } private void OnChangeFuncBtnPosEvent(bool open, float _speed) private void OnChangeFuncBtnPosEvent(bool immedidately) { if (open) if (!MainPositionTween.isDefaultState) { CloseImmediately(); } System/Dungeon/DungeonFightWin.cs
@@ -126,10 +126,10 @@ break; } m_GuardSky.gameObject.SetActive(dataMapId == 31170); m_ContainerFuncBtn.localPosition = MainInterfaceWin.recordPositionBool ? m_ContainerFuncBottom.localPosition : m_ContainerFuncUp.localPosition; m_ContainerFuncBtn.localPosition = MainPositionTween.isDefaultState ? m_ContainerFuncBottom.localPosition : m_ContainerFuncUp.localPosition; model.dungeonCoolDownEvent += OnLeaveMapTimeEvent; MainInterfaceWin.Event_Duplicates += OnChangeFuncBtnPosEvent; MainPositionTween.switchFunctionStateEvent += OnChangeFuncBtnPosEvent; WindowCenter.Instance.windowAfterCloseEvent += WindowAfterCloseEvent; if (WHYJBool()) { @@ -174,7 +174,7 @@ m_GatherSoulDungeonBehaviour.Dispose(); m_DungeonReturnBlood.Dispose(); DropItemManager.pickUpCallBack -= OnPickItem; MainInterfaceWin.Event_Duplicates -= OnChangeFuncBtnPosEvent; MainPositionTween.switchFunctionStateEvent -= OnChangeFuncBtnPosEvent; model.dungeonCoolDownEvent -= OnLeaveMapTimeEvent; WindowCenter.Instance.windowAfterCloseEvent -= WindowAfterCloseEvent; } @@ -208,8 +208,8 @@ m_Tweener.Kill(false); m_Tweener = null; } m_ContainerFuncBtn.localPosition = MainInterfaceWin.recordPositionBool ? m_ContainerFuncBottom.localPosition : m_ContainerFuncUp.localPosition; m_ContainerFuncBtn.localPosition = MainPositionTween.isDefaultState ? m_ContainerFuncBottom.localPosition : m_ContainerFuncUp.localPosition; } } @@ -340,9 +340,23 @@ m_ItemCollect.OnCollect(); } private void OnChangeFuncBtnPosEvent(bool open, float speed) private void OnChangeFuncBtnPosEvent(bool immedidately) { m_Tweener = m_ContainerFuncBtn.DOLocalMoveY(open ? m_ContainerFuncUp.localPosition.y : m_ContainerFuncBottom.localPosition.y, speed); if (immedidately) { if (MainPositionTween.isDefaultState) { m_Tweener = m_ContainerFuncBtn.DOLocalMoveY(m_ContainerFuncBottom.localPosition.y, 1); } else { m_Tweener = m_ContainerFuncBtn.DOLocalMoveY(m_ContainerFuncUp.localPosition.y, 1); } } else { m_ContainerFuncBtn.localPosition = MainPositionTween.isDefaultState ? m_ContainerFuncBottom.localPosition : m_ContainerFuncUp.localPosition; } } private void ProcessDungeonEndCoolDown() System/MainInterfacePanel/AnimationFadeOut.cs
File was deleted System/MainInterfacePanel/AnimationFadeOut.cs.meta
File was deleted System/MainInterfacePanel/DefaultDialogueBoxWin.cs
@@ -37,7 +37,6 @@ protected override void OnPreOpen() { MainInterfaceWin.IsOpenMaininterface += IsOpenMaininterface; _AllMissionDict = taskmodel.allMissionDict; _NPCID = taskmodel.NPCid; var npcConfig = NPCConfig.Get(_NPCID); @@ -57,7 +56,6 @@ protected override void OnPreClose() { MainInterfaceWin.IsOpenMaininterface -= IsOpenMaininterface; } private void IsOpenMaininterface() @@ -69,30 +67,23 @@ { base.LateUpdate(); if (!WindowCenter.Instance.IsOpen<DefaultDialogueBoxWin>()) { return; } GA_Hero _hero = PlayerDatas.Instance.hero; if (_hero == null) { return; } if (_hero.LockTarget == null) { return; } float _chkDistSqrt = MathUtility.DistanceSqrtXZ(_hero.Pos, _hero.LockTarget.Pos); if (_chkDistSqrt > Mathf.Pow(GeneralDefine.FarawayNpcDist, 2)) if (WindowCenter.Instance.IsOpen("MainInterfaceWin")) { WindowCenter.Instance.Close<DefaultDialogueBoxWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); _hero.LockTarget = null; } var hero = PlayerDatas.Instance.hero; if (hero != null && hero.LockTarget != null) { var checkDistSqrt = MathUtility.DistanceSqrtXZ(hero.Pos, hero.LockTarget.Pos); if (checkDistSqrt > Mathf.Pow(GeneralDefine.FarawayNpcDist, 2)) { WindowCenter.Instance.Close<DefaultDialogueBoxWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); hero.LockTarget = null; } } } protected override void OnAfterClose() System/MainInterfacePanel/DialogueDuidanceWin.cs
@@ -6,7 +6,6 @@ using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; //剧情对话面板 @@ -70,7 +69,6 @@ protected override void OnPreOpen() { MainInterfaceWin.IsOpenMaininterface += IsOpenMaininterface; timeType = 0; m_NextText.text = string.Format(Language.Get("TaskContinueCount"), AwaitSecond); IsCloseWindow(); @@ -109,7 +107,6 @@ } protected override void OnPreClose() { MainInterfaceWin.IsOpenMaininterface -= IsOpenMaininterface; UI3DModelExhibition.Instance.StopShow(); } @@ -132,6 +129,11 @@ } protected override void LateUpdate() { if (WindowCenter.Instance.IsOpen("MainInterfaceWin")) { WindowCenter.Instance.Close<DialogueDuidanceWin>(); } timeType += Time.deltaTime; if (timeType >= AwaitSecond) { @@ -141,7 +143,7 @@ } else { m_NextText.text= string.Format(Language.Get("TaskContinueCount"), AwaitSecond - (int)timeType); m_NextText.text = string.Format(Language.Get("TaskContinueCount"), AwaitSecond - (int)timeType); } if (this is BossShowDialogueWin) @@ -149,31 +151,18 @@ return; } if (!WindowCenter.Instance.IsOpen<DialogueDuidanceWin>()) var hero = PlayerDatas.Instance.hero; if (hero != null && hero.LockTarget != null) { return; var checkDistSqrt = MathUtility.DistanceSqrtXZ(hero.Pos, hero.LockTarget.Pos); if (checkDistSqrt > Mathf.Pow(GeneralDefine.FarawayNpcDist, 2)) { WindowCenter.Instance.Close<DialogueDuidanceWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); hero.LockTarget = null; } } GA_Hero _hero = PlayerDatas.Instance.hero; if (_hero == null) { return; } if (_hero.LockTarget == null) { return; } float _chkDistSqrt = MathUtility.DistanceSqrtXZ(_hero.Pos, _hero.LockTarget.Pos); if (_chkDistSqrt > Mathf.Pow(GeneralDefine.FarawayNpcDist, 2)) { WindowCenter.Instance.Close<DialogueDuidanceWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); _hero.LockTarget = null; } } private void OnClickMarkRay() { @@ -272,13 +261,13 @@ { m_ContentText_Npc.text = taskInfo.show_writing; } var data = new UI3DNPCExhibitionData() { npcId = npcId, isDialogue = true, }; UI3DModelExhibition.Instance.ShowNPC(m_NPCIcon,data); UI3DModelExhibition.Instance.ShowNPC(m_NPCIcon, data); } typesPeaker = type; } System/MainInterfacePanel/MainInterfaceWin.cs
@@ -32,7 +32,7 @@ [SerializeField] FairyCallMemberBehaviour m_FairyCallBehaviour; [SerializeField] MapSwitchingBehaviour m_MapSwitchingBehaviour; [SerializeField] DungeonBossBriefInfoContainer m_BossBriefInfos; [SerializeField] AnimationFadeOut m_AnimationFadeOut; [SerializeField] RightBottomFadeInOut m_RightBottomFadeInOut; [SerializeField] IntensifySmoothSlider _ExpSlider;//经验条 [SerializeField] Button _DownButton;//查看经验数值 @@ -46,7 +46,6 @@ [SerializeField] Transform CopyOfThePanel; [SerializeField] GameObject m_TaskAndTeamTip; [SerializeField] GameObject m_MailObj;//邮件显隐 [SerializeField] ClickScreenOtherSpace _MarkRay;//便捷切换按钮 [SerializeField] MainPositionTween m_MainPositionTween; [SerializeField] MainButtonMisc m_MainButtonMisc; @@ -55,14 +54,12 @@ private bool TaskSwithBool = true; private float ExpValueFloat = 0; private bool SliderOpen = true; public static bool recordPositionBool = true; private int mapId = 0; public static event Action Event_ChatCallback; public static event Action<bool, float> Event_Duplicates; #endregion private List<int> ListBossMapId = new List<int>();//用于boss区域地图id public static event Action<bool> IsCopyOfThePanel; public static event Action IsOpenMaininterface; PlayerMainDate onMainModel { get { return ModelCenter.Instance.GetModel<PlayerMainDate>(); } } TaskModel onPlayerTask { get { return ModelCenter.Instance.GetModel<TaskModel>(); } } @@ -70,14 +67,12 @@ PKModel pKModel { get { return ModelCenter.Instance.GetModel<PKModel>(); } } FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } } FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } } TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } } #region Built-in private bool IsUpdateBool = true; protected override void BindController() { m_MapSwitchingBehaviour.InitAwake(); recordPositionBool = true; TaskSwithBool = true; m_MainPositionTween.SetTaskPos(true); m_MailObj.SetActive(true); @@ -94,17 +89,12 @@ { UIEventTrigger.Get(_DownButton.gameObject).OnDown = DownButton; UIEventTrigger.Get(_DownButton.gameObject).OnUp = UpButton; _MarkRay.AddListener(MarkRayButton); _SwitchShowBtn.SetListener(SwitchShowButton); m_TaskSwithButton.SetListener(TaskSwithButton); } protected override void OnPreOpen() { if (IsOpenMaininterface != null) { IsOpenMaininterface(); } IsUpdateBool = true; SliderOpen = true; m_InGamePusher.Init(); @@ -118,12 +108,12 @@ m_TaskListTip.Init(); m_IsShowXp.Init(); m_TopRightTip.Init(); m_AnimationFadeOut.Init(); m_TeamInvitationEntrance.Init(); m_FairyCallBehaviour.Init(); m_MapSwitchingBehaviour.Init(); m_FairyLeagueRemind.Init(); m_MainButtonMisc.Init(); m_RightBottomFadeInOut.Init(); m_BossBriefInfos.gameObject.SetActive(false); ArticleExperience();//关于经验条 CheckChatTipOpen(); @@ -131,7 +121,6 @@ FunctionUnlockFlyObject.functionUnLockShowBeginEvent += UnFlodFunctionArea; GA_Hero.OnEnterOrExitArea += OnEnterOrExitArea; NewBieCenter.Instance.guideBeginEvent += OnGuideBegin; NewBieCenter.Instance.guideCompletedEvent += OnGuideCompleted; WindowCenter.Instance.windowAfterOpenEvent += WindowAfterEvent; WindowCenter.Instance.windowAfterCloseEvent += WindowAfterEvent; NewBieCenter.Instance.guideBeginEvent += GuideBeginEvent; @@ -142,16 +131,55 @@ protected override void OnActived() { m_MainPositionTween.Switch(new MainPositionTween.SwitchParam() { immediately = true, showDefault = true, }); m_MainButtonMisc.OnActived(); IsShowTaskPanel();//是否显示任务面板 if (MapUtility.IsDungeon(PlayerDatas.Instance.baseData.MapID)) { m_FunctionForecastTip.gameObject.SetActive(false); } else { m_FunctionForecastTip.gameObject.SetActive(true); } var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID); if (isNeutralMap) { m_BossBriefInfos.gameObject.SetActive(true); if (PlayerDatas.Instance.baseData.MapID == DogzDungeonModel.DATA_MAPID) { var bosses = ModelCenter.Instance.GetModel<DogzDungeonModel>().GetBosses(); m_BossBriefInfos.Display(bosses); } else if (PlayerDatas.Instance.baseData.MapID == CrossServerBossModel.DATA_MAPID) { var bosses = ModelCenter.Instance.GetModel<CrossServerBossModel>().GetBosses(); m_BossBriefInfos.Display(bosses); } else { var bosses = ModelCenter.Instance.GetModel<WorldBossModel>().GetWorldBosses(PlayerDatas.Instance.baseData.MapID); m_BossBriefInfos.Display(bosses); } } else { m_BossBriefInfos.gameObject.SetActive(false); } } protected override void OnAfterOpen() { bool IsBossBool = PlayerDatas.Instance.hero != null && MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//是否在Boss区域 var inDungeon = IsDungeon(); var judge1 = onMainModel.IsDead || (onMainModel.IsBossAreaTask && !IsBossBool && !m_MainPositionTween.IsTaskAndPanelShow); var judge2 = mapId != PlayerDatas.Instance.baseData.MapID; bool inBossArea = PlayerDatas.Instance.hero != null && MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//是否在Boss区域 var judge1 = onMainModel.IsDead || (onMainModel.IsBossAreaTask && !inBossArea && !m_MainPositionTween.IsTaskAndPanelShow); if (judge1) { @@ -159,68 +187,7 @@ onMainModel.IsBossAreaTask = false; onMainModel.IsDead = false; } if (m_AnimationFadeOut.GetIsFadeIn()) { _MarkRay.gameObject.SetActive(true); } else { _MarkRay.gameObject.SetActive(false); } if (inDungeon) { m_FunctionForecastTip.gameObject.SetActive(false); if (judge2) { SetTipPanelOrBossList(false, false); } if (m_AnimationFadeOut.GetIsFadeIn() && judge2) { m_MailObj.SetActive(true); m_MainPositionTween.SetSkillTipOrRightTipPos(true); recordPositionBool = true; } } else { m_FunctionForecastTip.gameObject.SetActive(true); var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID); if (isNeutralMap) { m_BossBriefInfos.gameObject.SetActive(true); if (PlayerDatas.Instance.baseData.MapID == DogzDungeonModel.DATA_MAPID) { var bosses = ModelCenter.Instance.GetModel<DogzDungeonModel>().GetBosses(); m_BossBriefInfos.Display(bosses); } else if (PlayerDatas.Instance.baseData.MapID == CrossServerBossModel.DATA_MAPID) { var bosses = ModelCenter.Instance.GetModel<CrossServerBossModel>().GetBosses(); m_BossBriefInfos.Display(bosses); } else { var bosses = ModelCenter.Instance.GetModel<WorldBossModel>().GetWorldBosses(PlayerDatas.Instance.baseData.MapID); m_BossBriefInfos.Display(bosses); } } else { m_BossBriefInfos.gameObject.SetActive(false); } if (isNeutralMap && judge2) { SetTipPanelOrBossList(false, false); } else if (!isNeutralMap && !IsBossBool) { SetTipPanelOrBossList(true, false); } } mapId = PlayerDatas.Instance.baseData.MapID; m_HighSettingTip.AfterOpen(); m_ChatTip.OnAfterOpen(); HandleAchievement(); @@ -239,17 +206,16 @@ m_TaskListTip.UnInit(); m_TopRightTip.UnInit(); m_FunctionForecastTip.Unit(); m_AnimationFadeOut.Unit(); m_TeamInvitationEntrance.UnInit(); m_FairyCallBehaviour.UnInit(); m_FairyLeagueRemind.UnInit(); m_MainButtonMisc.UnInit(); m_RightBottomFadeInOut.UnInit(); PlayerDatas.Instance.playerDataRefreshEvent -= Updatefighting; FunctionUnlockFlyObject.functionUnLockShowBeginEvent -= UnFlodFunctionArea; GA_Hero.OnEnterOrExitArea -= OnEnterOrExitArea; NewBieCenter.Instance.guideBeginEvent -= OnGuideBegin; NewBieCenter.Instance.guideCompletedEvent -= OnGuideCompleted; WindowCenter.Instance.windowAfterOpenEvent -= WindowAfterEvent; WindowCenter.Instance.windowAfterCloseEvent -= WindowAfterEvent; NewBieCenter.Instance.guideBeginEvent -= GuideBeginEvent; @@ -316,14 +282,6 @@ } } private void OnGuideCompleted(int obj)//引导结束 { if (m_AnimationFadeOut.GetIsFadeIn()) { _MarkRay.gameObject.SetActive(true); } } private void OnEnterOrExitArea(MapArea.E_Type _areaType, bool _enter) { if (PlayerDatas.Instance.baseData.MapID == 10040 && _areaType != MapArea.E_Type.Boss && _enter) @@ -352,15 +310,6 @@ TaskSwithButton(); onMainModel.IsBossAreaTask = true; } if (m_MainPositionTween.IsSetCopyOfThePanelShow) { if (NewBieCenter.Instance.inGuiding) { return; } recordPositionBool = false; SwitchShowButton(); } } if ((_areaType == MapArea.E_Type.Boss && !_enter) || (_areaType != MapArea.E_Type.Normal && (_areaType != MapArea.E_Type.Boss && _enter))) @@ -372,15 +321,7 @@ } } var inDungeon = IsDungeon(); var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID); if (_areaType == MapArea.E_Type.Boss && !_enter) { if (!m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon && !isNeutralMap) { SetTipPanelOrBossList(true, true); } } m_MainPositionTween.Switch(new MainPositionTween.SwitchParam() { showDefault = true, immediately = false }); } private void AtkTypeChange()//骑宠争夺是否切换状态 @@ -429,42 +370,6 @@ } } public void MarkRayButton() { if (NewBieCenter.Instance.inGuiding) { return; } if (treasureModel.treasureStageUpShow || treasureModel.newGotShowing) { return; } var inDungeon = IsDungeon(); var inBossArea = PlayerDatas.Instance.hero == null ? false : MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//是否在Boss区域 var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID); if (!recordPositionBool) { if (inDungeon || inBossArea || isNeutralMap) { SetTipPanelOrBossList(false, true); } if (!inBossArea) { if (!m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon) { SetTipPanelOrBossList(true, true); } } m_MailObj.SetActive(true); recordPositionBool = true; m_MainPositionTween.SetRotation(false); m_MainPositionTween.SetSkillTipOrRightTipPosTween(true); } } void DownButton(GameObject go) { _ExpRate.gameObject.SetActive(true); @@ -496,39 +401,12 @@ void SwitchShowButton() { var inDungeon = IsDungeon(); bool IsBossBool = MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss); var isNeutralMap = GeneralDefine.neutralBossMaps.Contains(PlayerDatas.Instance.baseData.MapID); var judge1 = inDungeon || IsBossBool || isNeutralMap; var judge2 = !IsBossBool && !m_MainPositionTween.IsSetCopyOfThePanelShow && !inDungeon; if (recordPositionBool)//显示功能入口 m_MainPositionTween.Switch(new MainPositionTween.SwitchParam() { if (judge1 || judge2) { SetTipPanelOrBossList(true, true); } m_MailObj.SetActive(false); _MarkRay.gameObject.SetActive(true); m_MainPositionTween.SetSkillTipOrRightTipPosTween(false); m_MainPositionTween.SetRotation(true); showDefault = !MainPositionTween.isDefaultState, immediately = false } else//显示默认 { if (judge1) { SetTipPanelOrBossList(false, true); } if (judge2) { SetTipPanelOrBossList(true, true); } m_MailObj.SetActive(true); _MarkRay.gameObject.SetActive(false); m_MainPositionTween.SetSkillTipOrRightTipPosTween(true); m_MainPositionTween.SetRotation(false); } recordPositionBool = !recordPositionBool; ); } // 前期战斗用强制设置任务位置逻辑 @@ -631,7 +509,7 @@ onMainModel.IsBossAreaTask = false; } ShowBtnGroup();//显示按钮组隐藏技能组(强制切换) m_MainPositionTween.Switch(new MainPositionTween.SwitchParam() { showDefault = true, immediately = false }); m_HighSettingFadeInFadeOut.SwitchImmedidately(true); } } @@ -640,10 +518,12 @@ { if (AchievementGoto.achievementType == AchievementGoto.ExcuteSkill) { if (m_MainPositionTween.IsRightTipPanelShow)//技能面板收起状态 m_MainPositionTween.Switch(new MainPositionTween.SwitchParam() { ShowCastSkill();//显示技能组隐藏按钮组(强制切换) } showDefault = true, immediately = true }); var _cfg = SuccessConfig.Get(AchievementGoto.guideAchievementId); var _skillId = SkillConfig.FindSkillByJob(_cfg.Condition, PlayerDatas.Instance.baseData.Job); if (_skillId != 0) @@ -684,32 +564,6 @@ } } public void IsShowButtonGroup() { if (m_MainPositionTween.IsRightTipPanelShow)//技能面板展示 { ShowBtnGroup();//显示按钮组隐藏技能组(强制切换) } } private void ShowBtnGroup()//显示按钮组,隐藏技能组(强制切换) { m_MainPositionTween.SetSkillTipOrRightTipPos(false); m_MailObj.SetActive(false); m_MainPositionTween.SetRotation(true); recordPositionBool = false; _MarkRay.gameObject.SetActive(true); } private void ShowCastSkill()//显示技能组,隐藏按钮组(强制切换) { m_MainPositionTween.SetSkillTipOrRightTipPos(true); m_MailObj.SetActive(true); m_MainPositionTween.SetRotation(false); recordPositionBool = true; _MarkRay.gameObject.SetActive(false); } private void IsShowTaskPanel()//是否显示任务面板 { var inDungeon = IsDungeon(); @@ -747,10 +601,8 @@ m_TaskSwithButton.gameObject.SetActive(false); m_InGamePusher.gameObject.SetActive(false); IsShowTaskPanel(); if (m_MainPositionTween.IsRightTipPanelShow)//技能面板收起状态 { ShowCastSkill();//显示技能组,隐藏按钮组(强制切换) } m_MailObj.SetActive(false); m_MainPositionTween.Switch(new MainPositionTween.SwitchParam() { showDefault = true, immediately = true }); } else { @@ -762,6 +614,7 @@ m_FunctionForecastTip.gameObject.SetActive(true); m_TaskSwithButton.gameObject.SetActive(true); m_InGamePusher.gameObject.SetActive(true); m_MailObj.SetActive(true); if (WindowCenter.Instance.IsOpen<FightingPKWin>()) { WindowCenter.Instance.Close<FightingPKWin>(); @@ -769,50 +622,5 @@ } } private void SetTipPanelOrBossList(bool _bool, bool _isTween)//顶层按钮组和boss列表的相互切换 { var inDungeon = IsDungeon(); m_BossBriefInfos.Unfold(false); if (_bool) { if (IsCopyOfThePanel != null) { IsCopyOfThePanel(true); } if (Event_Duplicates != null && inDungeon) { Event_Duplicates(true, m_MainPositionTween.rightTopSwitchTime); } onMainModel.MainTopPanelShow = true; if (_isTween) { m_MainPositionTween.SetTipAndBossTweenPos(true); } else { m_MainPositionTween.SetTipAndBossPos(true); } } else { if (IsCopyOfThePanel != null) { IsCopyOfThePanel(false); } if (Event_Duplicates != null && inDungeon) { Event_Duplicates(false, m_MainPositionTween.rightTopSwitchTime); } onMainModel.MainTopPanelShow = false; if (_isTween) { m_MainPositionTween.SetTipAndBossTweenPos(false); } else { m_MainPositionTween.SetTipAndBossPos(false); } } } } } System/MainInterfacePanel/MainPositionTween.cs
@@ -6,6 +6,7 @@ using System.Collections; using UnityEngine.UI; using DG.Tweening; using System; namespace Snxxz.UI { @@ -28,7 +29,7 @@ [SerializeField] Transform m_ContainerSkill;//技能面板 [SerializeField] Transform m_SkillPosition1; [SerializeField] Transform m_SkillPosition2; [SerializeField] AnimationFadeOut m_AnimationFadeOut;//右下角按钮组 [SerializeField] RightBottomFadeInOut m_FunctionFadeInOut;//右下角按钮组 [Header("主界面任务模块")] public float leftMiddleSwitchTime = 0.5f;//任务面板移动的速度 @@ -38,126 +39,32 @@ [SerializeField] GameObject m_LeftImage; [SerializeField] GameObject m_RightImg; public bool IsSetCopyOfThePanelShow { get { return (m_RightTopFunction.localPosition - m_RightTopPosition1.localPosition).sqrMagnitude < (2.5 * 2.5); } } [SerializeField] ClickScreenOtherSpace m_RayMask;//便捷切换按钮 void SetRightTopWidgetPosition(bool _bool) { if (_bool) { m_RightTopFunction.localPosition = m_RightTopPosition1.localPosition; } else { m_RightTopFunction.localPosition = m_RightTopPosition2.localPosition; } } void SetRightTopWidgetPositionTween(bool _bool) { if (_bool) { m_RightTopFunction.DOLocalMoveY(m_RightTopPosition1.localPosition.y, rightTopSwitchTime); } else { m_RightTopFunction.DOLocalMoveY(m_RightTopPosition2.localPosition.y, rightTopSwitchTime); } } void SetBossListPos(bool _bool) { if (_bool) { m_ContainerBossList.localPosition = m_RightTopPosition1.localPosition; } else { m_ContainerBossList.localPosition = m_RightTopPosition2.localPosition; } } void SetBossListTweenPos(bool _bool) { if (_bool) { m_ContainerBossList.DOLocalMoveY(m_RightTopPosition1.localPosition.y, rightTopSwitchTime); } else { m_ContainerBossList.DOLocalMoveY(m_RightTopPosition2.localPosition.y, rightTopSwitchTime); } } public void SetTipAndBossPos(bool _bool) { if (_bool) { SetRightTopWidgetPosition(true); SetBossListPos(false); } else { SetRightTopWidgetPosition(false); SetBossListPos(true); } } public void SetTipAndBossTweenPos(bool _bool) { if (_bool) { SetRightTopWidgetPositionTween(true); SetBossListTweenPos(false); } else { SetRightTopWidgetPositionTween(false); SetBossListTweenPos(true); } } public bool IsRightTipPanelShow { get { return (m_ContainerSkill.localPosition - m_SkillPosition1.localPosition).sqrMagnitude < 1; } } public void SetSkillTipOrRightTipPos(bool _bool) { if (_bool) { m_AnimationFadeOut.FadeAtOnce(); m_ContainerSkill.localPosition = m_SkillPosition1.localPosition; } else { m_AnimationFadeOut.ImmediatelyAppear(); m_ContainerSkill.localPosition = m_SkillPosition2.localPosition; } } public void SetSkillTipOrRightTipPosTween(bool _bool) { if (_bool) { m_AnimationFadeOut.FadeOut(); m_ContainerSkill.DOLocalMoveX(m_SkillPosition1.localPosition.x, rightBottomSwitchTime); } else { m_AnimationFadeOut.FadeIn(); m_ContainerSkill.DOLocalMoveX(m_SkillPosition2.localPosition.x, rightBottomSwitchTime); } } TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } } public bool IsTaskAndPanelShow { get { return (m_ContainerLeftMiddle.localPosition - m_LeftMiddlePosition1.localPosition).sqrMagnitude < 3 * 3; } } void Start() { m_RayMask.AddListener(MarkRayButton); } void LateUpdate() { if (resetToDefaultTimer > 0f) { resetToDefaultTimer -= Time.deltaTime; if (resetToDefaultTimer <= 0f) { Switch(new SwitchParam() { showDefault = true, immediately = false }); } } } public void SetTaskPos(bool _bool) @@ -198,7 +105,149 @@ { m_ImageRotation.DOLocalRotate(Vector3.zero, rightBottomSwitchTime); } } public static RightTopState rightTopState { get; private set; } public static RightBottomState rightBottomState { get; private set; } public static bool isDefaultState { get; private set; } public static event Action<bool> switchFunctionStateEvent; float resetToDefaultTimer = 0; public void Switch(SwitchParam switchParams) { ProcessSwitch(switchParams); } private void ProcessSwitch(SwitchParam switchParams) { var mapId = PlayerDatas.Instance.baseData.MapID; var isDungeon = MapUtility.IsDungeon(mapId); var isNeutralMap = false; var isBossArea = PlayerDatas.Instance.hero != null && MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss); var isGuiding = NewBieCenter.Instance.inGuiding; if (GeneralDefine.neutralBossMaps.Contains(mapId)) { isNeutralMap = true; } m_ContainerBossList.gameObject.SetActive(isNeutralMap); rightTopState = RightTopState.Function; if ((isDungeon || isNeutralMap || isBossArea) && !isGuiding && switchParams.showDefault) { rightTopState = RightTopState.Boss; } else { rightTopState = RightTopState.Function; } switch (rightTopState) { case RightTopState.Function: if (switchParams.immediately) { m_RightTopFunction.localPosition = m_RightTopPosition1.localPosition; m_ContainerBossList.localPosition = m_RightTopPosition2.localPosition; } else { m_RightTopFunction.DOLocalMoveY(m_RightTopPosition1.localPosition.y, rightTopSwitchTime); m_ContainerBossList.DOLocalMoveY(m_RightTopPosition2.localPosition.y, rightTopSwitchTime); } break; case RightTopState.Boss: if (switchParams.immediately) { m_ContainerBossList.localPosition = m_RightTopPosition1.localPosition; m_RightTopFunction.localPosition = m_RightTopPosition2.localPosition; } else { m_ContainerBossList.DOLocalMoveY(m_RightTopPosition1.localPosition.y, rightTopSwitchTime); m_RightTopFunction.DOLocalMoveY(m_RightTopPosition2.localPosition.y, rightTopSwitchTime); } break; } var rightBottomState = switchParams.showDefault && !isGuiding ? RightBottomState.Skill : RightBottomState.Function; switch (rightBottomState) { case RightBottomState.Function: if (switchParams.immediately) { m_FunctionFadeInOut.SwitchImmedidately(true); m_ContainerSkill.localPosition = m_SkillPosition2.localPosition; } else { m_FunctionFadeInOut.Switch(true); m_ContainerSkill.DOLocalMoveX(m_SkillPosition2.localPosition.x, rightBottomSwitchTime); } break; case RightBottomState.Skill: if (switchParams.immediately) { m_FunctionFadeInOut.SwitchImmedidately(false); m_ContainerSkill.localPosition = m_SkillPosition1.localPosition; } else { m_FunctionFadeInOut.Switch(false); m_ContainerSkill.DOLocalMoveX(m_SkillPosition1.localPosition.x, rightBottomSwitchTime); } break; } isDefaultState = rightBottomState == RightBottomState.Skill; resetToDefaultTimer = !isDefaultState ? 7f : 0f; m_RayMask.gameObject.SetActive(!isDefaultState); if (switchFunctionStateEvent != null) { switchFunctionStateEvent(switchParams.immediately); } } private void MarkRayButton() { if (NewBieCenter.Instance.inGuiding) { return; } if (treasureModel.treasureStageUpShow || treasureModel.newGotShowing) { return; } Switch(new SwitchParam() { immediately = false, showDefault = true, }); } public enum RightTopState { Function, Boss, } public enum RightBottomState { Function, Skill, } public struct SwitchParam { public bool showDefault; public bool immediately; } } } System/MainInterfacePanel/PlayerMainDate.cs
@@ -99,11 +99,6 @@ //-------用于记录在Boss区域任务条的显隐状态 public bool IsBossAreaTask = false; //----龙雀环技能飘动要的切换接口 public void FunctionButton()//直接开始功能按钮组 { WindowCenter.Instance.Get<MainInterfaceWin>().IsShowButtonGroup(); } // --用于任务仙玉不足购买飞鞋 public bool IsFlyShoseBool = false; public int FlyShoseTaskID = 0; System/MainInterfacePanel/SkillContainerResetTimer.cs
File was deleted System/MainInterfacePanel/TaskBoxBGMWin.cs
@@ -101,7 +101,6 @@ } } } MainInterfaceWin.IsOpenMaininterface += IsOpenMaininterface; } protected override void OnAfterOpen() @@ -121,7 +120,6 @@ protected override void OnAfterClose() { MainInterfaceWin.IsOpenMaininterface -= IsOpenMaininterface; } private void IsOpenMaininterface() @@ -329,28 +327,24 @@ protected override void LateUpdate() { // base.LateUpdate(); GetMainSelfMotionLaupdate(); if (!WindowCenter.Instance.IsOpen<TaskBoxBGMWin>()) { return; } GA_Hero _hero = PlayerDatas.Instance.hero; if (_hero == null) { return; } if (_hero.LockTarget == null) { return; } float _chkDistSqrt = MathUtility.DistanceSqrtXZ(_hero.Pos, _hero.LockTarget.Pos); if (_chkDistSqrt > Mathf.Pow(GeneralDefine.FarawayNpcDist, 2)) base.LateUpdate(); if (WindowCenter.Instance.IsOpen("MainInterfaceWin")) { WindowCenter.Instance.Close<TaskBoxBGMWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); } _hero.LockTarget = null; GetMainSelfMotionLaupdate(); var hero = PlayerDatas.Instance.hero; if (hero != null && hero.LockTarget != null) { var checkDistSqrt = MathUtility.DistanceSqrtXZ(hero.Pos, hero.LockTarget.Pos); if (checkDistSqrt > Mathf.Pow(GeneralDefine.FarawayNpcDist, 2)) { WindowCenter.Instance.Close<TaskBoxBGMWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); hero.LockTarget = null; } } } System/MainInterfacePanel/TopAnimationPlay.cs
File was deleted System/MainInterfacePanel/TopAnimationPlay.cs.meta
File was deleted System/MainInterfacePanel/UGUITypewriter.cs
File was deleted System/MainInterfacePanel/UGUITypewriter.cs.meta
File was deleted System/MainWin/HighSettingFadeInFadeOut.cs
File was renamed from System/MainInterfacePanel/HighSettingFadeInFadeOut.cs @@ -1,290 +1,290 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Wednesday, April 11, 2018 //-------------------------------------------------------- using System; using System.Collections.Generic; using UnityEngine; using System.Text; using Snxxz.UI; using UnityEngine.UI; namespace Snxxz.UI { public class HighSettingFadeInFadeOut : MonoBehaviour { [SerializeField] Button m_Switch;//切换按钮1 [SerializeField] Image m_ArrowOpen; [SerializeField] Image m_ArrowClose; [SerializeField] MainWinTopGrid[] m_GridGroup1; [SerializeField] MainWinTopGrid[] m_GridGroup2; State state = State.Closed; float closeTimer = 0f; TreasureFindHostModel hostModel { get { return ModelCenter.Instance.GetModel<TreasureFindHostModel>(); } } LimitedTimePackageItemClassModel limitedTimePackageItemModel { get { return ModelCenter.Instance.GetModel<LimitedTimePackageItemClassModel>(); } } ImpactRankModel impactRankModel { get { return ModelCenter.Instance.GetModel<ImpactRankModel>(); } } OpenServiceAchievementModel OpenServerModel { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } } void Start() { m_Switch.SetListener(() => { Switch(state == State.Closed); }); SwitchImmedidately(false); } public void Init() { RefreshGridsActiveState(); TimeUtility.OnServerOpenDayRefresh += OnStepServerDay; FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChange; hostModel.TreasureFindHostCompleteAct += TreasureFindHostCompleteAct; RedpointCenter.Instance.redpointValueChangeEvent += UpdateRedpoint; OpenServerActivityCenter.Instance.openServerActivityStateChange += OpenServerActivityStateChange; OperationTimeHepler.Instance.operationStartEvent += OperationStartEvent; OperationTimeHepler.Instance.operationEndEvent += OperationEndEvent; limitedTimePackageItemModel.UpdateLimitedTimePackageItem += UpdateLimitedTimePackageItem; impactRankModel.inImpactRankUpdate += InImpactRankUpdate; OpenServerModel.IsOpenEvent += IsOpenEvent; OpenServerModel.IsPreviewTimeUpdate += IsOpenEvent; OperationTimeHepler.Instance.operationAdvanceEvent += OperationAdvanceEvent; } public void UnInit() { FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChange; hostModel.TreasureFindHostCompleteAct -= TreasureFindHostCompleteAct; TimeUtility.OnServerOpenDayRefresh -= OnStepServerDay; OpenServerActivityCenter.Instance.openServerActivityStateChange -= OpenServerActivityStateChange; RedpointCenter.Instance.redpointValueChangeEvent -= UpdateRedpoint; OperationTimeHepler.Instance.operationStartEvent -= OperationStartEvent; OperationTimeHepler.Instance.operationEndEvent -= OperationEndEvent; limitedTimePackageItemModel.UpdateLimitedTimePackageItem -= UpdateLimitedTimePackageItem; impactRankModel.inImpactRankUpdate -= InImpactRankUpdate; OpenServerModel.IsOpenEvent -= IsOpenEvent; OpenServerModel.IsPreviewTimeUpdate -= IsOpenEvent; OperationTimeHepler.Instance.operationAdvanceEvent -= OperationAdvanceEvent; } void Switch(bool active) { var index = 0; foreach (var grid in m_GridGroup1) { if (!grid.alwayShow) { grid.Switch(active, 0); } if (grid.gameObject.activeInHierarchy) { index++; } } index = 0; foreach (var grid in m_GridGroup2) { if (!grid.alwayShow) { grid.Switch(active, (index / 7) + 1); } if (grid.gameObject.activeInHierarchy) { index++; } } state = active ? State.Opened : State.Closed; DisplayArrow(state); if (state == State.Opened) { closeTimer = GeneralDefine.mainWinTopCloseTime; } } public void SwitchImmedidately(bool active) { foreach (var grid in m_GridGroup1) { if (!grid.alwayShow) { grid.SwitchImmediately(active, 0); } } var index = 0; foreach (var grid in m_GridGroup2) { if (!grid.alwayShow) { grid.SwitchImmediately(active, (index / 7) + 1); } if (grid.gameObject.activeInHierarchy) { index++; } } state = active ? State.Opened : State.Closed; DisplayArrow(state); if (state == State.Opened) { closeTimer = GeneralDefine.mainWinTopCloseTime; } } private void OperationAdvanceEvent(Operation obj) { RefreshGridsActiveState(); } private void IsOpenEvent() { RefreshGridsActiveState(); } private void InImpactRankUpdate() { RefreshGridsActiveState(); } private void UpdateLimitedTimePackageItem() { RefreshGridsActiveState(); } private void OperationEndEvent(Operation arg1, int arg2) { RefreshGridsActiveState(); } private void OperationStartEvent(Operation arg1, int arg2) { RefreshGridsActiveState(); } private void UpdateRedpoint(int redPointID) { if (redPointID == 201 || redPointID == 210) { RefreshGridsActiveState(); } } private void OpenServerActivityStateChange() { RefreshGridsActiveState(); } private void OnStepServerDay()//开服活动 { var days = ModelCenter.Instance.GetModel<ImpactRankModel>().openServerActivityDays; if (TimeUtility.OpenDay >= days) { RefreshGridsActiveState(); } } private void TreasureFindHostCompleteAct()//仙宝寻主 { RefreshGridsActiveState(); } private void OnFuncStateChange(int obj) { RefreshGridsActiveState(); } private void RefreshGridsActiveState() { foreach (var grid in m_GridGroup1) { var active = grid.IsOpen(); if (active && !grid.gameObject.activeSelf) { grid.gameObject.SetActive(true); } if (!active && grid.gameObject.activeSelf) { grid.gameObject.SetActive(false); } } foreach (var grid in m_GridGroup2) { var active = grid.IsOpen(); if (active && !grid.gameObject.activeSelf) { grid.gameObject.SetActive(true); } if (!active && grid.gameObject.activeSelf) { grid.gameObject.SetActive(false); } } m_Switch.gameObject.SetActive(IsShowButton()); } bool IsShowButton() { foreach (var grid in m_GridGroup1) { if (!grid.alwayShow && grid.gameObject.activeSelf) { return true; } } foreach (var grid in m_GridGroup2) { if (!grid.alwayShow && grid.gameObject.activeSelf) { return true; } } return false; } private void LateUpdate() { if (!NewBieCenter.Instance.inGuiding) { if (state == State.Opened) { closeTimer -= Time.deltaTime; if (closeTimer <= 0f) { Switch(false); } } } } private void DisplayArrow(State state) { m_ArrowOpen.gameObject.SetActive(state == State.Opened); m_ArrowClose.gameObject.SetActive(state == State.Closed); } public enum State { Opened, Closed, } } } //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Wednesday, April 11, 2018 //-------------------------------------------------------- using System; using System.Collections.Generic; using UnityEngine; using System.Text; using Snxxz.UI; using UnityEngine.UI; namespace Snxxz.UI { public class HighSettingFadeInFadeOut : MonoBehaviour { [SerializeField] Button m_Switch;//切换按钮1 [SerializeField] Image m_ArrowOpen; [SerializeField] Image m_ArrowClose; [SerializeField] MainWinTopGrid[] m_GridGroup1; [SerializeField] MainWinTopGrid[] m_GridGroup2; State state = State.Closed; float closeTimer = 0f; TreasureFindHostModel hostModel { get { return ModelCenter.Instance.GetModel<TreasureFindHostModel>(); } } LimitedTimePackageItemClassModel limitedTimePackageItemModel { get { return ModelCenter.Instance.GetModel<LimitedTimePackageItemClassModel>(); } } ImpactRankModel impactRankModel { get { return ModelCenter.Instance.GetModel<ImpactRankModel>(); } } OpenServiceAchievementModel OpenServerModel { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } } void Start() { m_Switch.SetListener(() => { Switch(state == State.Closed); }); SwitchImmedidately(false); } public void Init() { RefreshGridsActiveState(); TimeUtility.OnServerOpenDayRefresh += OnStepServerDay; FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChange; hostModel.TreasureFindHostCompleteAct += TreasureFindHostCompleteAct; RedpointCenter.Instance.redpointValueChangeEvent += UpdateRedpoint; OpenServerActivityCenter.Instance.openServerActivityStateChange += OpenServerActivityStateChange; OperationTimeHepler.Instance.operationStartEvent += OperationStartEvent; OperationTimeHepler.Instance.operationEndEvent += OperationEndEvent; limitedTimePackageItemModel.UpdateLimitedTimePackageItem += UpdateLimitedTimePackageItem; impactRankModel.inImpactRankUpdate += InImpactRankUpdate; OpenServerModel.IsOpenEvent += IsOpenEvent; OpenServerModel.IsPreviewTimeUpdate += IsOpenEvent; OperationTimeHepler.Instance.operationAdvanceEvent += OperationAdvanceEvent; } public void UnInit() { FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChange; hostModel.TreasureFindHostCompleteAct -= TreasureFindHostCompleteAct; TimeUtility.OnServerOpenDayRefresh -= OnStepServerDay; OpenServerActivityCenter.Instance.openServerActivityStateChange -= OpenServerActivityStateChange; RedpointCenter.Instance.redpointValueChangeEvent -= UpdateRedpoint; OperationTimeHepler.Instance.operationStartEvent -= OperationStartEvent; OperationTimeHepler.Instance.operationEndEvent -= OperationEndEvent; limitedTimePackageItemModel.UpdateLimitedTimePackageItem -= UpdateLimitedTimePackageItem; impactRankModel.inImpactRankUpdate -= InImpactRankUpdate; OpenServerModel.IsOpenEvent -= IsOpenEvent; OpenServerModel.IsPreviewTimeUpdate -= IsOpenEvent; OperationTimeHepler.Instance.operationAdvanceEvent -= OperationAdvanceEvent; } void Switch(bool active) { var index = 0; foreach (var grid in m_GridGroup1) { if (!grid.alwayShow) { grid.Switch(active, 0); } if (grid.gameObject.activeInHierarchy) { index++; } } index = 0; foreach (var grid in m_GridGroup2) { if (!grid.alwayShow) { grid.Switch(active, (index / 7) + 1); } if (grid.gameObject.activeInHierarchy) { index++; } } state = active ? State.Opened : State.Closed; DisplayArrow(state); if (state == State.Opened) { closeTimer = GeneralDefine.mainWinTopCloseTime; } } public void SwitchImmedidately(bool active) { foreach (var grid in m_GridGroup1) { if (!grid.alwayShow) { grid.SwitchImmediately(active, 0); } } var index = 0; foreach (var grid in m_GridGroup2) { if (!grid.alwayShow) { grid.SwitchImmediately(active, (index / 7) + 1); } if (grid.gameObject.activeInHierarchy) { index++; } } state = active ? State.Opened : State.Closed; DisplayArrow(state); if (state == State.Opened) { closeTimer = GeneralDefine.mainWinTopCloseTime; } } private void OperationAdvanceEvent(Operation obj) { RefreshGridsActiveState(); } private void IsOpenEvent() { RefreshGridsActiveState(); } private void InImpactRankUpdate() { RefreshGridsActiveState(); } private void UpdateLimitedTimePackageItem() { RefreshGridsActiveState(); } private void OperationEndEvent(Operation arg1, int arg2) { RefreshGridsActiveState(); } private void OperationStartEvent(Operation arg1, int arg2) { RefreshGridsActiveState(); } private void UpdateRedpoint(int redPointID) { if (redPointID == 201 || redPointID == 210) { RefreshGridsActiveState(); } } private void OpenServerActivityStateChange() { RefreshGridsActiveState(); } private void OnStepServerDay()//开服活动 { var days = ModelCenter.Instance.GetModel<ImpactRankModel>().openServerActivityDays; if (TimeUtility.OpenDay >= days) { RefreshGridsActiveState(); } } private void TreasureFindHostCompleteAct()//仙宝寻主 { RefreshGridsActiveState(); } private void OnFuncStateChange(int obj) { RefreshGridsActiveState(); } private void RefreshGridsActiveState() { foreach (var grid in m_GridGroup1) { var active = grid.IsOpen(); if (active && !grid.gameObject.activeSelf) { grid.gameObject.SetActive(true); } if (!active && grid.gameObject.activeSelf) { grid.gameObject.SetActive(false); } } foreach (var grid in m_GridGroup2) { var active = grid.IsOpen(); if (active && !grid.gameObject.activeSelf) { grid.gameObject.SetActive(true); } if (!active && grid.gameObject.activeSelf) { grid.gameObject.SetActive(false); } } m_Switch.gameObject.SetActive(IsShowButton()); } bool IsShowButton() { foreach (var grid in m_GridGroup1) { if (!grid.alwayShow && grid.gameObject.activeSelf) { return true; } } foreach (var grid in m_GridGroup2) { if (!grid.alwayShow && grid.gameObject.activeSelf) { return true; } } return false; } private void LateUpdate() { if (!NewBieCenter.Instance.inGuiding) { if (state == State.Opened) { closeTimer -= Time.deltaTime; if (closeTimer <= 0f) { Switch(false); } } } } private void DisplayArrow(State state) { m_ArrowOpen.gameObject.SetActive(state == State.Opened); m_ArrowClose.gameObject.SetActive(state == State.Closed); } public enum State { Opened, Closed, } } } System/MainWin/HighSettingFadeInFadeOut.cs.meta
System/MainWin/MainWinRightBottomGrid.cs
New file @@ -0,0 +1,65 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Thursday, March 28, 2019 //-------------------------------------------------------- using UnityEngine; using System.Collections; using UnityEngine.UI; using DG.Tweening; namespace Snxxz.UI { public class MainWinRightBottomGrid : MonoBehaviour { [SerializeField] int m_FunctionId; [SerializeField] RectTransform m_Content; [SerializeField] CanvasGroup m_CanvasGroup; float targetX = 0f; float targetAlpha = 0f; public void Switch(bool active, int offset) { targetX = active ? 0 : 120f + offset * 85f; targetAlpha = active ? 1f : 0f; if (active) { m_Content.DOLocalMoveX(targetX, 0.5f).SetDelay(offset * 0.1f).SetEase(Ease.OutSine); } else { m_Content.DOLocalMoveX(targetX, 0.5f).SetDelay(offset * 0.1f).SetEase(Ease.InSine); } m_CanvasGroup.DOFade(targetAlpha, 0.5f).SetDelay(offset * 0.1f).SetEase(active ? Ease.OutSine : Ease.InSine); m_CanvasGroup.blocksRaycasts = active; } public void SwitchImmediately(bool active, int offset) { targetX = active ? 0 : 120f + offset * 85f; targetAlpha = active ? 1f : 0f; m_Content.anchoredPosition = m_Content.anchoredPosition.SetX(targetX); m_CanvasGroup.alpha = targetAlpha; m_CanvasGroup.blocksRaycasts = active; } public bool IsOpen() { if (m_FunctionId > 0) { return FuncOpen.Instance.IsFuncOpen(m_FunctionId); } return true; } } } System/MainWin/MainWinRightBottomGrid.cs.metacopy from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta copy to System/MainWin/MainWinRightBottomGrid.cs.meta
File was copied from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: cacea0d413c9c3d4baee55316ebd32d0 timeCreated: 1528968656 guid: ab1b3e0a09c06cc4284db7a143bb7a73 timeCreated: 1553777994 licenseType: Pro MonoImporter: serializedVersion: 2 System/MainWin/MainWinTopGrid.cs
System/MainWin/MainWinTopGrid.cs.meta
System/MainWin/RightBottomFadeInOut.cs
New file @@ -0,0 +1,88 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Tuesday, April 10, 2018 //-------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Text.RegularExpressions; using System.Text; using Snxxz.UI; using UnityEngine.UI; namespace Snxxz.UI { public class RightBottomFadeInOut : MonoBehaviour { [SerializeField] MainWinRightBottomGrid[] m_Grids; public void Init() { RefreshGridsActiveState(); FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChange; } public void UnInit() { FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChange; } public void Switch(bool show) { var index = 0; foreach (var grid in m_Grids) { grid.Switch(show, (index / 4) + 1); if (grid.gameObject.activeInHierarchy) { index++; } } } public void SwitchImmedidately(bool show) { var index = 0; foreach (var grid in m_Grids) { grid.SwitchImmediately(show, (index / 4) + 1); if (grid.gameObject.activeInHierarchy) { index++; } } } private void OnFuncStateChange(int functionId) { RefreshGridsActiveState(); } private void RefreshGridsActiveState() { foreach (var grid in m_Grids) { var active = grid.IsOpen(); if (active && !grid.gameObject.activeSelf) { grid.gameObject.SetActive(true); } if (!active && grid.gameObject.activeSelf) { grid.gameObject.SetActive(false); } } } } } System/MainWin/RightBottomFadeInOut.cs.metacopy from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta copy to System/MainWin/RightBottomFadeInOut.cs.meta
File was copied from System/MainInterfacePanel/SkillContainerResetTimer.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: cacea0d413c9c3d4baee55316ebd32d0 timeCreated: 1528968656 guid: c34a89a2749b2e74b8a92bcfc892cea4 timeCreated: 1555586569 licenseType: Pro MonoImporter: serializedVersion: 2 System/Store/StoreModel.cs
@@ -64,7 +64,8 @@ showCoinsUIDict = ConfigParse.GetDic<int, int>(mallCurrency.Numerical1); FuncConfigConfig mallPush = FuncConfigConfig.Get("MallPush"); storeTrailerLv = int.Parse(mallPush.Numerical1); MainInterfaceWin.IsCopyOfThePanel += OnMoveTopPart; MainPositionTween.switchFunctionStateEvent += OnMoveTopPart; } public void OnBeforePlayerDataInitialize() @@ -128,7 +129,7 @@ public override void UnInit() { MainInterfaceWin.IsCopyOfThePanel -= OnMoveTopPart; MainPositionTween.switchFunctionStateEvent -= OnMoveTopPart; } public void RefreshMysteryShop() @@ -1588,11 +1589,11 @@ } } private void OnMoveTopPart(bool isMove) private void OnMoveTopPart(bool immedidately) { if (!isLogin) { SetPushPetAndMountWinState(!isMove); SetPushPetAndMountWinState(!MainPositionTween.isDefaultState); } } @@ -1657,7 +1658,7 @@ || NewBieCenter.Instance.inGuiding || WindowCenter.Instance.IsOpen<FirstTimeRechargeWin>() || currentPushId == 0 || !ModelCenter.Instance.GetModel<PlayerMainDate>().MainTopPanelShow) || MainPositionTween.rightTopState != MainPositionTween.RightTopState.Function) { isShow = false; } System/Vip/FirstTimeRechargeWin.cs
@@ -68,48 +68,21 @@ m_Image.SetActive(true); } MainInterfaceWin.IsCopyOfThePanel += IsCopyOfThePanel; MainPositionTween.switchFunctionStateEvent += OnMainWinFunctionSwitch; FirstTimeRechargeModel.FirstTimeRechargeTiime += FirstTimeRechargeTiime; FirstTimeRechargeModel.FirstTimeRecharEffect += FirstTimeRecharEffect; var inDungeon = IsDungeon(); if (LocalSave.GetBool("FirstTimeRechargeBool") && !inDungeon && onMainModel.MainTopPanelShow) { m_RewardInformationImage.SetActive(true); } else { UI3DModelExhibition.Instance.StopShow(); m_RewardInformationImage.SetActive(false); } if (FirstGoldMobsDic.ContainsKey(PlayerDatas.Instance.baseData.Job) ) { ItemConfig itemConfig = ItemConfig.Get(FirstGoldMobsDic[PlayerDatas.Instance.baseData.Job]); if (PlayerDatas.Instance.baseData.Job == 1) { m_RawImageBoy.gameObject.SetActive(true); m_RawImageGirl.gameObject.SetActive(false); UI3DModelExhibition.Instance.ShowEquipment(itemConfig.ChangeOrd, Vec3, m_RawImageBoy); } else { m_RawImageBoy.gameObject.SetActive(false); m_RawImageGirl.gameObject.SetActive(true); UI3DModelExhibition.Instance.ShowEquipment(itemConfig.ChangeOrd, Vec3, m_RawImageGirl); } } m_GOTO.text =Language.Get("ClickToFirstCharge_Z"); m_GOTO.text = Language.Get("ClickToFirstCharge_Z"); } protected override void OnAfterOpen() { DisplayModel(); } protected override void OnPreClose() { UI3DModelExhibition.Instance.StopShow(); MainInterfaceWin.IsCopyOfThePanel -= IsCopyOfThePanel; MainPositionTween.switchFunctionStateEvent -= OnMainWinFunctionSwitch; FirstTimeRechargeModel.FirstTimeRechargeTiime -= FirstTimeRechargeTiime; FirstTimeRechargeModel.FirstTimeRecharEffect -= FirstTimeRecharEffect; } @@ -130,10 +103,14 @@ } } private void IsCopyOfThePanel(bool obj) private void OnMainWinFunctionSwitch(bool obj) { var inDungeon = IsDungeon(); if (LocalSave.GetBool("FirstTimeRechargeBool") && obj && !inDungeon) DisplayModel(); } private void DisplayModel() { if (LocalSave.GetBool("FirstTimeRechargeBool") && MainPositionTween.rightTopState == MainPositionTween.RightTopState.Function) { m_RewardInformationImage.SetActive(true); if (FirstGoldMobsDic.ContainsKey(PlayerDatas.Instance.baseData.Job)) @@ -151,7 +128,6 @@ m_RawImageGirl.gameObject.SetActive(true); UI3DModelExhibition.Instance.ShowEquipment(itemConfig.ChangeOrd, Vec3, m_RawImageGirl); } } else {