From 48a67e8ba91cec8ebb86fd75a4594f545e1a1d6f Mon Sep 17 00:00:00 2001 From: Stefan Richter <o-s-r1993@web.de> Date: Fri, 1 Jul 2022 19:31:19 +0200 Subject: [PATCH] Fixed issue with CharacterDialog. --- Assets/Resources/Prefabs/Stage_Default.prefab | 43 +++++++++---- Assets/Scenes/Worlds/RiverWorld.unity | 15 +++++ .../Character_Animations/CharacterDialog.cs | 56 +++++++++++++++- .../TaskCharakterAnimation.cs | 16 ++++- Assets/Scripts/Restart.cs | 62 +++++++++--------- Assets/Scripts/Restart_script.cs | 64 ------------------- Assets/Scripts/Restart_script.cs.meta | 11 ---- .../Scripts/FirstPersonController1.cs | 10 ++- .../Scripts/MouseLook1.cs | 4 +- .../Scripts/UI/InGame/MainPlayerMode_Ctrl.cs | 6 +- .../Scripts/UI/InGame/Pause_Menue_mobile.cs | 10 ++- .../UI/PlayerControls/ControlMapping.cs | 30 +++++++++ .../ControlMapping.inputactions | 20 ++++++ UserSettings/EditorUserSettings.asset | 4 +- 14 files changed, 217 insertions(+), 134 deletions(-) delete mode 100644 Assets/Scripts/Restart_script.cs delete mode 100644 Assets/Scripts/Restart_script.cs.meta diff --git a/Assets/Resources/Prefabs/Stage_Default.prefab b/Assets/Resources/Prefabs/Stage_Default.prefab index 2bfe0f59..e5b99cf4 100644 --- a/Assets/Resources/Prefabs/Stage_Default.prefab +++ b/Assets/Resources/Prefabs/Stage_Default.prefab @@ -8983,11 +8983,21 @@ PrefabInstance: propertyPath: m_Name value: MainPlayer-Mode_Ctrl objectReference: {fileID: 0} + - target: {fileID: 5814682397721105694, guid: 1a0e8fc4bd33d48489e21d111c3a57e4, + type: 3} + propertyPath: NPC1 + value: + objectReference: {fileID: 3020720019048698010} - target: {fileID: 5814682397721105694, guid: 1a0e8fc4bd33d48489e21d111c3a57e4, type: 3} propertyPath: ThirdPerson_GObj value: objectReference: {fileID: 6501516846063548396} + - target: {fileID: 7213921776612927653, guid: 1a0e8fc4bd33d48489e21d111c3a57e4, + type: 3} + propertyPath: NPC1 + value: + objectReference: {fileID: 3020720019048698010} - target: {fileID: 7486327252467103558, guid: 1a0e8fc4bd33d48489e21d111c3a57e4, type: 3} propertyPath: m_LocalPosition.x @@ -9392,9 +9402,9 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: b996060e27da25c498842defc1996d84, type: 3} ---- !u!1 &3020720018354060035 stripped +--- !u!1 &2804693203643534396 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 1063267682327585419, guid: b996060e27da25c498842defc1996d84, + m_CorrespondingSourceObject: {fileID: 128063500140303796, guid: b996060e27da25c498842defc1996d84, type: 3} m_PrefabInstance: {fileID: 2822275412857346440} m_PrefabAsset: {fileID: 0} @@ -9404,9 +9414,9 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 2822275412857346440} m_PrefabAsset: {fileID: 0} ---- !u!1 &2804693203643534396 stripped +--- !u!1 &3020720018354060035 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 128063500140303796, guid: b996060e27da25c498842defc1996d84, + m_CorrespondingSourceObject: {fileID: 1063267682327585419, guid: b996060e27da25c498842defc1996d84, type: 3} m_PrefabInstance: {fileID: 2822275412857346440} m_PrefabAsset: {fileID: 0} @@ -9669,9 +9679,9 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: f6ee936e2ace8e84ba70ad7e1ae58bdc, type: 3} ---- !u!1 &251852623843673086 stripped +--- !u!1 &9216074679447971875 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 4842294571495540318, guid: f6ee936e2ace8e84ba70ad7e1ae58bdc, + m_CorrespondingSourceObject: {fileID: 4587928831088618883, guid: f6ee936e2ace8e84ba70ad7e1ae58bdc, type: 3} m_PrefabInstance: {fileID: 4633513391531001248} m_PrefabAsset: {fileID: 0} @@ -9681,9 +9691,9 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 4633513391531001248} m_PrefabAsset: {fileID: 0} ---- !u!1 &9216074679447971875 stripped +--- !u!1 &251852623843673086 stripped GameObject: - m_CorrespondingSourceObject: {fileID: 4587928831088618883, guid: f6ee936e2ace8e84ba70ad7e1ae58bdc, + m_CorrespondingSourceObject: {fileID: 4842294571495540318, guid: f6ee936e2ace8e84ba70ad7e1ae58bdc, type: 3} m_PrefabInstance: {fileID: 4633513391531001248} m_PrefabAsset: {fileID: 0} @@ -9744,6 +9754,11 @@ PrefabInstance: propertyPath: player value: objectReference: {fileID: 0} + - target: {fileID: 6999573641170124239, guid: 8590393c51194934a95cdc2075fc4dec, + type: 3} + propertyPath: playerDefault + value: + objectReference: {fileID: 7778809873180294482} - target: {fileID: 6999573641170124239, guid: 8590393c51194934a95cdc2075fc4dec, type: 3} propertyPath: walkAroundObject @@ -9903,6 +9918,12 @@ PrefabInstance: - {fileID: 6999573642288568606, guid: 8590393c51194934a95cdc2075fc4dec, type: 3} - {fileID: 6999573640440716766, guid: 8590393c51194934a95cdc2075fc4dec, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 8590393c51194934a95cdc2075fc4dec, type: 3} +--- !u!224 &3020720019660533894 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 6999573640440716755, guid: 8590393c51194934a95cdc2075fc4dec, + type: 3} + m_PrefabInstance: {fileID: 5244648467689565525} + m_PrefabAsset: {fileID: 0} --- !u!4 &3018693875623148968 stripped Transform: m_CorrespondingSourceObject: {fileID: 7002030793187184893, guid: 8590393c51194934a95cdc2075fc4dec, @@ -9921,9 +9942,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1548220cdff39434da0c355ae7ade121, type: 3} m_Name: m_EditorClassIdentifier: ---- !u!224 &3020720019660533894 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 6999573640440716755, guid: 8590393c51194934a95cdc2075fc4dec, +--- !u!1 &7778809873180294482 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2538721375231184903, guid: 8590393c51194934a95cdc2075fc4dec, type: 3} m_PrefabInstance: {fileID: 5244648467689565525} m_PrefabAsset: {fileID: 0} diff --git a/Assets/Scenes/Worlds/RiverWorld.unity b/Assets/Scenes/Worlds/RiverWorld.unity index b0eb6b04..e3c7decf 100644 --- a/Assets/Scenes/Worlds/RiverWorld.unity +++ b/Assets/Scenes/Worlds/RiverWorld.unity @@ -58247,6 +58247,11 @@ PrefabInstance: propertyPath: m_LocalRotation.z value: -0.000000013358773 objectReference: {fileID: 0} + - target: {fileID: 440185836978724020, guid: b07552db700124a4680401e6fb94c186, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} - target: {fileID: 473583634759884486, guid: b07552db700124a4680401e6fb94c186, type: 3} propertyPath: m_LocalPosition.y @@ -59482,6 +59487,11 @@ PrefabInstance: propertyPath: m_IsActive value: 0 objectReference: {fileID: 0} + - target: {fileID: 6930393306597857396, guid: b07552db700124a4680401e6fb94c186, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} - target: {fileID: 6981642935568223106, guid: b07552db700124a4680401e6fb94c186, type: 3} propertyPath: m_LocalPosition.x @@ -59587,6 +59597,11 @@ PrefabInstance: propertyPath: m_IsActive value: 0 objectReference: {fileID: 0} + - target: {fileID: 7621338158580084958, guid: b07552db700124a4680401e6fb94c186, + type: 3} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} - target: {fileID: 7626301919721263100, guid: b07552db700124a4680401e6fb94c186, type: 3} propertyPath: m_IsActive diff --git a/Assets/Scripts/InteractionEngine/Character_Animations/CharacterDialog.cs b/Assets/Scripts/InteractionEngine/Character_Animations/CharacterDialog.cs index b758c44c..46bc970e 100644 --- a/Assets/Scripts/InteractionEngine/Character_Animations/CharacterDialog.cs +++ b/Assets/Scripts/InteractionEngine/Character_Animations/CharacterDialog.cs @@ -17,12 +17,17 @@ public class CharacterDialog : MonoBehaviour //speed for typing the Text public float typingSpeed; private float timer = 0; + private double numinputtrigger = 0; + public float waitingBetweenInputs = 0.2f; + //Only reset once after Player is out of range of the TaskCharacter private bool textReseted = true; //If gameSucceeded -> Disable Talking with TaskCharacter private bool gameSucceeded = false; + private ControlMapping input_ControlMapping; + // Start is called before the first frame update void Start() { @@ -33,24 +38,56 @@ void Start() TypeFkt(); } + private void Awake() + { + //New InputSystem + input_ControlMapping = new ControlMapping(); + input_ControlMapping.Actionmap1.Talking.Enable(); + + + } + private void OnEnable() + { + input_ControlMapping.Actionmap1.Talking.Enable(); + + } + + private void OnDisable() + { + input_ControlMapping.Actionmap1.Talking.Disable(); + + } + + + + private void Update() { TypeFkt(); if(!gameSucceeded && CharakterAnimation.getPlayerInTalkingZone()) { + + + print("InTalkingZone"); + //print("CharacterDialog" + gameSucceeded + " && " + CharakterAnimation.getPlayerInTalkingZone()); + if(UIconfig.InputManagerVersion==1){ if (Input.GetKeyDown(KeyCode.C)){ //Type Next sentence if player is in the talkinZone around the TaskCharacter AND the player typed the return-Key NextSentence(); + print("CharacterDialogLos1"); } } - if (UIconfig.InputManagerVersion == 2) + if (UIconfig.InputManagerVersion == 2 && numinputtrigger == 0) { - if (false) + if (input_ControlMapping.Actionmap1.Talking.ReadValue<float>() != 0) { + numinputtrigger++; + StartCoroutine(slowInput()); //Type Next sentence if player is in the talkinZone around the TaskCharacter AND the player typed the return-Key NextSentence(); + print("CharacterDialogLos2"); } } } @@ -149,4 +186,19 @@ public void StopGameSucceededSentence() ResetSentence(); } } + + + + IEnumerator slowInput() + { + + yield return new WaitForSecondsRealtime(waitingBetweenInputs); + + numinputtrigger = 0; + + + yield return null; + + } + } diff --git a/Assets/Scripts/InteractionEngine/Character_Animations/TaskCharakterAnimation.cs b/Assets/Scripts/InteractionEngine/Character_Animations/TaskCharakterAnimation.cs index b0234ee6..c1839fc1 100644 --- a/Assets/Scripts/InteractionEngine/Character_Animations/TaskCharakterAnimation.cs +++ b/Assets/Scripts/InteractionEngine/Character_Animations/TaskCharakterAnimation.cs @@ -6,10 +6,12 @@ public class TaskCharakterAnimation : MonoBehaviour { public GameObject walkAroundObject; - public GameObject player; + public GameObject playerDefault; + public float radiusAroundObject; public float talkingZoneDistance; + private GameObject player; private Animator anim; private Transform currentTransform; private float currentDistance; @@ -28,6 +30,7 @@ public class TaskCharakterAnimation : MonoBehaviour private float rotationUnits = 0; private float rotationTime = 2; private bool happy = false; + private bool LelvelVerifiedSolved = false; private float happyTimer = 0; @@ -43,6 +46,7 @@ void Start() anim = GetComponent<Animator>(); currentTransform = GetComponent<Transform>(); talkingZoneCapsule = gameObject.GetComponentInChildren<CapsuleCollider>(); + player = playerDefault; } // Update is called once per frame @@ -56,7 +60,8 @@ void Update() stopHappy(); return; } - + print("player: "+ player); + RaycastHit hit; Ray ray = new Ray(player.transform.position, player.transform.forward); int layerMask = LayerMask.GetMask("TalkingZone"); //only hit TalkingZone @@ -227,4 +232,11 @@ public void setTaskCharacterAddressed(bool value) taskCharacterAddressed = value; } + //Static Method for CharacterDialog + public void setPlayer(GameObject player) + { + this.player = player; + } + + } diff --git a/Assets/Scripts/Restart.cs b/Assets/Scripts/Restart.cs index 6610d937..975c4f22 100644 --- a/Assets/Scripts/Restart.cs +++ b/Assets/Scripts/Restart.cs @@ -1,67 +1,63 @@ using UnityEngine; using UnityEngine.SceneManagement; using static UIconfig; -using static Restart_script; +//using static Restart_script; public class Restart : MonoBehaviour { - public void LevelReset() + public static void LevelReset() { - - Restart_script resClass = new Restart_script(); - resClass.LevelReset(); - - + StageStatic.stage.ResetPlay(); + //UIconfig.CanvasOnOff_Array[2] = 0; + //UIconfig.GamePaused = false; + //Time.timeScale = 1; // UIconfig.Game_TimeScale; + Loader.LoadStage(StageStatic.stage.name, !StageStatic.stage.use_install_folder, false); + //StageStatic.stage.factState.softreset(); } - public void LoadMainMenue() + public static void LoadMainMenue() { - Restart_script resClass = new Restart_script(); - resClass.LoadMainMenue(); + //not over SceneManager.LoadingScreen as MainMenue is too light to need to load over a LoadingScreen + SceneManager.LoadScene("MainMenue"); } - public void StageFactState_modundo() + public static void StageFactState_modundo() { - Restart_script resClass = new Restart_script(); - resClass.LoadMainMenue(); + StageStatic.stage.factState.undo(); } - public void StageFactState_modredo() + public static void StageFactState_modredo() { - Restart_script resClass = new Restart_script(); - resClass.StageFactState_modredo(); + StageStatic.stage.factState.redo(); } - public void StageFactState_modreset() + public static void StageFactState_modreset() { - Restart_script resClass = new Restart_script(); - resClass.StageFactState_modreset(); + StageStatic.stage.factState.softreset(); } - public void Stage_modsave() + public static void Stage_modsave() { - Restart_script resClass = new Restart_script(); - resClass.Stage_modsave(); + StageStatic.stage.push_record(); } - public void StageFactState_modload() + public static void StageFactState_modload() { - Restart_script resClass = new Restart_script(); - resClass.StageFactState_modload(); + StageStatic.stage.factState.hardreset(); + StageStatic.LoadInitStage(StageStatic.stage.name, !StageStatic.stage.use_install_folder); } - - - public void LoadStartScreen() + + + public static void LoadStartScreen() { - Restart_script resClass = new Restart_script(); - resClass.LoadStartScreen(); + StartServer.process.Kill(); // null reference exception if Server started manually + SceneManager.LoadScene(0); } - public void OnApplicationQuit() + public static void OnApplicationQuit() { - Restart_script resClass = new Restart_script(); - resClass.OnApplicationQuit(); + StartServer.process.Kill(); // null reference exception if Server started manually } } diff --git a/Assets/Scripts/Restart_script.cs b/Assets/Scripts/Restart_script.cs deleted file mode 100644 index c165c842..00000000 --- a/Assets/Scripts/Restart_script.cs +++ /dev/null @@ -1,64 +0,0 @@ -using UnityEngine; -using UnityEngine.SceneManagement; -using static UIconfig; - -public class Restart_script -{ - public void LevelReset() - { - - StageStatic.stage.ResetPlay(); - //UIconfig.CanvasOnOff_Array[2] = 0; - //UIconfig.GamePaused = false; - //Time.timeScale = 1; // UIconfig.Game_TimeScale; - Loader.LoadStage(StageStatic.stage.name, !StageStatic.stage.use_install_folder, false); - //StageStatic.stage.factState.softreset(); - - } - - public void LoadMainMenue() - { - //not over SceneManager.LoadingScreen as MainMenue is too light to need to load over a LoadingScreen - SceneManager.LoadScene("MainMenue"); - } - - - public void StageFactState_modundo() - { - StageStatic.stage.factState.undo(); - } - public void StageFactState_modredo() - { - StageStatic.stage.factState.redo(); - } - - public void StageFactState_modreset() - { - StageStatic.stage.factState.softreset(); - } - - public void Stage_modsave() - { - StageStatic.stage.push_record(); - } - - public void StageFactState_modload() - { - StageStatic.stage.factState.hardreset(); - StageStatic.LoadInitStage(StageStatic.stage.name, !StageStatic.stage.use_install_folder); - } - - - - - public void LoadStartScreen() - { - StartServer.process.Kill(); // null reference exception if Server started manually - SceneManager.LoadScene(0); - } - - public void OnApplicationQuit() - { - StartServer.process.Kill(); // null reference exception if Server started manually - } -} diff --git a/Assets/Scripts/Restart_script.cs.meta b/Assets/Scripts/Restart_script.cs.meta deleted file mode 100644 index e5ec77a1..00000000 --- a/Assets/Scripts/Restart_script.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 24dee529ff67a2944b706e63b58d9945 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/UI/Characters/FirstPersonCharacter/Scripts/FirstPersonController1.cs b/Assets/Scripts/UI/Characters/FirstPersonCharacter/Scripts/FirstPersonController1.cs index fb2b2e5a..cf2509f2 100644 --- a/Assets/Scripts/UI/Characters/FirstPersonCharacter/Scripts/FirstPersonController1.cs +++ b/Assets/Scripts/UI/Characters/FirstPersonCharacter/Scripts/FirstPersonController1.cs @@ -48,6 +48,8 @@ public class FirstPersonController1 : MonoBehaviour private ControlMapping input_ControlMapping; public string Running_keyBind; + public TaskCharakterAnimation NPC1; + private void Awake() { @@ -61,6 +63,8 @@ private void OnEnable() { input_ControlMapping.Actionmap1.Movement.Enable(); input_ControlMapping.Actionmap1.LookCamera.Enable(); + NPC1.setPlayer(gameObject); + } private void OnDisable() @@ -243,9 +247,9 @@ private void GetInput(out float speed) // Read input horizontal = CrossPlatformInputManager.GetAxis("Horizontal"); vertical = CrossPlatformInputManager.GetAxis("Vertical"); - print("CrossInputH" + horizontal); - print("CrossInputH" + horizontal); - print("InputV" + Input.GetAxis("Vertical")); + //print("CrossInputH" + horizontal); + //print("CrossInputH" + horizontal); + //print("InputV" + Input.GetAxis("Vertical")); #if !MOBILE_INPUT // On standalone builds, walk/run speed is modified by a key press. diff --git a/Assets/Scripts/UI/Characters/FirstPersonCharacter/Scripts/MouseLook1.cs b/Assets/Scripts/UI/Characters/FirstPersonCharacter/Scripts/MouseLook1.cs index cad599f6..8925194d 100644 --- a/Assets/Scripts/UI/Characters/FirstPersonCharacter/Scripts/MouseLook1.cs +++ b/Assets/Scripts/UI/Characters/FirstPersonCharacter/Scripts/MouseLook1.cs @@ -116,8 +116,8 @@ public void LookRotation(Transform character, Transform camera) camera.localRotation = m_CameraTargetRot;//Wieso magst du nicht nach Build! } - if (yRot != 0) { Debug.Log("my" + yRot); Debug.Log("mc" + camera.localRotation); } - if (xRot != 0) { Debug.Log("mx" + xRot); Debug.Log("mc" + camera.localRotation); } //Hoch runter + //if (yRot != 0) { Debug.Log("my" + yRot); Debug.Log("mc" + camera.localRotation); } + //if (xRot != 0) { Debug.Log("mx" + xRot); Debug.Log("mc" + camera.localRotation); } //Hoch runter UpdateCursorLock(); } diff --git a/Assets/Scripts/UI/InGame/MainPlayerMode_Ctrl.cs b/Assets/Scripts/UI/InGame/MainPlayerMode_Ctrl.cs index 5120daf1..e979c47c 100644 --- a/Assets/Scripts/UI/InGame/MainPlayerMode_Ctrl.cs +++ b/Assets/Scripts/UI/InGame/MainPlayerMode_Ctrl.cs @@ -12,10 +12,12 @@ using static UIconfig; + public class MainPlayerMode_Ctrl : MonoBehaviour { - + //public TaskCharakterAnimation NPC1; + //public int myUI_ID; public GameObject myself_GObj; //public GameObject parent_GObj; @@ -63,6 +65,7 @@ private void Update2(){ break; case 1: Sidescroller_GObj.gameObject.SetActive(true); + break; case 2: Escaperoom_GObj.gameObject.SetActive(true); @@ -75,6 +78,7 @@ private void Update2(){ break; case 5: FirstPerson_GObj.gameObject.SetActive(true); + //NPC1.setPlayer(FirstPerson_GObj.); break; case 6: FirstPersonOldInpOrig_GObj.gameObject.SetActive(true); diff --git a/Assets/Scripts/UI/InGame/Pause_Menue_mobile.cs b/Assets/Scripts/UI/InGame/Pause_Menue_mobile.cs index 20933ee1..f1aa4445 100644 --- a/Assets/Scripts/UI/InGame/Pause_Menue_mobile.cs +++ b/Assets/Scripts/UI/InGame/Pause_Menue_mobile.cs @@ -12,7 +12,7 @@ using static UIconfig; using UnityEngine.EventSystems; using static Restart; -using static Restart_script; + //using static SceneSwitcher; @@ -131,8 +131,12 @@ private void ResumeGame() if (ResetLevel) { //Restart resClass = new Restart(); - Restart_script resClass = new Restart_script(); - resClass.LevelReset(); + //Restart_script resClass = new Restart_script(); + //resClass.LevelReset(); + + Restart.LevelReset(); + + } if (switchToScene_ID_ > 0) { diff --git a/Assets/Scripts/UI/PlayerControls/ControlMapping.cs b/Assets/Scripts/UI/PlayerControls/ControlMapping.cs index 1b4a2c55..17ba5e14 100644 --- a/Assets/Scripts/UI/PlayerControls/ControlMapping.cs +++ b/Assets/Scripts/UI/PlayerControls/ControlMapping.cs @@ -89,6 +89,15 @@ public @ControlMapping() ""processors"": """", ""interactions"": """", ""initialStateCheck"": false + }, + { + ""name"": ""Talking"", + ""type"": ""Button"", + ""id"": ""b1520e97-2587-4525-8ce4-f2f6cacf9c82"", + ""expectedControlType"": ""Button"", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false } ], ""bindings"": [ @@ -443,6 +452,17 @@ public @ControlMapping() ""action"": ""MathMode"", ""isComposite"": false, ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""c0ba9d0f-646d-40cb-bed8-9ac73f005494"", + ""path"": ""<Keyboard>/c"", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""Talking"", + ""isComposite"": false, + ""isPartOfComposite"": false } ] }, @@ -1231,6 +1251,7 @@ public @ControlMapping() m_Actionmap1_Cancel = m_Actionmap1.FindAction("Cancel", throwIfNotFound: true); m_Actionmap1_ToolMode = m_Actionmap1.FindAction("ToolMode", throwIfNotFound: true); m_Actionmap1_MathMode = m_Actionmap1.FindAction("MathMode", throwIfNotFound: true); + m_Actionmap1_Talking = m_Actionmap1.FindAction("Talking", throwIfNotFound: true); // Actnmp_HC_Bttn m_Actnmp_HC_Bttn = asset.FindActionMap("Actnmp_HC_Bttn", throwIfNotFound: true); m_Actnmp_HC_Bttn_Movement = m_Actnmp_HC_Bttn.FindAction("Movement", throwIfNotFound: true); @@ -1313,6 +1334,7 @@ public int FindBinding(InputBinding bindingMask, out InputAction action) private readonly InputAction m_Actionmap1_Cancel; private readonly InputAction m_Actionmap1_ToolMode; private readonly InputAction m_Actionmap1_MathMode; + private readonly InputAction m_Actionmap1_Talking; public struct Actionmap1Actions { private @ControlMapping m_Wrapper; @@ -1324,6 +1346,7 @@ public struct Actionmap1Actions public InputAction @Cancel => m_Wrapper.m_Actionmap1_Cancel; public InputAction @ToolMode => m_Wrapper.m_Actionmap1_ToolMode; public InputAction @MathMode => m_Wrapper.m_Actionmap1_MathMode; + public InputAction @Talking => m_Wrapper.m_Actionmap1_Talking; public InputActionMap Get() { return m_Wrapper.m_Actionmap1; } public void Enable() { Get().Enable(); } public void Disable() { Get().Disable(); } @@ -1354,6 +1377,9 @@ public void SetCallbacks(IActionmap1Actions instance) @MathMode.started -= m_Wrapper.m_Actionmap1ActionsCallbackInterface.OnMathMode; @MathMode.performed -= m_Wrapper.m_Actionmap1ActionsCallbackInterface.OnMathMode; @MathMode.canceled -= m_Wrapper.m_Actionmap1ActionsCallbackInterface.OnMathMode; + @Talking.started -= m_Wrapper.m_Actionmap1ActionsCallbackInterface.OnTalking; + @Talking.performed -= m_Wrapper.m_Actionmap1ActionsCallbackInterface.OnTalking; + @Talking.canceled -= m_Wrapper.m_Actionmap1ActionsCallbackInterface.OnTalking; } m_Wrapper.m_Actionmap1ActionsCallbackInterface = instance; if (instance != null) @@ -1379,6 +1405,9 @@ public void SetCallbacks(IActionmap1Actions instance) @MathMode.started += instance.OnMathMode; @MathMode.performed += instance.OnMathMode; @MathMode.canceled += instance.OnMathMode; + @Talking.started += instance.OnTalking; + @Talking.performed += instance.OnTalking; + @Talking.canceled += instance.OnTalking; } } } @@ -1583,6 +1612,7 @@ public interface IActionmap1Actions void OnCancel(InputAction.CallbackContext context); void OnToolMode(InputAction.CallbackContext context); void OnMathMode(InputAction.CallbackContext context); + void OnTalking(InputAction.CallbackContext context); } public interface IActnmp_HC_BttnActions { diff --git a/Assets/Scripts/UI/PlayerControls/ControlMapping.inputactions b/Assets/Scripts/UI/PlayerControls/ControlMapping.inputactions index a300cd4b..103996f3 100644 --- a/Assets/Scripts/UI/PlayerControls/ControlMapping.inputactions +++ b/Assets/Scripts/UI/PlayerControls/ControlMapping.inputactions @@ -67,6 +67,15 @@ "processors": "", "interactions": "", "initialStateCheck": false + }, + { + "name": "Talking", + "type": "Button", + "id": "b1520e97-2587-4525-8ce4-f2f6cacf9c82", + "expectedControlType": "Button", + "processors": "", + "interactions": "", + "initialStateCheck": false } ], "bindings": [ @@ -421,6 +430,17 @@ "action": "MathMode", "isComposite": false, "isPartOfComposite": false + }, + { + "name": "", + "id": "c0ba9d0f-646d-40cb-bed8-9ac73f005494", + "path": "<Keyboard>/c", + "interactions": "", + "processors": "", + "groups": "", + "action": "Talking", + "isComposite": false, + "isPartOfComposite": false } ] }, diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index 681b79ca..22041dfc 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -24,10 +24,10 @@ EditorUserSettings: value: 22424703114646680e0b0227036c721518021d39631b32313f3d2e30f0e53136acf238e0f323 flags: 0 RecentlyUsedScenePath-6: - value: 22424703114646680e0b0227036c721518021d39630527392304183df7e57a2decee22f0 + value: 22424703114646680e0b0227036c721518021d3963042725232a151ee7ee213dacf238e0f323 flags: 0 RecentlyUsedScenePath-7: - value: 22424703114646680e0b0227036c721518021d3963042725232a151ee7ee213dacf238e0f323 + value: 22424703114646680e0b0227036c721518021d39630527392304183df7e57a2decee22f0 flags: 0 RecentlyUsedScenePath-8: value: 22424703114646680e0b0227036c681f041b1c39631a2f26283b2a3cf0ec3076f7e93ffdfe -- GitLab