切割功能
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user