This commit is contained in:
yzx 2024-06-06 11:10:16 +08:00
parent 6bec33342d
commit eb89b8fb4e
27 changed files with 3218 additions and 5279 deletions

View File

@ -25,22 +25,8 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<<<<<<< HEAD
<OutputPath>Temp\bin\Debug\</OutputPath>
<DefineConstants>UNITY_2022_3_22;UNITY_2022_3;UNITY_2022;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;UNITY_2021_1_OR_NEWER;UNITY_2021_2_OR_NEWER;UNITY_2021_3_OR_NEWER;UNITY_2022_1_OR_NEWER;UNITY_2022_2_OR_NEWER;UNITY_2022_3_OR_NEWER;PLATFORM_ARCH_64;UNITY_64;UNITY_INCLUDE_TESTS;ENABLE_AR;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_EVENT_QUEUE;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_VIRTUALTEXTURING;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_EDITOR_GAME_SERVICES;ENABLE_UNITY_GAME_SERVICES_ANALYTICS_SUPPORT;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_GENERATE_NATIVE_PLUGINS_FOR_ASSEMBLIES_API;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_VIDEO;ENABLE_ACCELERATOR_CLIENT_DEBUGGING;ENABLE_NAVIGATION_PACKAGE_DEBUG_VISUALIZATION;ENABLE_NAVIGATION_HEIGHTMESH_RUNTIME_SUPPORT;ENABLE_NAVIGATION_UI_REQUIRES_PACKAGE;PLATFORM_STANDALONE;TEXTCORE_1_0_OR_NEWER;PLATFORM_STANDALONE_WIN;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_NVIDIA;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;GFXDEVICE_WAITFOREVENT_MESSAGEPUMP;PLATFORM_INITIALIZES_MEMORY_MANAGER_EXPLICITLY;ENABLE_MONO;NET_4_6;NET_UNITY_4_8;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;TEXTCORE_FONT_ENGINE_1_5_OR_NEWER;UNITY_POST_PROCESSING_STACK_V2;DOTWEEN;AMPLIFY_SHADER_EDITOR;CROSS_PLATFORM_INPUT;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169;USG0001</NoWarn>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Temp\bin\Release\</OutputPath>
=======
<OutputPath>Temp\Bin\Debug\Assembly-CSharp-firstpass\</OutputPath>
<DefineConstants>UNITY_2022_3_22;UNITY_2022_3;UNITY_2022;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;UNITY_2021_1_OR_NEWER;UNITY_2021_2_OR_NEWER;UNITY_2021_3_OR_NEWER;UNITY_2022_1_OR_NEWER;UNITY_2022_2_OR_NEWER;UNITY_2022_3_OR_NEWER;PLATFORM_ARCH_64;UNITY_64;UNITY_INCLUDE_TESTS;ENABLE_AR;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_EVENT_QUEUE;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_VIRTUALTEXTURING;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_EDITOR_GAME_SERVICES;ENABLE_UNITY_GAME_SERVICES_ANALYTICS_SUPPORT;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_GENERATE_NATIVE_PLUGINS_FOR_ASSEMBLIES_API;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_VIDEO;ENABLE_ACCELERATOR_CLIENT_DEBUGGING;ENABLE_NAVIGATION_PACKAGE_DEBUG_VISUALIZATION;ENABLE_NAVIGATION_HEIGHTMESH_RUNTIME_SUPPORT;ENABLE_NAVIGATION_UI_REQUIRES_PACKAGE;PLATFORM_STANDALONE;TEXTCORE_1_0_OR_NEWER;PLATFORM_STANDALONE_WIN;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_NVIDIA;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;GFXDEVICE_WAITFOREVENT_MESSAGEPUMP;PLATFORM_INITIALIZES_MEMORY_MANAGER_EXPLICITLY;ENABLE_MONO;NET_4_6;NET_UNITY_4_8;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;TEXTCORE_FONT_ENGINE_1_5_OR_NEWER;UNITY_POST_PROCESSING_STACK_V2;DOTWEEN;AMPLIFY_SHADER_EDITOR;CROSS_PLATFORM_INPUT;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER</DefineConstants>
>>>>>>> 5020941175aa9c648b06f49efc0c25b2a851e127
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169,0649</NoWarn>

View File

@ -61,6 +61,7 @@
<Compile Include="Assets\Standard Assets 1\Utility\WaypointCircuit.cs" />
<Compile Include="Assets\Standard Assets 1\Characters\ThirdPersonCharacter\Scripts\ThirdPersonUserControl.cs" />
<Compile Include="Assets\Standard Assets 1\CrossPlatformInput\Scripts\PlatformSpecific\MobileInput.cs" />
<Compile Include="Assets\Scripts\CharacterEquipWindow\CharacterInfoOnClick.cs" />
<Compile Include="Assets\Standard Assets 1\Utility\SimpleMouseRotator.cs" />
<Compile Include="Assets\Standard Assets 1\Vehicles\Car\Scripts\CarAudio.cs" />
<Compile Include="Assets\Model\Fantastic City Generator\Traffic_Light\Scripts\TrafficLights2.cs" />

View File

@ -38,7 +38,7 @@ public class GameLauncher : MonoBehaviour
CreateGameModules();
//SceneManager.LoadScene("工具间");
// SceneManager.LoadScene("묏야쇌");
}
void Update()
{
@ -62,8 +62,6 @@ public class GameLauncher : MonoBehaviour
//工具包
MotionEngine.CreateModule<ToolsPackManager>();
//人物装备
MotionEngine.CreateModule<CharacterEquipManager>();
//数据配置文件
MotionEngine.CreateModule<DataConfigManager>();
}

View File

@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: "\u65E0\u5B89\u5168\u5E3D"
m_Name: "\u5B89\u5168\u5E3D"
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0

View File

@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: "\u8863\u670D"
m_Name: "\u5DE5\u4F5C\u670D"
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0

View File

@ -7,7 +7,7 @@ Material:
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: "\u65E0\u624B\u5957"
m_Name: "\u68C9\u7EB1\u624B\u5957"
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0

View File

@ -13,7 +13,7 @@ namespace DefaultNamespace
{
this.GetComponent<Button>().onClick.AddListener(delegate
{
// CharacterEquipManager.Instance.ChangeEquip(this.name,true);
});
}
}

View File

@ -6,19 +6,43 @@ using UnityEngine;
namespace DefaultNamespace
{
public class CharacterInfo
{
public List<GameObject> Models;
public GameObject CharacterInfoBt;
public CharacterInfo()
{
Models = new List<GameObject>();
}
}
/// <summary>
/// 人物窗口装备管理器
/// </summary>
public class CharacterEquipManager : ModuleSingleton<CharacterEquipManager>, IModule
public class CharacterEquipManager : MonoBehaviour
{
private Dictionary<string, Material> _equips; //装备集合
public static CharacterEquipManager Instance;
private Dictionary<string, CharacterInfo> _equips; //装备集合
private List<Material> _cancel; //未穿戴材质球
private List<Material> _wear; //穿戴材质球
private GameObject equipBt;
public void OnCreate(object createParam)
[SerializeField] private GameObject Man_clothes; //工作服
[SerializeField] private GameObject Man_hand1; //手套左
[SerializeField] private GameObject Man_hand2; //手套右
[SerializeField] private GameObject SafetyHelmet; //帽子
private void Awake()
{
_equips = new Dictionary<string, Material>();
Instance = this;
}
private void Start()
{
_equips = new Dictionary<string, CharacterInfo>();
_cancel = new List<Material>();
_wear = new List<Material>();
@ -26,39 +50,27 @@ namespace DefaultNamespace
_wear = Resources.LoadAll<Material>("Materials/CharacterEquip/Wear").ToList();
equipBt = Resources.Load<GameObject>("Prefabs/Window/CharacterEquip/CharacterEquipBt");
_equips.Add("帽子", null);
_equips.Add("手套", null);
_equips.Add("衣服", null);
_equips.Add("安全帽", new CharacterInfo());
_equips.Add("纱布手套", new CharacterInfo());
_equips.Add("工作服", new CharacterInfo());
}
public void OnUpdate()
{
}
public void OnDestroy()
{
}
public void OnGUI()
{
}
public void ChangeEquip(string equipName, bool isChange)
{
Material ma = null;
if (_equips.TryGetValue(equipName, out ma))
{
if (isChange)
{
ma = _wear.SingleOrDefault(s => s.name == equipName);
}
else
{
ma = _cancel.SingleOrDefault(s => s.name == equipName);
}
}
}
// public void ChangeEquip(string equipName, bool isChange)
// {
// Material ma = null;
//
// if (_equips.TryGetValue(equipName, out ma))
// {
// if (isChange)
// {
// ma = _wear.SingleOrDefault(s => s.name == equipName);
// }
// else
// {
// ma = _cancel.SingleOrDefault(s => s.name == equipName);
// }
// }
// }
public GameObject GetEquipBt()
{

View File

@ -11,7 +11,8 @@ namespace DefaultNamespace
private Dictionary<string, List<GameObject>> _toolsNames;
[SerializeField] private Transform content;
[SerializeField] private List<GameObject> equipPeopleInfo;
private void OnEnable()
{
ChangePage(ModelTypeEnum.);
@ -30,19 +31,22 @@ namespace DefaultNamespace
//初始化工具集
_toolsNames = MotionEngine.GetModule<ToolsPackManager>().GetToolsPack();
GameObject bt = MotionEngine.GetModule<CharacterEquipManager>().GetEquipBt();
GameObject bt = CharacterEquipManager.Instance.GetEquipBt();
foreach (var v in _toolsNames)
{
List<string> li = MotionEngine.GetModule<DataConfigManager>().GetToolsPackData(v.Key);
if (li == null)
{
if (v.Value[0].GetComponent<ToolsPackGameObjectComponent>().GetModelTypeEnum() == windw)
foreach (var b in v.Value)
{
CharacterEquipBtOnClick btComponent = Instantiate(bt, content, false).GetComponent<CharacterEquipBtOnClick>();
btComponent.name = v.Key;
// btComponent.Init(v.Key, v.Key, 0);
// MotionEngine.GetModule<ToolsPackManager>().AddToolsPackWindowItemBts(btComponent.gameObject);
if (b.GetComponent<ToolsPackGameObjectComponent>().GetModelTypeEnum() == windw)
{
CharacterEquipBtOnClick btComponent = Instantiate(bt, content, false).GetComponent<CharacterEquipBtOnClick>();
btComponent.name = v.Key;
// btComponent.Init(v.Key, v.Key, b.GetComponent<ToolsPackGameObjectComponent>().GetIndex());
}
}
}
else

View File

@ -0,0 +1,17 @@
using MotionFramework;
using UnityEngine;
using UnityEngine.UI;
namespace DefaultNamespace
{
public class CharacterInfoOnClick : MonoBehaviour
{
public void Start()
{
this.GetComponent<Button>().onClick.AddListener(delegate
{
// CharacterEquipManager.Instance.ChangeEquip(this.name,false);
});
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 455b0556e30948a1bcb5d5bb29976518
timeCreated: 1717639578

View File

@ -38,7 +38,7 @@ public class ToolsPackManager : ModuleSingleton<ToolsPackManager>, IModule
{
_toolsPack = new Dictionary<string, List<GameObject>>();
_toolsPackWindowItemBts = new List<GameObject>();
//加载工具窗口按钮
_toolsPackWindowBt = Resources.Load<GameObject>("Prefabs/Window/ToolsPack/ToolsPackWindowItemBt");
//加载工具窗口
@ -85,8 +85,8 @@ public class ToolsPackManager : ModuleSingleton<ToolsPackManager>, IModule
}
else
{
toolsGame.GetComponent<ToolsPackGameObjectComponent>().SetIndex(_toolsPack[toolsName].Count);
_toolsPack[toolsName].Add(toolsGame);
toolsGame.GetComponent<ToolsPackGameObjectComponent>().SetIndex(_toolsPack[toolsName].Count + 1);
}
}
@ -235,7 +235,7 @@ public class ToolsPackManager : ModuleSingleton<ToolsPackManager>, IModule
{
for (int i = 0; i < _toolsPackWindowItemBts.Count; i++)
{
if (_toolsPackWindowItemBts[i].name == toolName)
if (_toolsPackWindowItemBts[i].name == toolName && _toolsPackWindowItemBts[i].GetComponent<ToolsPackWindowItemBtComponent>().GetIndex() == index)
{
GameObject g = _toolsPackWindowItemBts[i];
_toolsPackWindowItemBts.Remove(g);

View File

@ -72,12 +72,15 @@ namespace ToolsPack
if (li == null)
{
if (v.Value[0].GetComponent<ToolsPackGameObjectComponent>().GetModelTypeEnum() == windw)
foreach (var b in v.Value)
{
ToolsPackWindowItemBtComponent btComponent = Instantiate(bt, content, false).GetComponent<ToolsPackWindowItemBtComponent>();
btComponent.name = v.Key;
btComponent.Init(v.Key, v.Key, 0);
MotionEngine.GetModule<ToolsPackManager>().AddToolsPackWindowItemBts(btComponent.gameObject);
if (b.GetComponent<ToolsPackGameObjectComponent>().GetModelTypeEnum() == windw)
{
ToolsPackWindowItemBtComponent btComponent = Instantiate(bt, content, false).GetComponent<ToolsPackWindowItemBtComponent>();
btComponent.name = v.Key;
btComponent.Init(v.Key, v.Key, b.GetComponent<ToolsPackGameObjectComponent>().GetIndex());
MotionEngine.GetModule<ToolsPackManager>().AddToolsPackWindowItemBts(btComponent.gameObject);
}
}
}
else

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff