新增剪刀操作支持,新增发热模式
This commit is contained in:
@@ -6,12 +6,14 @@ using UnityEngine.UI;
|
||||
|
||||
public class Module : MonoBehaviour, IPointerClickHandler
|
||||
{
|
||||
public RectTransform faceCanvas; // 需要移动和缩放的面板
|
||||
public Transform faceCanvas; // 需要移动和缩放的面板
|
||||
public Vector3 repairCanvasPosition; // 维修模式下的面板位置
|
||||
public Vector3 originalCanvasPosition; // 原始面板位置
|
||||
public float repairCanvasScale = 1.5f; // 维修模式下的面板缩放比例
|
||||
public float animationDuration = 0.5f; // 动画持续时间
|
||||
|
||||
public bool isallowedRepair = false; // 动画持续时间
|
||||
|
||||
public GameObject screwsContainer; // 螺丝的父对象
|
||||
public RectTransform targetArea; // 拖拽的目标区域,用于判定维修完成
|
||||
|
||||
@@ -19,13 +21,16 @@ public class Module : MonoBehaviour, IPointerClickHandler
|
||||
private bool canDrag = false;
|
||||
private Vector3 initialPosition;
|
||||
|
||||
public Graphic socketToEnable;
|
||||
|
||||
|
||||
public Socket socketToEnable;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
initialPosition = transform.position;
|
||||
originalCanvasPosition = faceCanvas.position;
|
||||
socketToEnable.raycastTarget=false;
|
||||
//socketToEnable.raycastTarget=false;
|
||||
socketToEnable.IsAvailable=false;
|
||||
EnableScrewsInteraction(false);
|
||||
}
|
||||
|
||||
@@ -60,7 +65,8 @@ public class Module : MonoBehaviour, IPointerClickHandler
|
||||
.SetEase(Ease.InQuad); // 恢复面板缩放
|
||||
ResetModulePosition();
|
||||
ToolManager.Instance.ShowToolBoxAfterTask();
|
||||
socketToEnable.raycastTarget=true;
|
||||
//socketToEnable.raycastTarget=true;
|
||||
socketToEnable.IsAvailable=true;
|
||||
}
|
||||
|
||||
private void EnableScrewsInteraction(bool isEnabled)
|
||||
|
||||
Reference in New Issue
Block a user