From 9db7e35f49ed51e0f1457fd1b94003d52e1eddf6 Mon Sep 17 00:00:00 2001 From: Roman <1325980292@qq.com> Date: Wed, 6 Apr 2022 16:35:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=9C=9C=E6=B1=81Bug=E4=BF=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/乐/Sample1.unity | 16 ++++++++-------- Assets/Scripts/乐/Player.cs | 4 ++++ Assets/Scripts/乐/TransSense.cs | 1 + Assets/Scripts/勍/角色/PlayerControl.cs | 21 ++++++++++++++++++++- UserSettings/EditorUserSettings.asset | 6 +++--- 5 files changed, 36 insertions(+), 12 deletions(-) diff --git a/Assets/Scenes/乐/Sample1.unity b/Assets/Scenes/乐/Sample1.unity index aa29f78..9314bea 100644 --- a/Assets/Scenes/乐/Sample1.unity +++ b/Assets/Scenes/乐/Sample1.unity @@ -273,7 +273,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 96574217} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 14.431048, y: -1.2, z: 0} + m_LocalPosition: {x: 26.052097, y: -1.2, z: 0} m_LocalScale: {x: 0.8524737, y: 1.1058197, z: 0.9215932} m_Children: [] m_Father: {fileID: 0} @@ -1133,7 +1133,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 447569230} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -7.9447613, y: -1.1173111, z: -10} + m_LocalPosition: {x: 50.16049, y: -1.0834508, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -1634,7 +1634,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 568882133} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 21.024761, y: -0.5, z: 0} + m_LocalPosition: {x: -37.08049, y: -0.5, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -1806,7 +1806,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 676515654} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 9.527619, y: -1.61, z: 0} + m_LocalPosition: {x: 38.580246, y: -1.61, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -2872,7 +2872,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1115045276} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -7.9447613, y: -2.1100001, z: 0} + m_LocalPosition: {x: 50.16049, y: -2.1100001, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -4155,7 +4155,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1867567306} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -7.9444447, y: -1.66, z: -10} + m_LocalPosition: {x: 60.915558, y: -1.96, z: -10} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 927697135} @@ -9365,11 +9365,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1020564151765312503, guid: db1a0d64e04264d4e840e4424bbf4488, type: 3} propertyPath: m_LocalPosition.x - value: -11.5 + value: 57.36 objectReference: {fileID: 0} - target: {fileID: 1020564151765312503, guid: db1a0d64e04264d4e840e4424bbf4488, type: 3} propertyPath: m_LocalPosition.y - value: -1.66 + value: -1.96 objectReference: {fileID: 0} - target: {fileID: 1020564151765312503, guid: db1a0d64e04264d4e840e4424bbf4488, type: 3} propertyPath: m_LocalPosition.z diff --git a/Assets/Scripts/乐/Player.cs b/Assets/Scripts/乐/Player.cs index e923241..bbc8655 100644 --- a/Assets/Scripts/乐/Player.cs +++ b/Assets/Scripts/乐/Player.cs @@ -90,6 +90,7 @@ public class Player : PlayerControl //UPDATE void Update() { + TellMapStates(); //Debug.Log(weapon.name + " " + weapon.GetIsAtk()); //OnInputDetect(); @@ -194,6 +195,9 @@ public class Player : PlayerControl protected override void OnLeftChange() { + // + Debug.Log("left"); + // ItemController.Instance.LeftChangeItem(); } diff --git a/Assets/Scripts/乐/TransSense.cs b/Assets/Scripts/乐/TransSense.cs index 67af6a2..215b435 100644 --- a/Assets/Scripts/乐/TransSense.cs +++ b/Assets/Scripts/乐/TransSense.cs @@ -20,6 +20,7 @@ public class TransSense : MonoBehaviour private void OnTriggerEnter2D(Collider2D collision) { + FindObjectOfType().playerC.Dispose(); SceneManager.LoadSceneAsync(nextScene); } } diff --git a/Assets/Scripts/勍/角色/PlayerControl.cs b/Assets/Scripts/勍/角色/PlayerControl.cs index 0b677ef..3950aac 100644 --- a/Assets/Scripts/勍/角色/PlayerControl.cs +++ b/Assets/Scripts/勍/角色/PlayerControl.cs @@ -9,7 +9,7 @@ using Sirenix.OdinInspector; /// public class PlayerControl : MonoBehaviour { - private PlayerC playerC; + public PlayerC playerC; /// /// 此帧输入方向,-1为左,1为右,0此帧不输入 @@ -56,6 +56,25 @@ public class PlayerControl : MonoBehaviour Debug.LogError("玩家动画机丢失!"); } + //playerC.Dispose(); + } + + public void TellMapStates(){ + + if(playerC.Normal.enabled){ + Debug.Log("Normal is Active"); + } + else + { + Debug.Log("Normal is Inactive"); + } + if(playerC.Null.enabled){ + Debug.Log("Null is Active"); + } + else + { + Debug.Log("Null is Inactive"); + } } /// diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index aa6df01..25f92e9 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -15,16 +15,16 @@ EditorUserSettings: value: 22424703114646680e0b0227036cdafade90ecf1a9f9d3b7e9f35326ece92021 flags: 0 RecentlyUsedScenePath-3: - value: 22424703114646680e0b0227036cdafbfb5831243c3d3204283a097df7ee3d2cfb + value: 22424703114646680e0b0227036cdafbfb583124382d34312e3d2936f1f47a2decee22f0 flags: 0 RecentlyUsedScenePath-4: value: 22424703114646680e0b0227036cdafbfb5831243c3d3204283a097df7ee3d2cfb flags: 0 RecentlyUsedScenePath-5: - value: 22424703114646680e0b0227036cdafbfb5831243c3d3204283a097df7ee3d2cfb + value: 22424703114646680e0b0227036cdafbfb583124382d34312e3d2936f1f47a2decee22f0 flags: 0 RecentlyUsedScenePath-6: - value: 22424703114646680e0b0227036cdafbfb583124382d34312e3d2936f1f47a2decee22f0 + value: 22424703114646680e0b0227036cdafbfb589dd6f6aedfff7e67083debf42d flags: 0 RecentlyUsedScenePath-7: value: 22424703114646680e0b0227036cdafbfb589dd6f6aedfff7e67083debf42d