Merge branch 'main' into iOS_release
commit
10e10d01c2
|
@ -327,7 +327,7 @@ public class BuildBoot : MonoBehaviour
|
|||
? CurCondition
|
||||
: BuildManager.Instance.ReachCondition;
|
||||
|
||||
var nextLockNode = BuildManager.Instance.GetNextLockNode(CurCondition);
|
||||
var nextLockNode = BuildManager.Instance.GetNextLockNode();
|
||||
if (string.IsNullOrEmpty(nextLockNode))
|
||||
{
|
||||
foreach (var chooseNode in chooseNodeInfo)
|
||||
|
@ -429,7 +429,6 @@ public class BuildBoot : MonoBehaviour
|
|||
/// </summary>
|
||||
private void InitUI()
|
||||
{
|
||||
//选择时UI
|
||||
var otherRoot = GameObject.Find("OtherRoot").gameObject;
|
||||
_mask = otherRoot.transform.Find("Mask").gameObject;
|
||||
_pickItem = GameObject.Find("OtherRoot/PickItem").gameObject;
|
||||
|
@ -472,6 +471,7 @@ public class BuildBoot : MonoBehaviour
|
|||
private void CloseTipPanel()
|
||||
{
|
||||
_tipObj.SetActive(false);
|
||||
BuildManager.Instance.PlaySound();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -485,6 +485,7 @@ public class BuildBoot : MonoBehaviour
|
|||
GameStateManager.Instance.ChangeState(new LevelState(levelID));
|
||||
EventManager.Instance.Send(EventManager.EventName.EnterGame);
|
||||
}
|
||||
BuildManager.Instance.PlaySound();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -492,6 +493,7 @@ public class BuildBoot : MonoBehaviour
|
|||
/// </summary>
|
||||
private void CloseBar()
|
||||
{
|
||||
BuildManager.Instance.PlaySound();
|
||||
_isChanging = false;
|
||||
_buildBar.Close();
|
||||
_mask.SetActive(false);
|
||||
|
@ -513,6 +515,7 @@ public class BuildBoot : MonoBehaviour
|
|||
/// </summary>
|
||||
private void YesBar()
|
||||
{
|
||||
BuildManager.Instance.PlaySound();
|
||||
_isChanging = false;
|
||||
_mask.SetActive(false);
|
||||
_pickItem.SetActive(false);
|
||||
|
@ -566,7 +569,7 @@ public class BuildBoot : MonoBehaviour
|
|||
var optionObj = obj.transform.parent.gameObject;
|
||||
var nodeName = optionObj.transform.parent.name;
|
||||
var optionName = optionObj.name;
|
||||
|
||||
BuildManager.Instance.PlaySound();
|
||||
if (_nodes.TryGetValue(nodeName, out var node))
|
||||
{
|
||||
_curNode = node;
|
||||
|
@ -585,17 +588,6 @@ public class BuildBoot : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 描边展示
|
||||
/// </summary>
|
||||
private void OutlinePickItem(Option option)
|
||||
{
|
||||
_pickItem.SetActive(true);
|
||||
_pickItem.transform.position = option.OptionObj.transform.position;
|
||||
_pickSpriteRenderer.sprite =
|
||||
option.NormalObj.GetComponent<SpriteRenderer>().sprite;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 泡泡点击
|
||||
/// </summary>
|
||||
|
@ -608,7 +600,7 @@ public class BuildBoot : MonoBehaviour
|
|||
obj.SetActive(false);
|
||||
var nodeName = obj.transform.parent.name;
|
||||
EventManager.Instance.Send(EventManager.EventName.HideMainUI);
|
||||
|
||||
BuildManager.Instance.PlaySound();
|
||||
if (_nodes.TryGetValue(nodeName, out var node))
|
||||
{
|
||||
var condition = BuildManager.Instance.GetCondition(nodeName);
|
||||
|
@ -642,7 +634,7 @@ public class BuildBoot : MonoBehaviour
|
|||
}
|
||||
|
||||
_newOption = option;
|
||||
|
||||
BuildManager.Instance.PlaySound();
|
||||
OutlinePickItem(option);
|
||||
|
||||
//DebugUtil.LogError("点击了{0}节点的{1}选项", nodeName, option.OptionObj.name);
|
||||
|
@ -655,9 +647,29 @@ public class BuildBoot : MonoBehaviour
|
|||
{
|
||||
_mask.SetActive(true);
|
||||
_tipObj.SetActive(true);
|
||||
BuildManager.Instance.PlaySound();
|
||||
EventManager.Instance.Send(EventManager.EventName.OpenUI);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 描边展示
|
||||
/// </summary>
|
||||
private void OutlinePickItem(Option option)
|
||||
{
|
||||
_pickItem.SetActive(true);
|
||||
_pickItem.transform.position = option.OptionObj.transform.position;
|
||||
_pickSpriteRenderer.sprite =
|
||||
option.NormalObj.GetComponent<SpriteRenderer>().sprite;
|
||||
}
|
||||
|
||||
private void UpdateReachCondition()
|
||||
{
|
||||
//TODO 不同类型的条件
|
||||
CurCondition = LevelSelectManager.Instance.CurPassLevelIndex;
|
||||
|
||||
BuildManager.Instance.UpdateReachCondition(CurCondition);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void RegisterEvent()
|
||||
|
@ -666,6 +678,7 @@ public class BuildBoot : MonoBehaviour
|
|||
InputManager.Instance.OnBuildBubbleClick += OnBuildBubbleClick;
|
||||
EventManager.Instance.Register(EventManager.EventName.HideBuildUI, HideUI);
|
||||
EventManager.Instance.Register(EventManager.EventName.ShowBuildUI, ShowUI);
|
||||
EventManager.Instance.Register(EventManager.EventName.RefreshGameData, UpdateReachCondition);
|
||||
}
|
||||
|
||||
private void UnregisterClickEvent()
|
||||
|
@ -678,5 +691,6 @@ public class BuildBoot : MonoBehaviour
|
|||
|
||||
EventManager.Instance.Unregister(EventManager.EventName.HideBuildUI, HideUI);
|
||||
EventManager.Instance.Unregister(EventManager.EventName.ShowBuildUI, ShowUI);
|
||||
EventManager.Instance.Unregister(EventManager.EventName.RefreshGameData, UpdateReachCondition);
|
||||
}
|
||||
}
|
|
@ -189,6 +189,7 @@ namespace Framework.Manager
|
|||
//Build场景相机
|
||||
public Camera CurBuildCamera;
|
||||
|
||||
|
||||
private BuildData _curBuildData;
|
||||
private bool _isInit;
|
||||
private bool _isInGame;
|
||||
|
@ -205,6 +206,7 @@ namespace Framework.Manager
|
|||
InitCondition();
|
||||
await InitIcon();
|
||||
InitBlueprint();
|
||||
_isInGame = inGame;
|
||||
if (inGame)
|
||||
CurBuildCamera = CameraManager.Instance.UICamera;
|
||||
_isInit = true;
|
||||
|
@ -451,8 +453,10 @@ namespace Framework.Manager
|
|||
StorageManager.Instance.SaveWithoutUpdate();
|
||||
}
|
||||
|
||||
|
||||
public string GetNextLockNode(int condition)
|
||||
/// <summary>
|
||||
/// 获取下一个解锁节点
|
||||
/// </summary>
|
||||
public string GetNextLockNode()
|
||||
{
|
||||
string nodeName = null;
|
||||
|
||||
|
@ -475,9 +479,9 @@ namespace Framework.Manager
|
|||
}
|
||||
|
||||
var firstNode = NodeInfos
|
||||
.OrderBy(kv => kv.Value.Condition)
|
||||
.OrderBy(kv => kv.Value.Condition)
|
||||
.FirstOrDefault();
|
||||
|
||||
|
||||
return firstNode.Key;
|
||||
}
|
||||
//TODO 按主题解锁
|
||||
|
@ -499,12 +503,25 @@ namespace Framework.Manager
|
|||
_reachCondition = condition;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新本地节点选择
|
||||
/// </summary>
|
||||
public void SetBuildUserInfo(int guideGroupID)
|
||||
{
|
||||
_userBuildInfo.GuideGroup = guideGroupID;
|
||||
StorageManager.Instance.SyncForce = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 播放音效
|
||||
/// </summary>
|
||||
public void PlaySound()
|
||||
{
|
||||
if (_isInGame)
|
||||
AudioManager.Instance.PlaySound(AudioType.SOUND, "S_Btn",
|
||||
new UnityAudio(false));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Debug 清楚玩家所有选择
|
||||
/// </summary>
|
||||
|
|
|
@ -63,11 +63,12 @@ namespace Gameplay.LoadingExecutor
|
|||
}
|
||||
|
||||
//判断是否开启新手引导
|
||||
if (!GuideMananger.Instance.IsGuiding && buildInfo.GuideGroup <= 0)
|
||||
if (!GuideMananger.Instance.IsGuiding && buildInfo.GuideGroup <= 0 &&
|
||||
LevelSelectManager.Instance.CurPassLevelIndex < 1)
|
||||
{
|
||||
buildInfo.ChooseNodeInfo = new Dictionary<string, string>();
|
||||
GuideMananger.Instance.NeedGuide = true;
|
||||
DebugUtil.LogG("开启新手引导!");
|
||||
DebugUtil.LogG("需要开启新手引导!");
|
||||
}
|
||||
|
||||
var buildId = buildInfo.BuildData;
|
||||
|
|
|
@ -5,10 +5,10 @@ using Framework.BI;
|
|||
using UnityEngine.UI;
|
||||
using Gameplay.Login;
|
||||
using Framework.Event;
|
||||
using Gameplay.Manager;
|
||||
using Framework.Manager;
|
||||
using Framework.Constants;
|
||||
using Event = cfg.BI.Event;
|
||||
using System;
|
||||
|
||||
public class UILoginPanelController : UIWindow
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ public class UILoginPanelController : UIWindow
|
|||
#endif
|
||||
ChangeLanguage();
|
||||
}
|
||||
|
||||
|
||||
protected override void OnOpenWindow(object data)
|
||||
{
|
||||
BIManager.Instance.TrackEvent(Event.show_login);
|
||||
|
@ -121,11 +121,12 @@ public class UILoginPanelController : UIWindow
|
|||
}
|
||||
else if (!_needHideGfx)
|
||||
{
|
||||
GuideMananger.Instance.StartGroupGuide();
|
||||
if (LevelSelectManager.Instance.CurPassLevelIndex < 1)
|
||||
GuideMananger.Instance.StartGroupGuide();
|
||||
EventManager.Instance.Send(EventManager.EventName.ShowGfx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventManager.Instance.Unregister(EventManager.EventName.LoginFail, LoginFail);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Gameplay.Manager;
|
||||
using Framework.Event;
|
||||
using UnityEngine.UI;
|
||||
using Framework.BI;
|
||||
|
@ -31,7 +32,11 @@ public class UISyncTipController : UIWindow
|
|||
private void CloseUI()
|
||||
{
|
||||
CloseWindow(true);
|
||||
GuideMananger.Instance.StartGroupGuide();
|
||||
if (LevelSelectManager.Instance.CurPassLevelIndex < 1)
|
||||
{
|
||||
DebugUtil.LogG("开启新手引导!");
|
||||
GuideMananger.Instance.StartGroupGuide();
|
||||
}
|
||||
if (!_needHideGfx)
|
||||
EventManager.Instance.Send(EventManager.EventName.ShowGfx);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue