Merge branch 'main' of http://10.27.16.144:3000/kawagiri/TH1 into main
This commit is contained in:
commit
c7b7d6dd3d
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -203928,7 +203928,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1640084517
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -203948,9 +203948,9 @@ RectTransform:
|
||||
- {fileID: 563225261}
|
||||
m_Father: {fileID: 1350533160}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 400, y: -424.99997}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 500, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &1640501327
|
||||
|
||||
@ -3,6 +3,7 @@ using System.Net;
|
||||
using UnityEngine;
|
||||
using RuntimeData;
|
||||
using Logic.Action;
|
||||
using Logic.Config;
|
||||
using Logic.CrashSight;
|
||||
using TH1Renderer;
|
||||
using Unity.VisualScripting;
|
||||
@ -692,7 +693,7 @@ namespace Logic
|
||||
{
|
||||
|
||||
//处理游戏Hint的模块,仅针对玩家
|
||||
if (playerData.Id == mapData.PlayerMap.SelfPlayerId)
|
||||
if (playerData.Id == mapData.PlayerMap.SelfPlayerId && ConfigManager.Instance.Config.ShowReminder)
|
||||
{
|
||||
MapRenderer.Instance.HintManager.TurnStartSetHint(mapData,playerData);
|
||||
//如果不是第0回合,要显示回合开始提示
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using Animancer;
|
||||
using TH1Resource;
|
||||
using TMPro;
|
||||
@ -16,6 +17,8 @@ public class ToggleButtonController : MonoBehaviour
|
||||
public AnimationClip TurnOn;
|
||||
public AnimationClip TurnOff;
|
||||
private AnimancerComponent _anim;
|
||||
public Action On;
|
||||
public Action Off;
|
||||
|
||||
void Start()
|
||||
{
|
||||
@ -37,8 +40,11 @@ public class ToggleButtonController : MonoBehaviour
|
||||
GetComponent<Button>().onClick.AddListener(OnToggleClicked);
|
||||
}
|
||||
|
||||
public void Refresh()
|
||||
public void Refresh(bool isON,Action actOn,Action actOff)
|
||||
{
|
||||
_isOn = isON;
|
||||
On = actOn;
|
||||
Off = actOff;
|
||||
if (_anim != null)
|
||||
{
|
||||
//var state = _anim.Play(_isOn ? TurnOn : TurnOff);
|
||||
@ -54,7 +60,10 @@ public class ToggleButtonController : MonoBehaviour
|
||||
{
|
||||
// 1. 翻转状态
|
||||
_isOn = !_isOn;
|
||||
|
||||
if (_isOn)
|
||||
On.Invoke();
|
||||
else
|
||||
Off.Invoke();
|
||||
//2. 播放对应动画
|
||||
if(_anim != null)
|
||||
_anim.Play(_isOn ? TurnOn : TurnOff );
|
||||
|
||||
@ -3,6 +3,7 @@ using UnityEngine;
|
||||
using Logic;
|
||||
using RuntimeData;
|
||||
using Animancer;
|
||||
using Logic.Config;
|
||||
using UnityEngine.UI;
|
||||
using Logic.Multilingual;
|
||||
|
||||
@ -94,10 +95,13 @@ public class SettingUI
|
||||
_isAnimating = true;
|
||||
ROSettingUI.SetActive(true);
|
||||
|
||||
var toggleButtonController = ROSettingUI.transform.Find("SettingList/Row3/Head1/StyledToggle")?.GetComponent<ToggleButtonController>();
|
||||
var toggleButtonController = ROSettingUI.transform.Find("SettingList/Row3/Head1/StyledToggle")
|
||||
?.GetComponent<ToggleButtonController>();
|
||||
if (toggleButtonController != null)
|
||||
toggleButtonController.Refresh();
|
||||
|
||||
toggleButtonController.Refresh(ConfigManager.Instance.Config.ShowReminder,
|
||||
() => { ConfigManager.Instance.Config.ShowReminder = true;},
|
||||
() => { ConfigManager.Instance.Config.ShowReminder = false;});
|
||||
|
||||
AnimancerComponent animancer = ROSettingUI.GetComponent<AnimancerComponent>();
|
||||
AnimationClip fadeInClip = Resources.Load<AnimationClip>("Animations/UI/SettingPanelFadeIn");
|
||||
if (fadeInClip != null)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user