可配置模块

This commit is contained in:
2024-11-30 08:04:03 +08:00
parent d95d117c08
commit 71ec5da49a
45 changed files with 3249 additions and 1262 deletions
+5 -17
View File
@@ -1,5 +1,4 @@
using System;
using UnityEngine;
using UnityEngine;
using UnityEngine.Events;
using Yarn.Unity;
@@ -12,7 +11,7 @@ namespace AibisDream.FixSystem
public Plug PlugRef { get; private set; }
public Cable CableRef { get; private set; }
public Transform CableRootPos { get; private set; }
public Socket InitSocket { get; private set; }
public ISocket InitSocket { get; private set; }
public BodyModuleSystem BodyModuleSystem { get; private set; }
@@ -23,21 +22,10 @@ namespace AibisDream.FixSystem
public bool isInDialog = false;
public bool isActive = true;
[HideInInspector] public Socket curSocket;
[HideInInspector] public ISocket curSocket;
[HideInInspector] public BodyModule curBodyModule;
#endregion
#region
public UnityEvent<Socket> plugInEvent;
public UnityEvent<Socket> plugOutEvent;
public UnityEvent plugStartDrag;
public UnityEvent plugEndDrag;
#endregion
public Vector3 InitSocketPos => InitSocket.transform.position;
private void Awake()
{
@@ -66,7 +54,7 @@ namespace AibisDream.FixSystem
PlugRef = transform.Find("Plug").GetComponent<Plug>();
CableRef = transform.Find("Cable").GetComponent<Cable>();
CableRootPos = transform.Find("Cable Root Pos").transform;
InitSocket = transform.Find("Init Socket").GetComponent<Socket>();
InitSocket = transform.Find("Init Socket").GetComponent<ISocket>();
BodyModuleSystem = transform.parent.GetComponent<BodyModuleSystem>();
}