美术资源替换
This commit is contained in:
@@ -4,7 +4,6 @@ using AibisDream.Utility;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using Yarn;
|
||||
|
||||
namespace AibisDream.FixSystem
|
||||
{
|
||||
@@ -16,8 +15,7 @@ namespace AibisDream.FixSystem
|
||||
#region 插头当前信息
|
||||
|
||||
private Vector3 _startPos;
|
||||
|
||||
private Vector3 _RetractedPos;
|
||||
|
||||
private readonly Vector3 _pickupOffset = new(0, 0, 0);
|
||||
private readonly Quaternion _pickupRotationOffset = Quaternion.Euler(0, 0, 30);
|
||||
private readonly Quaternion _initRotation = Quaternion.Euler(0, 0, 180);
|
||||
@@ -40,7 +38,6 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
InitComponentRef();
|
||||
EventRegister();
|
||||
_RetractedPos = transform.position;
|
||||
_startPos = new Vector3(transform.position.x + 0.3f, transform.position.y - 2f,
|
||||
transform.position.z); // 初始化时记录初始位置
|
||||
}
|
||||
@@ -134,13 +131,11 @@ namespace AibisDream.FixSystem
|
||||
|
||||
private void OnPointerDown(BaseEventData eventData)
|
||||
{
|
||||
Debug.Log($"OnPointerDown - IsPlugAvailable: {_cableSystem.IsPlugAvailable()}, isDragging: {_isDragging}");
|
||||
GetComponent<SpriteRenderer>().sortingLayerName = "Tools";
|
||||
GetComponent<SpriteRenderer>().sortingOrder = 48;
|
||||
// 系统被锁定就返回
|
||||
if (!_cableSystem.IsPlugAvailable()) return;
|
||||
|
||||
|
||||
|
||||
// 首次拖拽后关闭高亮
|
||||
if (GlobalVariableKit.IsPlugHighLight)
|
||||
{
|
||||
@@ -162,6 +157,9 @@ namespace AibisDream.FixSystem
|
||||
_cableSystem.PhysicCableRef.GetComponent<LineRenderer>().enabled = false;
|
||||
_isPhysicCableActive = false;
|
||||
_cableSystem.CableRef.ShowCable();
|
||||
|
||||
// 打开所有模块
|
||||
FixSystemCenter.SystemDic.Get<BodyModuleSystem>().OpenModuleSlots();
|
||||
}
|
||||
|
||||
private void OnPointerUp(BaseEventData eventData)
|
||||
@@ -174,11 +172,13 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
// 找到了就插入目标Module
|
||||
InsertSocket(targetModule);
|
||||
FixSystemCenter.SystemDic.Get<BodyModuleSystem>().CloseModuleSlots(targetModule);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 没找到就回到初始位置
|
||||
ReturnToStartPosition();
|
||||
FixSystemCenter.SystemDic.Get<BodyModuleSystem>().CloseModuleSlots(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,9 +223,6 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
_cableSystem.PhysicCableRef.physicLine.UpdatePlug(transform);
|
||||
}
|
||||
// 如果未锁定,就一直查询是否靠近最近的插孔
|
||||
if (!_cableSystem.IsPlugAvailable()) return;
|
||||
_cableSystem.TryFindClosestModule(transform.position, out _);
|
||||
}
|
||||
|
||||
void OnDrawGizmosSelected()
|
||||
|
||||
Reference in New Issue
Block a user