This commit is contained in:
2025-01-25 13:29:46 +08:00
parent b47b29f996
commit 5703efd59e
10 changed files with 392 additions and 67 deletions
+25 -5
View File
@@ -1,6 +1,7 @@
using AibisDream.Framework;
using AibisDream.Utility;
using DG.Tweening;
using MeadowGames.UINodeConnect4.GraphicRenderer;
using UnityEngine;
using UnityEngine.EventSystems;
@@ -52,7 +53,12 @@ namespace AibisDream.FixSystem
public void InitPlug(ISocket initSocket)
{
InsertSocket(initSocket);
//InsertSocket(initSocket);
}
public void InitPlug()
{
_cableSystem.PhysicCableRef.Init();
//_cableSystem.PhysicCableRef.physicLine.UpdatePlug(this.transform);
}
/// <summary>
@@ -143,12 +149,26 @@ namespace AibisDream.FixSystem
else
{
// 没找到就插回初始Socket,需要播动画
transform.DOMove(_cableSystem.InitSocket.GetSocketPos(), 0.1f).OnComplete(() =>
{
InsertSocket(_cableSystem.InitSocket);
});
// transform.DOMove(_cableSystem.InitSocket.GetSocketPos(), 0.1f).OnComplete(() =>
// {
// InsertSocket(_cableSystem.InitSocket);
// });
}
}
public void Update()
{
_cableSystem.PhysicCableRef.physicLine.UpdateEndPoint(this.transform.position);
// if(_cableSystem.curSocket!=null&&_isDragging==false)
// {
// _cableSystem.PhysicCableRef.physicLine.UpdatePlug(this.transform);
// }
// else
// {
// _cableSystem.PhysicCableRef.physicLine.UpdateLine(this.transform);
// }
}
private void AdjustPlugPos()
{