diff --git a/UOP1_Project/Assets/Art/Characters/PhoenixChick/Animation/IdleBar.anim.meta b/UOP1_Project/Assets/Art/Characters/PhoenixChick/Animation/IdleBar.anim.meta new file mode 100644 index 0000000000..114a61bf28 --- /dev/null +++ b/UOP1_Project/Assets/Art/Characters/PhoenixChick/Animation/IdleBar.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dc58c03c6daa2b24bb9d8cef322c0d79 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/UOP1_Project/Assets/Scripts/Characters/CharacterAudio.cs b/UOP1_Project/Assets/Scripts/Characters/CharacterAudio.cs deleted file mode 100644 index 0cdd8be241..0000000000 --- a/UOP1_Project/Assets/Scripts/Characters/CharacterAudio.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class CharacterAudio : MonoBehaviour -{ - [SerializeField] protected AudioCueEventChannelSO _sfxEventChannel = default; - [SerializeField] protected AudioConfigurationSO _audioConfig = default; - -} diff --git a/UOP1_Project/Assets/Scripts/Characters/Config/DroppableRewardConfigSO.cs b/UOP1_Project/Assets/Scripts/Characters/Config/DroppableRewardConfigSO.cs index 531856b22f..55c915d656 100644 --- a/UOP1_Project/Assets/Scripts/Characters/Config/DroppableRewardConfigSO.cs +++ b/UOP1_Project/Assets/Scripts/Characters/Config/DroppableRewardConfigSO.cs @@ -18,7 +18,7 @@ public class DroppableRewardConfigSO : ScriptableObject public virtual DropGroup DropSpecialItem() { - return null; + return null; } diff --git a/UOP1_Project/Assets/Scripts/Characters/Config/SpecialDroppableRewardConfigSO.cs b/UOP1_Project/Assets/Scripts/Characters/Config/SpecialDroppableRewardConfigSO.cs index ff79ef7199..00c994e047 100644 --- a/UOP1_Project/Assets/Scripts/Characters/Config/SpecialDroppableRewardConfigSO.cs +++ b/UOP1_Project/Assets/Scripts/Characters/Config/SpecialDroppableRewardConfigSO.cs @@ -19,6 +19,6 @@ public override DropGroup DropSpecialItem() if (_specialDroppableCurrentCount >= _specialDroppableMaxCount) return _specialItem; else - return null; + return null; } } diff --git a/UOP1_Project/Assets/Scripts/Characters/NPC.cs b/UOP1_Project/Assets/Scripts/Characters/NPC.cs index 5bf2510e76..9839d13eb0 100644 --- a/UOP1_Project/Assets/Scripts/Characters/NPC.cs +++ b/UOP1_Project/Assets/Scripts/Characters/NPC.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using UnityEngine; -public enum NPCState { Idle = 0, Walk, Talk}; +public enum NPCState { Idle = 0, Walk, Talk }; public class NPC : MonoBehaviour { diff --git a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DropRewardSO.cs b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DropRewardSO.cs index ef675309df..2e2f54131d 100644 --- a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DropRewardSO.cs +++ b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/DropRewardSO.cs @@ -32,7 +32,7 @@ public override void OnStateEnter() private void DropAllRewards(Vector3 position) { - DropGroup specialDropItem = _dropRewardConfig.DropSpecialItem(); + DropGroup specialDropItem = _dropRewardConfig.DropSpecialItem(); if (specialDropItem != null) // drops a special item if any DropOneReward(specialDropItem, position); // Drop items diff --git a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/MovementActions/PathwayMovementAction.cs b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/MovementActions/PathwayMovementAction.cs index afc8845aa1..1a34d14d8e 100644 --- a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/MovementActions/PathwayMovementAction.cs +++ b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/MovementActions/PathwayMovementAction.cs @@ -15,7 +15,7 @@ public PathwayMovementAction( { _agent = agent; _isActiveAgent = _agent != null && _agent.isActiveAndEnabled && _agent.isOnNavMesh; - _wayPointIndex = - 1; //Initialized to -1 so we don't skip the first element from the waypoint list + _wayPointIndex = -1; //Initialized to -1 so we don't skip the first element from the waypoint list _roamingSpeed = config.Speed; _wayppoints = config.Waypoints; } diff --git a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ShakeCamActionSO.cs b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ShakeCamActionSO.cs index ecce414de6..d673c82866 100644 --- a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ShakeCamActionSO.cs +++ b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Actions/ShakeCamActionSO.cs @@ -16,16 +16,16 @@ public class ShakeCamAction : StateAction public override void Awake(StateMachine stateMachine) { } - + public override void OnUpdate() { } - + public override void OnStateEnter() { OriginSO.camShakeEvent.RaiseEvent(); } - + public override void OnStateExit() { } diff --git a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/HasReachedWaypointSO.cs b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/HasReachedWaypointSO.cs index 7fd09f247e..67dc8db8a3 100644 --- a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/HasReachedWaypointSO.cs +++ b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/HasReachedWaypointSO.cs @@ -24,7 +24,8 @@ protected override bool Statement() if (!_agent.pathPending) { //set the stop distance to 0.1 if it is set to 0 in the inspector - if (_agent.stoppingDistance == 0) _agent.stoppingDistance = 0.1f; + if (_agent.stoppingDistance == 0) + _agent.stoppingDistance = 0.1f; if (_agent.remainingDistance <= _agent.stoppingDistance) { if (!_agent.hasPath || _agent.velocity.sqrMagnitude == 0f) diff --git a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsANewLineDisplayedSO.cs b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsANewLineDisplayedSO.cs index 7dddcc7f7d..cea00127ef 100644 --- a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsANewLineDisplayedSO.cs +++ b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsANewLineDisplayedSO.cs @@ -4,7 +4,8 @@ using UOP1.StateMachine.ScriptableObjects; [CreateAssetMenu(fileName = "IsANewLineDisplayed", menuName = "State Machines/Conditions/Is A New Line Displayed")] -public class IsANewLineDisplayedSO : StateConditionSO { +public class IsANewLineDisplayedSO : StateConditionSO +{ [SerializeField] private DialogueLineChannelSO _onLineDisplayed = default; diff --git a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCInDialogueSO.cs b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCInDialogueSO.cs index bc1f4e3887..7c1cc0b58e 100644 --- a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCInDialogueSO.cs +++ b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCInDialogueSO.cs @@ -14,7 +14,7 @@ public override void Awake(StateMachine stateMachine) { _stepControllerScript = stateMachine.GetComponent(); } - + protected override bool Statement() { @@ -27,5 +27,5 @@ protected override bool Statement() return false; } } - + } diff --git a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCSayingTheLineSO.cs b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCSayingTheLineSO.cs index b344289ecc..600cecda99 100644 --- a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCSayingTheLineSO.cs +++ b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCSayingTheLineSO.cs @@ -4,7 +4,8 @@ using UOP1.StateMachine.ScriptableObjects; [CreateAssetMenu(fileName = "IsNPCSayingTheLine", menuName = "State Machines/Conditions/Is NPC Saying The Line")] -public class IsNPCSayingTheLineSO : StateConditionSO { +public class IsNPCSayingTheLineSO : StateConditionSO +{ [SerializeField] private DialogueLineChannelSO _onLineDisplayed = default; [SerializeField] private ActorSO _protagonistActor; diff --git a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCTalkingSO.cs b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCTalkingSO.cs index faf8e007c1..dae467faed 100644 --- a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCTalkingSO.cs +++ b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCTalkingSO.cs @@ -14,7 +14,7 @@ public override void Awake(StateMachine stateMachine) { _npcScript = stateMachine.GetComponent(); } - + protected override bool Statement() { @@ -27,5 +27,5 @@ protected override bool Statement() return false; } } - + } diff --git a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCWalkingSO.cs b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCWalkingSO.cs index 5802fb8e9a..7915d1daad 100644 --- a/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCWalkingSO.cs +++ b/UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsNPCWalkingSO.cs @@ -14,7 +14,7 @@ public override void Awake(StateMachine stateMachine) { _npcScript = stateMachine.GetComponent(); } - + protected override bool Statement() { @@ -27,5 +27,5 @@ protected override bool Statement() return false; } } - + } diff --git a/UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs b/UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs index 3fa2459c14..17ae2291d6 100644 --- a/UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs +++ b/UOP1_Project/Assets/Scripts/Dialogues/DialogueDataSO.cs @@ -59,13 +59,13 @@ public DialogueDataSO(DialogueDataSO dialogue) _actor = dialogue.Actor; _dialogueLines = new List(dialogue.DialogueLines); _choices = new List(); - if(dialogue.Choices!=null) - for (int i=0; i choices) { _inputReader.advanceDialogueEvent -= OnAdvance; - - _makeDialogueChoiceEvent.OnEventRaised += MakeDialogueChoice; - _showChoicesUIEvent.RaiseEvent(choices); - + + _makeDialogueChoiceEvent.OnEventRaised += MakeDialogueChoice; + _showChoicesUIEvent.RaiseEvent(choices); + } private void MakeDialogueChoice(Choice choice) @@ -118,12 +118,12 @@ private void MakeDialogueChoice(Choice choice) switch (choice.ActionType) { - case ChoiceActionType.continueWithStep: - - if (_continueWithStep != null) - _continueWithStep.RaiseEvent(); - if (choice.NextDialogue != null) - DisplayDialogueData(choice.NextDialogue); + case ChoiceActionType.continueWithStep: + + if (_continueWithStep != null) + _continueWithStep.RaiseEvent(); + if (choice.NextDialogue != null) + DisplayDialogueData(choice.NextDialogue); break; case ChoiceActionType.winningChoice: @@ -133,7 +133,7 @@ private void MakeDialogueChoice(Choice choice) DisplayDialogueData(choice.NextDialogue); else DialogueEndedAndCloseDialogueUI(); - + break; case ChoiceActionType.losingChoice: @@ -143,20 +143,20 @@ private void MakeDialogueChoice(Choice choice) DisplayDialogueData(choice.NextDialogue); else DialogueEndedAndCloseDialogueUI(); - + break; case ChoiceActionType.doNothing : - if (choice.NextDialogue != null) - DisplayDialogueData(choice.NextDialogue); - else - DialogueEndedAndCloseDialogueUI(); - break; + if (choice.NextDialogue != null) + DisplayDialogueData(choice.NextDialogue); + else + DialogueEndedAndCloseDialogueUI(); + break; } - - + + } void DialogueEnded() { @@ -167,12 +167,12 @@ void DialogueEnded() } public void DialogueEndedAndCloseDialogueUI() { - + if (_endDialogue != null) _endDialogue.RaiseEvent(_currentDialogue); if (_closeDialogueUIEvent != null) _closeDialogueUIEvent.RaiseEvent(); - _gameState.ResetToPreviousGameState(); + _gameState.ResetToPreviousGameState(); _inputReader.advanceDialogueEvent -= OnAdvance; _inputReader.EnableGameplayInput(); diff --git a/UOP1_Project/Assets/Scripts/EditorTools/LightmapScaleSetter.cs b/UOP1_Project/Assets/Scripts/EditorTools/LightmapScaleSetter.cs index 424ee3d85f..b8c1edd729 100644 --- a/UOP1_Project/Assets/Scripts/EditorTools/LightmapScaleSetter.cs +++ b/UOP1_Project/Assets/Scripts/EditorTools/LightmapScaleSetter.cs @@ -4,7 +4,7 @@ public class LightmapScaleSetter : MonoBehaviour { - [SerializeField] private float _lightmapScale = 1f; + [SerializeField] private float _lightmapScale = 1f; #if UNITY_EDITOR // Called when the Lightmap Scale field is changed in the component editor diff --git a/UOP1_Project/Assets/Scripts/Events/ScriptableObjects/BoolEventChannelSO.cs b/UOP1_Project/Assets/Scripts/Events/ScriptableObjects/BoolEventChannelSO.cs index f2eabdfd91..802c882477 100644 --- a/UOP1_Project/Assets/Scripts/Events/ScriptableObjects/BoolEventChannelSO.cs +++ b/UOP1_Project/Assets/Scripts/Events/ScriptableObjects/BoolEventChannelSO.cs @@ -18,16 +18,16 @@ public void RaiseEvent(bool value) public void UnsubscribeAll() { if (OnEventRaised != null) - { + { if (OnEventRaised.GetInvocationList() != null) - + foreach (System.Delegate d in OnEventRaised.GetInvocationList()) { OnEventRaised -= d as UnityAction; } } - + } } diff --git a/UOP1_Project/Assets/Scripts/Gameplay/GameManager.cs b/UOP1_Project/Assets/Scripts/Gameplay/GameManager.cs index d8f5af4c54..813b96b81a 100644 --- a/UOP1_Project/Assets/Scripts/Gameplay/GameManager.cs +++ b/UOP1_Project/Assets/Scripts/Gameplay/GameManager.cs @@ -27,7 +27,7 @@ private void Start() } private void OnEnable() { - _addRockCandyRecipeEvent.OnEventRaised += AddRockCandyRecipe; + _addRockCandyRecipeEvent.OnEventRaised += AddRockCandyRecipe; } private void OnDisable() { @@ -41,16 +41,16 @@ void AddRockCandyRecipe() } // Start is called before the first frame update void StartGame() - { - _gameState.UpdateGameState(GameState.Gameplay); - _questManager.StartGame(); - } - public void PauseGame() { - } - public void UnpauseGame() - { - _gameState.ResetToPreviousGameState(); - } + _gameState.UpdateGameState(GameState.Gameplay); + _questManager.StartGame(); + } + public void PauseGame() + { + } + public void UnpauseGame() + { + _gameState.ResetToPreviousGameState(); + } } diff --git a/UOP1_Project/Assets/Scripts/Gameplay/GameStateSO.cs b/UOP1_Project/Assets/Scripts/Gameplay/GameStateSO.cs index 326e479305..138145f9b6 100644 --- a/UOP1_Project/Assets/Scripts/Gameplay/GameStateSO.cs +++ b/UOP1_Project/Assets/Scripts/Gameplay/GameStateSO.cs @@ -3,32 +3,32 @@ using UnityEngine; public enum GameState { -Gameplay,// regular state: player moves, attacks, can perform actions -Pause,// pause menu is opened, the whole game world is frozen -Inventory, //when inventory UI or cooking UI are open -Dialogue, -Cutscene, -LocationTransition,// when the character steps into LocationExit trigger, fade to black begins and control is removed from the player -Combat,//enemy is nearby and alert, player can't open Inventory or initiate dialogues, but can pause the game + Gameplay,// regular state: player moves, attacks, can perform actions + Pause,// pause menu is opened, the whole game world is frozen + Inventory, //when inventory UI or cooking UI are open + Dialogue, + Cutscene, + LocationTransition,// when the character steps into LocationExit trigger, fade to black begins and control is removed from the player + Combat,//enemy is nearby and alert, player can't open Inventory or initiate dialogues, but can pause the game } //[CreateAssetMenu(fileName = "GameState", menuName = "Gameplay/GameState", order = 51)] -public class GameStateSO : ScriptableObject +public class GameStateSO : ScriptableObject { - private GameState _currentGameState = default; - private GameState _previousGameState = default; - public GameState CurrentGameState => _currentGameState; + private GameState _currentGameState = default; + private GameState _previousGameState = default; + public GameState CurrentGameState => _currentGameState; - public void UpdateGameState( GameState newGameState) + public void UpdateGameState(GameState newGameState) { - _previousGameState = _currentGameState; - _currentGameState = newGameState; + _previousGameState = _currentGameState; + _currentGameState = newGameState; - } - public void ResetToPreviousGameState() - { - _currentGameState = _previousGameState; + } + public void ResetToPreviousGameState() + { + _currentGameState = _previousGameState; - } + } } diff --git a/UOP1_Project/Assets/Scripts/Gameplay/SpawnSystem.cs b/UOP1_Project/Assets/Scripts/Gameplay/SpawnSystem.cs index f46655e221..f1c4889d59 100644 --- a/UOP1_Project/Assets/Scripts/Gameplay/SpawnSystem.cs +++ b/UOP1_Project/Assets/Scripts/Gameplay/SpawnSystem.cs @@ -42,7 +42,7 @@ private Transform GetSpawnLocation() //Look for the element in the available LocationEntries that matches tha last PathSO taken int entranceIndex = Array.FindIndex(_spawnLocations, element => - element.EntrancePath == _pathTaken.lastPathTaken ); + element.EntrancePath == _pathTaken.lastPathTaken); if (entranceIndex == -1) { diff --git a/UOP1_Project/Assets/Scripts/Input/GameInput.cs b/UOP1_Project/Assets/Scripts/Input/GameInput.cs index 1fb90ec088..487409df9d 100644 --- a/UOP1_Project/Assets/Scripts/Input/GameInput.cs +++ b/UOP1_Project/Assets/Scripts/Input/GameInput.cs @@ -8,10 +8,10 @@ public class @GameInput : IInputActionCollection, IDisposable { - public InputActionAsset asset { get; } - public @GameInput() - { - asset = InputActionAsset.FromJson(@"{ + public InputActionAsset asset { get; } + public @GameInput() + { + asset = InputActionAsset.FromJson(@"{ ""name"": ""GameInput"", ""maps"": [ { @@ -1652,388 +1652,389 @@ public @GameInput() } ] }"); - // Gameplay - m_Gameplay = asset.FindActionMap("Gameplay", throwIfNotFound: true); - m_Gameplay_Move = m_Gameplay.FindAction("Move", throwIfNotFound: true); - m_Gameplay_Jump = m_Gameplay.FindAction("Jump", throwIfNotFound: true); - m_Gameplay_Attack = m_Gameplay.FindAction("Attack", throwIfNotFound: true); - m_Gameplay_Interact = m_Gameplay.FindAction("Interact", throwIfNotFound: true); - m_Gameplay_Pause = m_Gameplay.FindAction("Pause", throwIfNotFound: true); - m_Gameplay_OpenInventory = m_Gameplay.FindAction("OpenInventory", throwIfNotFound: true); - m_Gameplay_RotateCamera = m_Gameplay.FindAction("RotateCamera", throwIfNotFound: true); - m_Gameplay_MouseControlCamera = m_Gameplay.FindAction("MouseControlCamera", throwIfNotFound: true); - m_Gameplay_Run = m_Gameplay.FindAction("Run", throwIfNotFound: true); - // Menus - m_Menus = asset.FindActionMap("Menus", throwIfNotFound: true); - m_Menus_MoveSelection = m_Menus.FindAction("MoveSelection", throwIfNotFound: true); - m_Menus_Navigate = m_Menus.FindAction("Navigate", throwIfNotFound: true); - m_Menus_Submit = m_Menus.FindAction("Submit", throwIfNotFound: true); - m_Menus_Confirm = m_Menus.FindAction("Confirm", throwIfNotFound: true); - m_Menus_Cancel = m_Menus.FindAction("Cancel", throwIfNotFound: true); - m_Menus_MouseMove = m_Menus.FindAction("MouseMove", throwIfNotFound: true); - m_Menus_Unpause = m_Menus.FindAction("Unpause", throwIfNotFound: true); - m_Menus_ChangeTab = m_Menus.FindAction("ChangeTab", throwIfNotFound: true); - m_Menus_InventoryActionButton = m_Menus.FindAction("InventoryActionButton", throwIfNotFound: true); - m_Menus_Click = m_Menus.FindAction("Click", throwIfNotFound: true); - m_Menus_Point = m_Menus.FindAction("Point", throwIfNotFound: true); - m_Menus_RightClick = m_Menus.FindAction("RightClick", throwIfNotFound: true); - m_Menus_CloseInventory = m_Menus.FindAction("CloseInventory", throwIfNotFound: true); - // Dialogues - m_Dialogues = asset.FindActionMap("Dialogues", throwIfNotFound: true); - m_Dialogues_MoveSelection = m_Dialogues.FindAction("MoveSelection", throwIfNotFound: true); - m_Dialogues_AdvanceDialogue = m_Dialogues.FindAction("AdvanceDialogue", throwIfNotFound: true); - } + // Gameplay + m_Gameplay = asset.FindActionMap("Gameplay", throwIfNotFound: true); + m_Gameplay_Move = m_Gameplay.FindAction("Move", throwIfNotFound: true); + m_Gameplay_Jump = m_Gameplay.FindAction("Jump", throwIfNotFound: true); + m_Gameplay_Attack = m_Gameplay.FindAction("Attack", throwIfNotFound: true); + m_Gameplay_Interact = m_Gameplay.FindAction("Interact", throwIfNotFound: true); + m_Gameplay_Pause = m_Gameplay.FindAction("Pause", throwIfNotFound: true); + m_Gameplay_OpenInventory = m_Gameplay.FindAction("OpenInventory", throwIfNotFound: true); + m_Gameplay_RotateCamera = m_Gameplay.FindAction("RotateCamera", throwIfNotFound: true); + m_Gameplay_MouseControlCamera = m_Gameplay.FindAction("MouseControlCamera", throwIfNotFound: true); + m_Gameplay_Run = m_Gameplay.FindAction("Run", throwIfNotFound: true); + // Menus + m_Menus = asset.FindActionMap("Menus", throwIfNotFound: true); + m_Menus_MoveSelection = m_Menus.FindAction("MoveSelection", throwIfNotFound: true); + m_Menus_Navigate = m_Menus.FindAction("Navigate", throwIfNotFound: true); + m_Menus_Submit = m_Menus.FindAction("Submit", throwIfNotFound: true); + m_Menus_Confirm = m_Menus.FindAction("Confirm", throwIfNotFound: true); + m_Menus_Cancel = m_Menus.FindAction("Cancel", throwIfNotFound: true); + m_Menus_MouseMove = m_Menus.FindAction("MouseMove", throwIfNotFound: true); + m_Menus_Unpause = m_Menus.FindAction("Unpause", throwIfNotFound: true); + m_Menus_ChangeTab = m_Menus.FindAction("ChangeTab", throwIfNotFound: true); + m_Menus_InventoryActionButton = m_Menus.FindAction("InventoryActionButton", throwIfNotFound: true); + m_Menus_Click = m_Menus.FindAction("Click", throwIfNotFound: true); + m_Menus_Point = m_Menus.FindAction("Point", throwIfNotFound: true); + m_Menus_RightClick = m_Menus.FindAction("RightClick", throwIfNotFound: true); + m_Menus_CloseInventory = m_Menus.FindAction("CloseInventory", throwIfNotFound: true); + // Dialogues + m_Dialogues = asset.FindActionMap("Dialogues", throwIfNotFound: true); + m_Dialogues_MoveSelection = m_Dialogues.FindAction("MoveSelection", throwIfNotFound: true); + m_Dialogues_AdvanceDialogue = m_Dialogues.FindAction("AdvanceDialogue", throwIfNotFound: true); + } - public void Dispose() - { - UnityEngine.Object.Destroy(asset); - } + public void Dispose() + { + UnityEngine.Object.Destroy(asset); + } - public InputBinding? bindingMask - { - get => asset.bindingMask; - set => asset.bindingMask = value; - } + public InputBinding? bindingMask + { + get => asset.bindingMask; + set => asset.bindingMask = value; + } - public ReadOnlyArray? devices - { - get => asset.devices; - set => asset.devices = value; - } + public ReadOnlyArray? devices + { + get => asset.devices; + set => asset.devices = value; + } - public ReadOnlyArray controlSchemes => asset.controlSchemes; + public ReadOnlyArray controlSchemes => asset.controlSchemes; - public bool Contains(InputAction action) - { - return asset.Contains(action); - } + public bool Contains(InputAction action) + { + return asset.Contains(action); + } - public IEnumerator GetEnumerator() - { - return asset.GetEnumerator(); - } + public IEnumerator GetEnumerator() + { + return asset.GetEnumerator(); + } - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } - public void Enable() - { - asset.Enable(); - } + public void Enable() + { + asset.Enable(); + } - public void Disable() - { - asset.Disable(); - } + public void Disable() + { + asset.Disable(); + } - // Gameplay - private readonly InputActionMap m_Gameplay; - private IGameplayActions m_GameplayActionsCallbackInterface; - private readonly InputAction m_Gameplay_Move; - private readonly InputAction m_Gameplay_Jump; - private readonly InputAction m_Gameplay_Attack; - private readonly InputAction m_Gameplay_Interact; - private readonly InputAction m_Gameplay_Pause; - private readonly InputAction m_Gameplay_OpenInventory; - private readonly InputAction m_Gameplay_RotateCamera; - private readonly InputAction m_Gameplay_MouseControlCamera; - private readonly InputAction m_Gameplay_Run; - public struct GameplayActions - { - private @GameInput m_Wrapper; - public GameplayActions(@GameInput wrapper) { m_Wrapper = wrapper; } - public InputAction @Move => m_Wrapper.m_Gameplay_Move; - public InputAction @Jump => m_Wrapper.m_Gameplay_Jump; - public InputAction @Attack => m_Wrapper.m_Gameplay_Attack; - public InputAction @Interact => m_Wrapper.m_Gameplay_Interact; - public InputAction @Pause => m_Wrapper.m_Gameplay_Pause; - public InputAction @OpenInventory => m_Wrapper.m_Gameplay_OpenInventory; - public InputAction @RotateCamera => m_Wrapper.m_Gameplay_RotateCamera; - public InputAction @MouseControlCamera => m_Wrapper.m_Gameplay_MouseControlCamera; - public InputAction @Run => m_Wrapper.m_Gameplay_Run; - public InputActionMap Get() { return m_Wrapper.m_Gameplay; } - public void Enable() { Get().Enable(); } - public void Disable() { Get().Disable(); } - public bool enabled => Get().enabled; - public static implicit operator InputActionMap(GameplayActions set) { return set.Get(); } - public void SetCallbacks(IGameplayActions instance) - { - if (m_Wrapper.m_GameplayActionsCallbackInterface != null) - { - @Move.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove; - @Move.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove; - @Move.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove; - @Jump.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump; - @Jump.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump; - @Jump.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump; - @Attack.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnAttack; - @Attack.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnAttack; - @Attack.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnAttack; - @Interact.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnInteract; - @Interact.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnInteract; - @Interact.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnInteract; - @Pause.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause; - @Pause.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause; - @Pause.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause; - @OpenInventory.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnOpenInventory; - @OpenInventory.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnOpenInventory; - @OpenInventory.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnOpenInventory; - @RotateCamera.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRotateCamera; - @RotateCamera.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRotateCamera; - @RotateCamera.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRotateCamera; - @MouseControlCamera.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMouseControlCamera; - @MouseControlCamera.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMouseControlCamera; - @MouseControlCamera.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMouseControlCamera; - @Run.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRun; - @Run.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRun; - @Run.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRun; - } - m_Wrapper.m_GameplayActionsCallbackInterface = instance; - if (instance != null) - { - @Move.started += instance.OnMove; - @Move.performed += instance.OnMove; - @Move.canceled += instance.OnMove; - @Jump.started += instance.OnJump; - @Jump.performed += instance.OnJump; - @Jump.canceled += instance.OnJump; - @Attack.started += instance.OnAttack; - @Attack.performed += instance.OnAttack; - @Attack.canceled += instance.OnAttack; - @Interact.started += instance.OnInteract; - @Interact.performed += instance.OnInteract; - @Interact.canceled += instance.OnInteract; - @Pause.started += instance.OnPause; - @Pause.performed += instance.OnPause; - @Pause.canceled += instance.OnPause; - @OpenInventory.started += instance.OnOpenInventory; - @OpenInventory.performed += instance.OnOpenInventory; - @OpenInventory.canceled += instance.OnOpenInventory; - @RotateCamera.started += instance.OnRotateCamera; - @RotateCamera.performed += instance.OnRotateCamera; - @RotateCamera.canceled += instance.OnRotateCamera; - @MouseControlCamera.started += instance.OnMouseControlCamera; - @MouseControlCamera.performed += instance.OnMouseControlCamera; - @MouseControlCamera.canceled += instance.OnMouseControlCamera; - @Run.started += instance.OnRun; - @Run.performed += instance.OnRun; - @Run.canceled += instance.OnRun; - } - } - } - public GameplayActions @Gameplay => new GameplayActions(this); + // Gameplay + private readonly InputActionMap m_Gameplay; + private IGameplayActions m_GameplayActionsCallbackInterface; + private readonly InputAction m_Gameplay_Move; + private readonly InputAction m_Gameplay_Jump; + private readonly InputAction m_Gameplay_Attack; + private readonly InputAction m_Gameplay_Interact; + private readonly InputAction m_Gameplay_Pause; + private readonly InputAction m_Gameplay_OpenInventory; + private readonly InputAction m_Gameplay_RotateCamera; + private readonly InputAction m_Gameplay_MouseControlCamera; + private readonly InputAction m_Gameplay_Run; + public struct GameplayActions + { + private @GameInput m_Wrapper; + public GameplayActions(@GameInput wrapper) { m_Wrapper = wrapper; } + public InputAction @Move => m_Wrapper.m_Gameplay_Move; + public InputAction @Jump => m_Wrapper.m_Gameplay_Jump; + public InputAction @Attack => m_Wrapper.m_Gameplay_Attack; + public InputAction @Interact => m_Wrapper.m_Gameplay_Interact; + public InputAction @Pause => m_Wrapper.m_Gameplay_Pause; + public InputAction @OpenInventory => m_Wrapper.m_Gameplay_OpenInventory; + public InputAction @RotateCamera => m_Wrapper.m_Gameplay_RotateCamera; + public InputAction @MouseControlCamera => m_Wrapper.m_Gameplay_MouseControlCamera; + public InputAction @Run => m_Wrapper.m_Gameplay_Run; + public InputActionMap Get() { return m_Wrapper.m_Gameplay; } + public void Enable() { Get().Enable(); } + public void Disable() { Get().Disable(); } + public bool enabled => Get().enabled; + public static implicit operator InputActionMap(GameplayActions set) { return set.Get(); } + public void SetCallbacks(IGameplayActions instance) + { + if (m_Wrapper.m_GameplayActionsCallbackInterface != null) + { + @Move.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove; + @Move.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove; + @Move.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove; + @Jump.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump; + @Jump.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump; + @Jump.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump; + @Attack.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnAttack; + @Attack.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnAttack; + @Attack.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnAttack; + @Interact.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnInteract; + @Interact.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnInteract; + @Interact.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnInteract; + @Pause.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause; + @Pause.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause; + @Pause.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause; + @OpenInventory.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnOpenInventory; + @OpenInventory.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnOpenInventory; + @OpenInventory.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnOpenInventory; + @RotateCamera.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRotateCamera; + @RotateCamera.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRotateCamera; + @RotateCamera.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRotateCamera; + @MouseControlCamera.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMouseControlCamera; + @MouseControlCamera.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMouseControlCamera; + @MouseControlCamera.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMouseControlCamera; + @Run.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRun; + @Run.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRun; + @Run.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnRun; + } + m_Wrapper.m_GameplayActionsCallbackInterface = instance; + if (instance != null) + { + @Move.started += instance.OnMove; + @Move.performed += instance.OnMove; + @Move.canceled += instance.OnMove; + @Jump.started += instance.OnJump; + @Jump.performed += instance.OnJump; + @Jump.canceled += instance.OnJump; + @Attack.started += instance.OnAttack; + @Attack.performed += instance.OnAttack; + @Attack.canceled += instance.OnAttack; + @Interact.started += instance.OnInteract; + @Interact.performed += instance.OnInteract; + @Interact.canceled += instance.OnInteract; + @Pause.started += instance.OnPause; + @Pause.performed += instance.OnPause; + @Pause.canceled += instance.OnPause; + @OpenInventory.started += instance.OnOpenInventory; + @OpenInventory.performed += instance.OnOpenInventory; + @OpenInventory.canceled += instance.OnOpenInventory; + @RotateCamera.started += instance.OnRotateCamera; + @RotateCamera.performed += instance.OnRotateCamera; + @RotateCamera.canceled += instance.OnRotateCamera; + @MouseControlCamera.started += instance.OnMouseControlCamera; + @MouseControlCamera.performed += instance.OnMouseControlCamera; + @MouseControlCamera.canceled += instance.OnMouseControlCamera; + @Run.started += instance.OnRun; + @Run.performed += instance.OnRun; + @Run.canceled += instance.OnRun; + } + } + } + public GameplayActions @Gameplay => new GameplayActions(this); - // Menus - private readonly InputActionMap m_Menus; - private IMenusActions m_MenusActionsCallbackInterface; - private readonly InputAction m_Menus_MoveSelection; - private readonly InputAction m_Menus_Navigate; - private readonly InputAction m_Menus_Submit; - private readonly InputAction m_Menus_Confirm; - private readonly InputAction m_Menus_Cancel; - private readonly InputAction m_Menus_MouseMove; - private readonly InputAction m_Menus_Unpause; - private readonly InputAction m_Menus_ChangeTab; - private readonly InputAction m_Menus_InventoryActionButton; - private readonly InputAction m_Menus_Click; - private readonly InputAction m_Menus_Point; - private readonly InputAction m_Menus_RightClick; - private readonly InputAction m_Menus_CloseInventory; - public struct MenusActions - { - private @GameInput m_Wrapper; - public MenusActions(@GameInput wrapper) { m_Wrapper = wrapper; } - public InputAction @MoveSelection => m_Wrapper.m_Menus_MoveSelection; - public InputAction @Navigate => m_Wrapper.m_Menus_Navigate; - public InputAction @Submit => m_Wrapper.m_Menus_Submit; - public InputAction @Confirm => m_Wrapper.m_Menus_Confirm; - public InputAction @Cancel => m_Wrapper.m_Menus_Cancel; - public InputAction @MouseMove => m_Wrapper.m_Menus_MouseMove; - public InputAction @Unpause => m_Wrapper.m_Menus_Unpause; - public InputAction @ChangeTab => m_Wrapper.m_Menus_ChangeTab; - public InputAction @InventoryActionButton => m_Wrapper.m_Menus_InventoryActionButton; - public InputAction @Click => m_Wrapper.m_Menus_Click; - public InputAction @Point => m_Wrapper.m_Menus_Point; - public InputAction @RightClick => m_Wrapper.m_Menus_RightClick; - public InputAction @CloseInventory => m_Wrapper.m_Menus_CloseInventory; - public InputActionMap Get() { return m_Wrapper.m_Menus; } - public void Enable() { Get().Enable(); } - public void Disable() { Get().Disable(); } - public bool enabled => Get().enabled; - public static implicit operator InputActionMap(MenusActions set) { return set.Get(); } - public void SetCallbacks(IMenusActions instance) - { - if (m_Wrapper.m_MenusActionsCallbackInterface != null) - { - @MoveSelection.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnMoveSelection; - @MoveSelection.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnMoveSelection; - @MoveSelection.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnMoveSelection; - @Navigate.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnNavigate; - @Navigate.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnNavigate; - @Navigate.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnNavigate; - @Submit.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnSubmit; - @Submit.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnSubmit; - @Submit.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnSubmit; - @Confirm.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnConfirm; - @Confirm.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnConfirm; - @Confirm.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnConfirm; - @Cancel.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnCancel; - @Cancel.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnCancel; - @Cancel.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnCancel; - @MouseMove.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnMouseMove; - @MouseMove.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnMouseMove; - @MouseMove.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnMouseMove; - @Unpause.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnUnpause; - @Unpause.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnUnpause; - @Unpause.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnUnpause; - @ChangeTab.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnChangeTab; - @ChangeTab.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnChangeTab; - @ChangeTab.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnChangeTab; - @InventoryActionButton.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnInventoryActionButton; - @InventoryActionButton.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnInventoryActionButton; - @InventoryActionButton.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnInventoryActionButton; - @Click.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnClick; - @Click.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnClick; - @Click.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnClick; - @Point.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnPoint; - @Point.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnPoint; - @Point.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnPoint; - @RightClick.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnRightClick; - @RightClick.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnRightClick; - @RightClick.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnRightClick; - @CloseInventory.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnCloseInventory; - @CloseInventory.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnCloseInventory; - @CloseInventory.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnCloseInventory; - } - m_Wrapper.m_MenusActionsCallbackInterface = instance; - if (instance != null) - { - @MoveSelection.started += instance.OnMoveSelection; - @MoveSelection.performed += instance.OnMoveSelection; - @MoveSelection.canceled += instance.OnMoveSelection; - @Navigate.started += instance.OnNavigate; - @Navigate.performed += instance.OnNavigate; - @Navigate.canceled += instance.OnNavigate; - @Submit.started += instance.OnSubmit; - @Submit.performed += instance.OnSubmit; - @Submit.canceled += instance.OnSubmit; - @Confirm.started += instance.OnConfirm; - @Confirm.performed += instance.OnConfirm; - @Confirm.canceled += instance.OnConfirm; - @Cancel.started += instance.OnCancel; - @Cancel.performed += instance.OnCancel; - @Cancel.canceled += instance.OnCancel; - @MouseMove.started += instance.OnMouseMove; - @MouseMove.performed += instance.OnMouseMove; - @MouseMove.canceled += instance.OnMouseMove; - @Unpause.started += instance.OnUnpause; - @Unpause.performed += instance.OnUnpause; - @Unpause.canceled += instance.OnUnpause; - @ChangeTab.started += instance.OnChangeTab; - @ChangeTab.performed += instance.OnChangeTab; - @ChangeTab.canceled += instance.OnChangeTab; - @InventoryActionButton.started += instance.OnInventoryActionButton; - @InventoryActionButton.performed += instance.OnInventoryActionButton; - @InventoryActionButton.canceled += instance.OnInventoryActionButton; - @Click.started += instance.OnClick; - @Click.performed += instance.OnClick; - @Click.canceled += instance.OnClick; - @Point.started += instance.OnPoint; - @Point.performed += instance.OnPoint; - @Point.canceled += instance.OnPoint; - @RightClick.started += instance.OnRightClick; - @RightClick.performed += instance.OnRightClick; - @RightClick.canceled += instance.OnRightClick; - @CloseInventory.started += instance.OnCloseInventory; - @CloseInventory.performed += instance.OnCloseInventory; - @CloseInventory.canceled += instance.OnCloseInventory; - } - } - } - public MenusActions @Menus => new MenusActions(this); + // Menus + private readonly InputActionMap m_Menus; + private IMenusActions m_MenusActionsCallbackInterface; + private readonly InputAction m_Menus_MoveSelection; + private readonly InputAction m_Menus_Navigate; + private readonly InputAction m_Menus_Submit; + private readonly InputAction m_Menus_Confirm; + private readonly InputAction m_Menus_Cancel; + private readonly InputAction m_Menus_MouseMove; + private readonly InputAction m_Menus_Unpause; + private readonly InputAction m_Menus_ChangeTab; + private readonly InputAction m_Menus_InventoryActionButton; + private readonly InputAction m_Menus_Click; + private readonly InputAction m_Menus_Point; + private readonly InputAction m_Menus_RightClick; + private readonly InputAction m_Menus_CloseInventory; + public struct MenusActions + { + private @GameInput m_Wrapper; + public MenusActions(@GameInput wrapper) { m_Wrapper = wrapper; } + public InputAction @MoveSelection => m_Wrapper.m_Menus_MoveSelection; + public InputAction @Navigate => m_Wrapper.m_Menus_Navigate; + public InputAction @Submit => m_Wrapper.m_Menus_Submit; + public InputAction @Confirm => m_Wrapper.m_Menus_Confirm; + public InputAction @Cancel => m_Wrapper.m_Menus_Cancel; + public InputAction @MouseMove => m_Wrapper.m_Menus_MouseMove; + public InputAction @Unpause => m_Wrapper.m_Menus_Unpause; + public InputAction @ChangeTab => m_Wrapper.m_Menus_ChangeTab; + public InputAction @InventoryActionButton => m_Wrapper.m_Menus_InventoryActionButton; + public InputAction @Click => m_Wrapper.m_Menus_Click; + public InputAction @Point => m_Wrapper.m_Menus_Point; + public InputAction @RightClick => m_Wrapper.m_Menus_RightClick; + public InputAction @CloseInventory => m_Wrapper.m_Menus_CloseInventory; + public InputActionMap Get() { return m_Wrapper.m_Menus; } + public void Enable() { Get().Enable(); } + public void Disable() { Get().Disable(); } + public bool enabled => Get().enabled; + public static implicit operator InputActionMap(MenusActions set) { return set.Get(); } + public void SetCallbacks(IMenusActions instance) + { + if (m_Wrapper.m_MenusActionsCallbackInterface != null) + { + @MoveSelection.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnMoveSelection; + @MoveSelection.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnMoveSelection; + @MoveSelection.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnMoveSelection; + @Navigate.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnNavigate; + @Navigate.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnNavigate; + @Navigate.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnNavigate; + @Submit.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnSubmit; + @Submit.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnSubmit; + @Submit.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnSubmit; + @Confirm.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnConfirm; + @Confirm.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnConfirm; + @Confirm.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnConfirm; + @Cancel.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnCancel; + @Cancel.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnCancel; + @Cancel.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnCancel; + @MouseMove.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnMouseMove; + @MouseMove.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnMouseMove; + @MouseMove.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnMouseMove; + @Unpause.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnUnpause; + @Unpause.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnUnpause; + @Unpause.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnUnpause; + @ChangeTab.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnChangeTab; + @ChangeTab.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnChangeTab; + @ChangeTab.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnChangeTab; + @InventoryActionButton.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnInventoryActionButton; + @InventoryActionButton.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnInventoryActionButton; + @InventoryActionButton.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnInventoryActionButton; + @Click.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnClick; + @Click.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnClick; + @Click.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnClick; + @Point.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnPoint; + @Point.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnPoint; + @Point.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnPoint; + @RightClick.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnRightClick; + @RightClick.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnRightClick; + @RightClick.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnRightClick; + @CloseInventory.started -= m_Wrapper.m_MenusActionsCallbackInterface.OnCloseInventory; + @CloseInventory.performed -= m_Wrapper.m_MenusActionsCallbackInterface.OnCloseInventory; + @CloseInventory.canceled -= m_Wrapper.m_MenusActionsCallbackInterface.OnCloseInventory; + } + m_Wrapper.m_MenusActionsCallbackInterface = instance; + if (instance != null) + { + @MoveSelection.started += instance.OnMoveSelection; + @MoveSelection.performed += instance.OnMoveSelection; + @MoveSelection.canceled += instance.OnMoveSelection; + @Navigate.started += instance.OnNavigate; + @Navigate.performed += instance.OnNavigate; + @Navigate.canceled += instance.OnNavigate; + @Submit.started += instance.OnSubmit; + @Submit.performed += instance.OnSubmit; + @Submit.canceled += instance.OnSubmit; + @Confirm.started += instance.OnConfirm; + @Confirm.performed += instance.OnConfirm; + @Confirm.canceled += instance.OnConfirm; + @Cancel.started += instance.OnCancel; + @Cancel.performed += instance.OnCancel; + @Cancel.canceled += instance.OnCancel; + @MouseMove.started += instance.OnMouseMove; + @MouseMove.performed += instance.OnMouseMove; + @MouseMove.canceled += instance.OnMouseMove; + @Unpause.started += instance.OnUnpause; + @Unpause.performed += instance.OnUnpause; + @Unpause.canceled += instance.OnUnpause; + @ChangeTab.started += instance.OnChangeTab; + @ChangeTab.performed += instance.OnChangeTab; + @ChangeTab.canceled += instance.OnChangeTab; + @InventoryActionButton.started += instance.OnInventoryActionButton; + @InventoryActionButton.performed += instance.OnInventoryActionButton; + @InventoryActionButton.canceled += instance.OnInventoryActionButton; + @Click.started += instance.OnClick; + @Click.performed += instance.OnClick; + @Click.canceled += instance.OnClick; + @Point.started += instance.OnPoint; + @Point.performed += instance.OnPoint; + @Point.canceled += instance.OnPoint; + @RightClick.started += instance.OnRightClick; + @RightClick.performed += instance.OnRightClick; + @RightClick.canceled += instance.OnRightClick; + @CloseInventory.started += instance.OnCloseInventory; + @CloseInventory.performed += instance.OnCloseInventory; + @CloseInventory.canceled += instance.OnCloseInventory; + } + } + } + public MenusActions @Menus => new MenusActions(this); - // Dialogues - private readonly InputActionMap m_Dialogues; - private IDialoguesActions m_DialoguesActionsCallbackInterface; - private readonly InputAction m_Dialogues_MoveSelection; - private readonly InputAction m_Dialogues_AdvanceDialogue; - public struct DialoguesActions - { - private @GameInput m_Wrapper; - public DialoguesActions(@GameInput wrapper) { m_Wrapper = wrapper; } - public InputAction @MoveSelection => m_Wrapper.m_Dialogues_MoveSelection; - public InputAction @AdvanceDialogue => m_Wrapper.m_Dialogues_AdvanceDialogue; - public InputActionMap Get() { return m_Wrapper.m_Dialogues; } - public void Enable() { Get().Enable(); } - public void Disable() { Get().Disable(); } - public bool enabled => Get().enabled; - public static implicit operator InputActionMap(DialoguesActions set) { return set.Get(); } - public void SetCallbacks(IDialoguesActions instance) - { - if (m_Wrapper.m_DialoguesActionsCallbackInterface != null) - { - @MoveSelection.started -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnMoveSelection; - @MoveSelection.performed -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnMoveSelection; - @MoveSelection.canceled -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnMoveSelection; - @AdvanceDialogue.started -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnAdvanceDialogue; - @AdvanceDialogue.performed -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnAdvanceDialogue; - @AdvanceDialogue.canceled -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnAdvanceDialogue; - } - m_Wrapper.m_DialoguesActionsCallbackInterface = instance; - if (instance != null) - { - @MoveSelection.started += instance.OnMoveSelection; - @MoveSelection.performed += instance.OnMoveSelection; - @MoveSelection.canceled += instance.OnMoveSelection; - @AdvanceDialogue.started += instance.OnAdvanceDialogue; - @AdvanceDialogue.performed += instance.OnAdvanceDialogue; - @AdvanceDialogue.canceled += instance.OnAdvanceDialogue; - } - } - } - public DialoguesActions @Dialogues => new DialoguesActions(this); - private int m_KeyboardOrGamepadSchemeIndex = -1; - public InputControlScheme KeyboardOrGamepadScheme - { - get - { - if (m_KeyboardOrGamepadSchemeIndex == -1) m_KeyboardOrGamepadSchemeIndex = asset.FindControlSchemeIndex("KeyboardOrGamepad"); - return asset.controlSchemes[m_KeyboardOrGamepadSchemeIndex]; - } - } - public interface IGameplayActions - { - void OnMove(InputAction.CallbackContext context); - void OnJump(InputAction.CallbackContext context); - void OnAttack(InputAction.CallbackContext context); - void OnInteract(InputAction.CallbackContext context); - void OnPause(InputAction.CallbackContext context); - void OnOpenInventory(InputAction.CallbackContext context); - void OnRotateCamera(InputAction.CallbackContext context); - void OnMouseControlCamera(InputAction.CallbackContext context); - void OnRun(InputAction.CallbackContext context); - } - public interface IMenusActions - { - void OnMoveSelection(InputAction.CallbackContext context); - void OnNavigate(InputAction.CallbackContext context); - void OnSubmit(InputAction.CallbackContext context); - void OnConfirm(InputAction.CallbackContext context); - void OnCancel(InputAction.CallbackContext context); - void OnMouseMove(InputAction.CallbackContext context); - void OnUnpause(InputAction.CallbackContext context); - void OnChangeTab(InputAction.CallbackContext context); - void OnInventoryActionButton(InputAction.CallbackContext context); - void OnClick(InputAction.CallbackContext context); - void OnPoint(InputAction.CallbackContext context); - void OnRightClick(InputAction.CallbackContext context); - void OnCloseInventory(InputAction.CallbackContext context); - } - public interface IDialoguesActions - { - void OnMoveSelection(InputAction.CallbackContext context); - void OnAdvanceDialogue(InputAction.CallbackContext context); - } + // Dialogues + private readonly InputActionMap m_Dialogues; + private IDialoguesActions m_DialoguesActionsCallbackInterface; + private readonly InputAction m_Dialogues_MoveSelection; + private readonly InputAction m_Dialogues_AdvanceDialogue; + public struct DialoguesActions + { + private @GameInput m_Wrapper; + public DialoguesActions(@GameInput wrapper) { m_Wrapper = wrapper; } + public InputAction @MoveSelection => m_Wrapper.m_Dialogues_MoveSelection; + public InputAction @AdvanceDialogue => m_Wrapper.m_Dialogues_AdvanceDialogue; + public InputActionMap Get() { return m_Wrapper.m_Dialogues; } + public void Enable() { Get().Enable(); } + public void Disable() { Get().Disable(); } + public bool enabled => Get().enabled; + public static implicit operator InputActionMap(DialoguesActions set) { return set.Get(); } + public void SetCallbacks(IDialoguesActions instance) + { + if (m_Wrapper.m_DialoguesActionsCallbackInterface != null) + { + @MoveSelection.started -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnMoveSelection; + @MoveSelection.performed -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnMoveSelection; + @MoveSelection.canceled -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnMoveSelection; + @AdvanceDialogue.started -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnAdvanceDialogue; + @AdvanceDialogue.performed -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnAdvanceDialogue; + @AdvanceDialogue.canceled -= m_Wrapper.m_DialoguesActionsCallbackInterface.OnAdvanceDialogue; + } + m_Wrapper.m_DialoguesActionsCallbackInterface = instance; + if (instance != null) + { + @MoveSelection.started += instance.OnMoveSelection; + @MoveSelection.performed += instance.OnMoveSelection; + @MoveSelection.canceled += instance.OnMoveSelection; + @AdvanceDialogue.started += instance.OnAdvanceDialogue; + @AdvanceDialogue.performed += instance.OnAdvanceDialogue; + @AdvanceDialogue.canceled += instance.OnAdvanceDialogue; + } + } + } + public DialoguesActions @Dialogues => new DialoguesActions(this); + private int m_KeyboardOrGamepadSchemeIndex = -1; + public InputControlScheme KeyboardOrGamepadScheme + { + get + { + if (m_KeyboardOrGamepadSchemeIndex == -1) + m_KeyboardOrGamepadSchemeIndex = asset.FindControlSchemeIndex("KeyboardOrGamepad"); + return asset.controlSchemes[m_KeyboardOrGamepadSchemeIndex]; + } + } + public interface IGameplayActions + { + void OnMove(InputAction.CallbackContext context); + void OnJump(InputAction.CallbackContext context); + void OnAttack(InputAction.CallbackContext context); + void OnInteract(InputAction.CallbackContext context); + void OnPause(InputAction.CallbackContext context); + void OnOpenInventory(InputAction.CallbackContext context); + void OnRotateCamera(InputAction.CallbackContext context); + void OnMouseControlCamera(InputAction.CallbackContext context); + void OnRun(InputAction.CallbackContext context); + } + public interface IMenusActions + { + void OnMoveSelection(InputAction.CallbackContext context); + void OnNavigate(InputAction.CallbackContext context); + void OnSubmit(InputAction.CallbackContext context); + void OnConfirm(InputAction.CallbackContext context); + void OnCancel(InputAction.CallbackContext context); + void OnMouseMove(InputAction.CallbackContext context); + void OnUnpause(InputAction.CallbackContext context); + void OnChangeTab(InputAction.CallbackContext context); + void OnInventoryActionButton(InputAction.CallbackContext context); + void OnClick(InputAction.CallbackContext context); + void OnPoint(InputAction.CallbackContext context); + void OnRightClick(InputAction.CallbackContext context); + void OnCloseInventory(InputAction.CallbackContext context); + } + public interface IDialoguesActions + { + void OnMoveSelection(InputAction.CallbackContext context); + void OnAdvanceDialogue(InputAction.CallbackContext context); + } } diff --git a/UOP1_Project/Assets/Scripts/Inventory/ScriptableObjects/InventorySO.cs b/UOP1_Project/Assets/Scripts/Inventory/ScriptableObjects/InventorySO.cs index 4f75ebb4d2..0c69e81e99 100644 --- a/UOP1_Project/Assets/Scripts/Inventory/ScriptableObjects/InventorySO.cs +++ b/UOP1_Project/Assets/Scripts/Inventory/ScriptableObjects/InventorySO.cs @@ -87,7 +87,7 @@ public int Count(ItemSO item) public bool[] IngredientsAvailability(List ingredients) { if (ingredients == null) - return null; + return null; bool[] availabilityArray = new bool[ingredients.Count]; for (int i = 0; i < ingredients.Count; i++) @@ -110,14 +110,14 @@ public bool hasIngredients(List ingredients) } public void Init() { - if(_items == null) + if (_items == null) { - _items = new List(); + _items = new List(); } _items.Clear(); foreach (ItemStack item in _defaultItems) { - _items.Add(item); + _items.Add(item); } } diff --git a/UOP1_Project/Assets/Scripts/Inventory/ScriptableObjects/ItemSO.cs b/UOP1_Project/Assets/Scripts/Inventory/ScriptableObjects/ItemSO.cs index 0b6fa84262..da8281e848 100644 --- a/UOP1_Project/Assets/Scripts/Inventory/ScriptableObjects/ItemSO.cs +++ b/UOP1_Project/Assets/Scripts/Inventory/ScriptableObjects/ItemSO.cs @@ -32,7 +32,7 @@ public class ItemSO : SerializableScriptableObject public LocalizedString Description => _description; public ItemTypeSO ItemType => _itemType; public GameObject Prefab => _prefab; - public virtual List IngredientsList { get;} + public virtual List IngredientsList { get; } public virtual ItemSO ResultingDish { get; } public virtual bool IsLocalized { get; } diff --git a/UOP1_Project/Assets/Scripts/Inventory/ScriptableObjects/LocalizedItemSO.cs b/UOP1_Project/Assets/Scripts/Inventory/ScriptableObjects/LocalizedItemSO.cs index 59588b0797..8a6ab52e81 100644 --- a/UOP1_Project/Assets/Scripts/Inventory/ScriptableObjects/LocalizedItemSO.cs +++ b/UOP1_Project/Assets/Scripts/Inventory/ScriptableObjects/LocalizedItemSO.cs @@ -9,7 +9,7 @@ public class LocalizedItemSO : ItemSO [SerializeField] - private bool _isLocalized = false; + private bool _isLocalized = false; [SerializeField] private LocalizedSprite _localizePreviewImage = default; diff --git a/UOP1_Project/Assets/Scripts/Menu/MultiInputButton.cs b/UOP1_Project/Assets/Scripts/Menu/MultiInputButton.cs index 29a3bd7f4f..c05b810cea 100644 --- a/UOP1_Project/Assets/Scripts/Menu/MultiInputButton.cs +++ b/UOP1_Project/Assets/Scripts/Menu/MultiInputButton.cs @@ -36,7 +36,7 @@ public void UpdateSelected() { if (_menuSelectionHandler == null) _menuSelectionHandler = transform.root.gameObject.GetComponentInChildren(); - + _menuSelectionHandler.UpdateSelection(gameObject); } diff --git a/UOP1_Project/Assets/Scripts/Quests/Editor/QuestEditorWindow.cs b/UOP1_Project/Assets/Scripts/Quests/Editor/QuestEditorWindow.cs index cd33f3db21..408fa147cd 100644 --- a/UOP1_Project/Assets/Scripts/Quests/Editor/QuestEditorWindow.cs +++ b/UOP1_Project/Assets/Scripts/Quests/Editor/QuestEditorWindow.cs @@ -15,9 +15,9 @@ public enum selectionType } public class QuestEditorWindow : EditorWindow { - private StepSO _currentSelectedStep=default; - private QuestSO _currentSeletedQuest=default; - private QuestlineSO _currentSelectedQuestLine=default; + private StepSO _currentSelectedStep = default; + private QuestSO _currentSeletedQuest = default; + private QuestlineSO _currentSelectedQuestLine = default; private int _idQuestlineSelected = default; private int _idQuestSelected = default; private int _idStepSelected = default; @@ -26,38 +26,38 @@ public class QuestEditorWindow : EditorWindow public static void ShowWindow() { QuestEditorWindow wnd = GetWindow(); - wnd.titleContent = new GUIContent("QuestEditorWindow"); - - // Sets a minimum size to the window. + wnd.titleContent = new GUIContent("QuestEditorWindow"); + + // Sets a minimum size to the window. wnd.minSize = new Vector2(250, 250); } public static void ShowArtistToolWindow() - { - // Opens the window, otherwise focuses it if it’s already open. - QuestEditorWindow window = GetWindow(); - // Adds a title to the window. - - - window.titleContent = new GUIContent("QuestEditorWindow"); - - // Sets a minimum size to the window. - window.minSize = new Vector2(250, 250); - - //window.SetTool(); + { + // Opens the window, otherwise focuses it if it’s already open. + QuestEditorWindow window = GetWindow(); + // Adds a title to the window. + + + window.titleContent = new GUIContent("QuestEditorWindow"); + + // Sets a minimum size to the window. + window.minSize = new Vector2(250, 250); + + //window.SetTool(); } public void CreateGUI() { - VisualElement root = rootVisualElement; - - // Import UXML + VisualElement root = rootVisualElement; + + // Import UXML var visualTree = Resources.Load("QuestEditorWindow"); - root.Add(visualTree.CloneTree()); - - //Import USS + root.Add(visualTree.CloneTree()); + + //Import USS var styleSheet = Resources.Load("QuestEditorWindow"); - root.styleSheets.Add(styleSheet); - - //Register button event + root.styleSheets.Add(styleSheet); + + //Register button event Button refreshQuestPreviewBtn = root.Q