Merge branch 'develop' into 火山美术合入2.11
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -6,6 +6,7 @@ using AibisDream.Framework;
|
||||
using Cinemachine;
|
||||
using JetBrains.Annotations;
|
||||
using UnityEngine;
|
||||
using AibisDream.Kit;
|
||||
|
||||
namespace AibisDream.FixSystem
|
||||
{
|
||||
@@ -18,7 +19,6 @@ namespace AibisDream.FixSystem
|
||||
private GameObject _bodyModuleGroup;
|
||||
private GameObject _headModuleGroup;
|
||||
|
||||
public CableSystem CableSystem { get; private set; }
|
||||
[HideInInspector] public HeatMapController heatMapController;
|
||||
|
||||
#endregion
|
||||
@@ -28,7 +28,6 @@ namespace AibisDream.FixSystem
|
||||
private readonly ModuleSystemData _data = new();
|
||||
public bool inHotErr;
|
||||
private int _heatValue;
|
||||
public bool isAvailable;
|
||||
|
||||
private int HeatValue
|
||||
{
|
||||
@@ -62,7 +61,6 @@ namespace AibisDream.FixSystem
|
||||
// 处理内部索引
|
||||
_bodyModuleGroup = transform.Find("Body Module Group")?.gameObject;
|
||||
_headModuleGroup = transform.Find("Scalehandler")?.transform.Find("Head Module Group")?.gameObject;
|
||||
CableSystem = transform.Find("Cable System").GetComponent<CableSystem>();
|
||||
if (transform.Find("HeatMapController"))
|
||||
{
|
||||
heatMapController = transform.Find("HeatMapController").GetComponent<HeatMapController>();
|
||||
@@ -70,9 +68,10 @@ namespace AibisDream.FixSystem
|
||||
|
||||
FixSystemCenter.SystemDic.Register(this);
|
||||
|
||||
// 注册到维修系统管理器
|
||||
RepairSystemManager.Register(this);
|
||||
|
||||
// 注册Camera
|
||||
var virtualCam = transform.Find("Body Module Camera").GetComponent<ICinemachineCamera>();
|
||||
CameraKit.Instance.RegisterCamera(CameraEnum.BodyModule, virtualCam);
|
||||
var virtualCam2 = transform.Find("Body Module Camera Center").GetComponent<ICinemachineCamera>();
|
||||
CameraKit.Instance.RegisterCamera(CameraEnum.BodyModuleCenter, virtualCam2);
|
||||
}
|
||||
@@ -80,7 +79,7 @@ namespace AibisDream.FixSystem
|
||||
private void OnDestroy()
|
||||
{
|
||||
StorageSystem.Instance.UnregisterData<ModuleSystemData>();
|
||||
CameraKit.Instance.UnRegisterCamera(CameraEnum.BodyModule);
|
||||
CameraKit.Instance.UnRegisterCamera(CameraEnum.BodyModuleCenter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -108,7 +107,7 @@ namespace AibisDream.FixSystem
|
||||
continue; // 跳过不可用的模块
|
||||
}
|
||||
|
||||
float tempDistance = Vector3.Distance(sourcePos, bodyModule.GetSocketPos());
|
||||
float tempDistance = Vector3.Distance(sourcePos, bodyModule.GetSocketPos().position);
|
||||
|
||||
if (tempDistance < closestDistance)
|
||||
{
|
||||
@@ -134,6 +133,7 @@ namespace AibisDream.FixSystem
|
||||
|
||||
public void OpenModuleSlots()
|
||||
{
|
||||
AudioManager.Instance.PlaySfx("event:/ActionFB/mods_open");
|
||||
foreach (var module in BodyModules)
|
||||
{
|
||||
module.OpenPlugSlot();
|
||||
@@ -177,7 +177,7 @@ namespace AibisDream.FixSystem
|
||||
{
|
||||
heatMapController.ShowHeatMap();
|
||||
DisableSystem();
|
||||
ResetPlug();
|
||||
FixPanelSystem.GetRepairPanel<CablePanel>().ResetPlug();
|
||||
}
|
||||
|
||||
public void HideHeatMap()
|
||||
@@ -196,20 +196,12 @@ namespace AibisDream.FixSystem
|
||||
_heatValue = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 插头重新插入初始插孔
|
||||
/// </summary>
|
||||
public void ResetPlug()
|
||||
{
|
||||
CableSystem.ResetPlug();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 激活交互系统
|
||||
/// </summary>
|
||||
public void EnableSystem()
|
||||
{
|
||||
isAvailable = true;
|
||||
// isAvailable = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -217,7 +209,7 @@ namespace AibisDream.FixSystem
|
||||
/// </summary>
|
||||
public void DisableSystem()
|
||||
{
|
||||
isAvailable = false;
|
||||
// isAvailable = false;
|
||||
}
|
||||
|
||||
public void SwitchModuleGroup(ModuleState moduleState)
|
||||
|
||||
Reference in New Issue
Block a user