From 8112365957fb460dbb008925a0800837506215be Mon Sep 17 00:00:00 2001 From: guyuan9527 <2533167850@qq.com> Date: Thu, 14 Sep 2023 11:32:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9B=B8=E6=9C=BA=E6=BB=9A?= =?UTF-8?q?=E8=BD=AE=E6=97=A0=E6=B3=95=E6=94=BE=E5=A4=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FirstPersonController.cs | 2 +- .../Assets/Scenes/农家乐.unity | 18 +++++++++----- .../Assets/Script/GameManager/GameManager.cs | 24 +++++++++++++++++-- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/Electrical_inspectionCompetitionSystem/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs b/Electrical_inspectionCompetitionSystem/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs index 4a0ec76a..8b4753ec 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs +++ b/Electrical_inspectionCompetitionSystem/Assets/Plugins/ModularFirstPersonController/FirstPersonController/FirstPersonController.cs @@ -371,7 +371,7 @@ public class FirstPersonController : MonoBehaviour CheckGround(); fieldView = playerCamera.fieldOfView; - fieldView -= Input.GetAxis("Mouse ScrollWheel") * 8f; + fieldView -= Input.GetAxis("Mouse ScrollWheel") * 10f; fieldView = Mathf.Clamp(fieldView, 20, 60); playerCamera.fieldOfView = fieldView; diff --git a/Electrical_inspectionCompetitionSystem/Assets/Scenes/农家乐.unity b/Electrical_inspectionCompetitionSystem/Assets/Scenes/农家乐.unity index c5d514c4..2d6ab3f0 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Scenes/农家乐.unity +++ b/Electrical_inspectionCompetitionSystem/Assets/Scenes/农家乐.unity @@ -49326,11 +49326,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} m_Name: m_EditorClassIdentifier: - m_UiScaleMode: 0 + m_UiScaleMode: 1 m_ReferencePixelsPerUnit: 100 m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 + m_ReferenceResolution: {x: 1920, y: 1080} + m_ScreenMatchMode: 1 m_MatchWidthOrHeight: 0 m_PhysicalUnit: 3 m_FallbackScreenDPI: 96 @@ -49346,7 +49346,7 @@ Canvas: m_GameObject: {fileID: 772200474} m_Enabled: 1 serializedVersion: 3 - m_RenderMode: 1 + m_RenderMode: 0 m_Camera: {fileID: 1897096268} m_PlaneDistance: 1 m_PixelPerfect: 0 @@ -49354,9 +49354,9 @@ Canvas: m_OverrideSorting: 0 m_OverridePixelPerfect: 0 m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 25 + m_AdditionalShaderChannelsFlag: 0 m_SortingLayerID: 0 - m_SortingOrder: 332 + m_SortingOrder: 1 m_TargetDisplay: 0 --- !u!1 &772352036 GameObject: @@ -129227,6 +129227,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 72a1134478d9f7647812f295f1989d7d, type: 3} m_Name: m_EditorClassIdentifier: + CameraManager: {fileID: 1543654486} + g1: {fileID: 1576068766454268715, guid: 79771fed092ef2543b21938de3220a98, type: 3} --- !u!4 &1965873574 Transform: m_ObjectHideFlags: 0 @@ -170818,6 +170820,10 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 3350233854110697398, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3} + propertyPath: enableZoom + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3350233854110697404, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3} propertyPath: m_Name value: Player diff --git a/Electrical_inspectionCompetitionSystem/Assets/Script/GameManager/GameManager.cs b/Electrical_inspectionCompetitionSystem/Assets/Script/GameManager/GameManager.cs index adc1b3ec..603dca02 100644 --- a/Electrical_inspectionCompetitionSystem/Assets/Script/GameManager/GameManager.cs +++ b/Electrical_inspectionCompetitionSystem/Assets/Script/GameManager/GameManager.cs @@ -1,5 +1,8 @@ +using System; using System.Collections; using System.Collections.Generic; +using System.Linq; +using Unity.VisualScripting; using UnityEngine; public class GameManager : MonoBehaviour @@ -7,6 +10,8 @@ public class GameManager : MonoBehaviour public static GameManager ins; public CameraManager CameraManager; List tools; + [SerializeField] GameObject g1; + char[] g2 = new char[7] {'(','C','l','o','n','e',')' }; public void Awake() { if (ins!=null) @@ -19,10 +24,25 @@ public class GameManager : MonoBehaviour // Start is called before the first frame update void Start() { - + ToolsShow(g1); } - public void ToolsShow() + /// + /// ɷ + /// + public void ToolsShow(GameObject tools) { + GameObject temp = Instantiate(tools); + string name = Filter(temp.name,g2); + Debug.Log(name); + switch (temp.name) + { + default: + break; + } + } + public string Filter(string str, char[] charsToRemove) + { + return String.Concat(str.Split(charsToRemove.ToArray())); } }