feat():大改前的提交,这个版本保存了所有冗余的代码

This commit is contained in:
2025-10-17 15:10:19 +08:00
parent 668bfe12eb
commit 3d03c59dc3
68 changed files with 2045 additions and 159 deletions

View File

@@ -0,0 +1,27 @@
using UnityEngine;
namespace Script.Gameplay.Facility
{
public class FacilityModifier : MonoBehaviour
{
private Transform _transform;
private Collider _collider;
private Rigidbody _rigidbody;
public void ModifyComponent<T>(bool isOpen, T component) where T : Component
{
var targetComponent = this.GetComponent<T>();
if (targetComponent != null)
{
if (isOpen)
{
targetComponent.gameObject.SetActive(true);
}
else
{
targetComponent.gameObject.SetActive(false);
}
}
}
}
}