切割功能

This commit is contained in:
2025-05-02 16:06:06 +08:00
parent 4f7dece3ca
commit 10179d5453
9 changed files with 178 additions and 135 deletions
@@ -1,5 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using AibisDream.Framework;
using Cinemachine;
@@ -11,7 +12,7 @@ namespace AibisDream.FixSystem
{
#region
public BodyModule[] BodyModules { get; private set; }
public List<BodyModule> BodyModules { get; private set; }
private GameObject _bodyModuleGroup;
private GameObject _headModuleGroup;
@@ -200,10 +201,19 @@ namespace AibisDream.FixSystem
}
// 重新获取ModuleGroup
var root = moduleState == ModuleState.Body ? _bodyModuleGroup : _headModuleGroup;
BodyModules = root?.GetComponentsInChildren<BodyModule>();
BodyModules = root?.GetComponentsInChildren<BodyModule>().ToList();
// 更改data
_data.moduleState = moduleState;
}
/// <summary>
/// 从模块中清除
/// </summary>
/// <param name="module">将要被移除的模块</param>
public void RemoveModule(BodyModule module)
{
BodyModules.Remove(module);
}
}
[LoadIndex(2)]