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,7 @@
namespace Script.Gameplay.Facility
{
public class EditComponent
{
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: bca7c28154234ab4b792dca4d2f92354
timeCreated: 1760629389

View File

@@ -0,0 +1,69 @@
using System;
using Gameplay.Player;
using UnityEngine;
using Interface;
namespace Script.Gameplay.Facility
{
public class FacilityController : MonoBehaviour, IInteractable, IEditable
{
public FacilityModifier facilityModifier;
private void Awake()
{
if (facilityModifier == null)
{
facilityModifier = GetComponent<FacilityModifier>();
}
}
private void Start()
{
}
public string GetInteractPrompt()
{
return "";
}
public void Interact(GameObject interactor)
{
}
public void OnGazeEnter(GameObject editor)
{
// 物体弹出按F可交互菜单
}
public void OnGazeExit(GameObject editor)
{
// 物体取消菜单
}
public void OnGazeEnter(PlayerEditController editor)
{
}
public void OnGazeExit(PlayerEditController editor)
{
}
public void BeginEdit()
{
}
public void EndEdit()
{
}
public IEditable GetEditable()
{
return this;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 7986c88b8e1d4944832af56e23188597
timeCreated: 1760664530

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);
}
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b1db33a437984a1a8fae09ab8c5de7e4
timeCreated: 1760667210