屏幕问题

This commit is contained in:
2026-01-28 16:20:19 +08:00
parent 7464cd8b6c
commit 7d7e2fcdf0
20 changed files with 771 additions and 479 deletions
@@ -2,12 +2,15 @@ using UnityEngine;
using AibisDream.UI;
using UnityEngine.UI;
using System;
using TMPro;
using UnityEngine.Events;
namespace AibisDream.FixSystem
{
public class BlockPuzzlePart : MonoBehaviour, IOperatorPanel
{
public UnityEvent OnSubmit => lockButton.onClick;
public UnityEvent OnPopUp => popUpButton.onClick;
private Animator _animator;
// ------------------------ 进度条 -------------------------
@@ -48,8 +51,6 @@ namespace AibisDream.FixSystem
public void OnDeviceRecycle(BlockShape blockShape)
{
// TODO: 播放回收动画
AddDeviceButton(blockShape.BlockShapeData.blockShapeInfo);
}
@@ -62,15 +63,13 @@ namespace AibisDream.FixSystem
private void AddDeviceButton(BlockShapeInfo blockShapeInfo)
{
var button = Instantiate(_deviceItemPrefab, _deviceButtonRoot);
var button = Instantiate(_deviceItemPrefab, _deviceButtonRoot).GetComponent<ShapeCreateButton>();
button.gameObject.name = blockShapeInfo.shapeName;
button.GetComponentInChildren<TMP_Text>().text = blockShapeInfo.shapeName;
button.GetComponentInChildren<Image>().sprite = blockShapeInfo.GetButtonImage();
button.GetComponent<Button>().onClick.AddListener(() => OnDeviceSelected?.Invoke(blockShapeInfo));
button.SetInfo(blockShapeInfo);
button.OnClicked.AddListener(() => OnDeviceSelected?.Invoke(blockShapeInfo));
}
private void RemoveDeviceButton(string shapeName)
public void RemoveDeviceButton(string shapeName)
{
var button = _deviceButtonRoot.Find(shapeName).gameObject;
Destroy(button);
@@ -80,15 +79,10 @@ namespace AibisDream.FixSystem
[Header("提交按钮")]
[SerializeField] private Button lockButton;
[SerializeField] private Button popUpButton;
public Button LockButton => lockButton;
// ------------------------- 模块出口 -------------------------
public void SetRecycleAvailable(bool isAvailable)
{
// TODO: 更新模块出口状态
}
public Button PopUpButton => popUpButton;
// ------------------------ 面板收放 -------------------------
public void Init()