角色预制体创建

This commit is contained in:
2025-09-03 00:15:43 +08:00
parent 48f608e534
commit 186fec4472
100 changed files with 1025 additions and 349 deletions

View File

@@ -45,7 +45,6 @@ namespace NBF
QualitySettings.vSyncCount = 0;
InitLanguage();
InitService();
InitUI();
if (!playVideo)
{
@@ -98,30 +97,6 @@ namespace NBF
#endregion
#region Service
// private static readonly List<MonoService> Services = new List<MonoService>();
private static readonly Dictionary<Type, MonoService> Services = new Dictionary<Type, MonoService>();
private void AddService<T>() where T : MonoService, new()
{
var service = this.GetComponent<T>();
if (!service)
{
service = gameObject.AddComponent<T>();
}
Services[typeof(T)] = service;
}
private void InitService()
{
AddService<InputManager>();
AddService<Settings>();
}
#endregion
public void StartGame()
{
PermanentCommon.Init();
@@ -135,13 +110,6 @@ namespace NBF
private void LoadData()
{
ConfigAssets.Init();
// var inventoryManager = GetComponent<InventoryManager>();
// if (inventoryManager == null)
// {
// inventoryManager = gameObject.AddComponent<InventoryManager>();
// }
//InventoryManager
}
#region New