Moved from swarm to NavMesh - need to fix the enemy navigation! Review the animation controller to see if anything is being triggered.
This commit is contained in:
@@ -172,6 +172,15 @@ public partial class @Controls: IInputActionCollection2, IDisposable
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""Repair"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""ebf1fc31-ad4a-479b-89a7-8002e36f95bf"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
@@ -471,6 +480,28 @@ public partial class @Controls: IInputActionCollection2, IDisposable
|
||||
""action"": ""Attack"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""627e81c9-a30c-497f-bbed-cfdc79f3a0f8"",
|
||||
""path"": ""<Keyboard>/r"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": "";Keyboard and Mouse"",
|
||||
""action"": ""Repair"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""d59edd54-8ff7-49e2-b568-6b6983bc7e6a"",
|
||||
""path"": ""<Gamepad>/buttonEast"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": "";Gamepad"",
|
||||
""action"": ""Repair"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -516,6 +547,7 @@ public partial class @Controls: IInputActionCollection2, IDisposable
|
||||
m_Player_Crouch = m_Player.FindAction("Crouch", throwIfNotFound: true);
|
||||
m_Player_LockOn = m_Player.FindAction("LockOn", throwIfNotFound: true);
|
||||
m_Player_Attack = m_Player.FindAction("Attack", throwIfNotFound: true);
|
||||
m_Player_Repair = m_Player.FindAction("Repair", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
~@Controls()
|
||||
@@ -605,6 +637,7 @@ public partial class @Controls: IInputActionCollection2, IDisposable
|
||||
private readonly InputAction m_Player_Crouch;
|
||||
private readonly InputAction m_Player_LockOn;
|
||||
private readonly InputAction m_Player_Attack;
|
||||
private readonly InputAction m_Player_Repair;
|
||||
/// <summary>
|
||||
/// Provides access to input actions defined in input action map "Player".
|
||||
/// </summary>
|
||||
@@ -653,6 +686,10 @@ public partial class @Controls: IInputActionCollection2, IDisposable
|
||||
/// </summary>
|
||||
public InputAction @Attack => m_Wrapper.m_Player_Attack;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/Repair".
|
||||
/// </summary>
|
||||
public InputAction @Repair => m_Wrapper.m_Player_Repair;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action map instance.
|
||||
/// </summary>
|
||||
public InputActionMap Get() { return m_Wrapper.m_Player; }
|
||||
@@ -705,6 +742,9 @@ public partial class @Controls: IInputActionCollection2, IDisposable
|
||||
@Attack.started += instance.OnAttack;
|
||||
@Attack.performed += instance.OnAttack;
|
||||
@Attack.canceled += instance.OnAttack;
|
||||
@Repair.started += instance.OnRepair;
|
||||
@Repair.performed += instance.OnRepair;
|
||||
@Repair.canceled += instance.OnRepair;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -743,6 +783,9 @@ public partial class @Controls: IInputActionCollection2, IDisposable
|
||||
@Attack.started -= instance.OnAttack;
|
||||
@Attack.performed -= instance.OnAttack;
|
||||
@Attack.canceled -= instance.OnAttack;
|
||||
@Repair.started -= instance.OnRepair;
|
||||
@Repair.performed -= instance.OnRepair;
|
||||
@Repair.canceled -= instance.OnRepair;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -872,5 +915,12 @@ public partial class @Controls: IInputActionCollection2, IDisposable
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnAttack(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "Repair" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnRepair(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,15 @@
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Repair",
|
||||
"type": "Button",
|
||||
"id": "ebf1fc31-ad4a-479b-89a7-8002e36f95bf",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
@@ -385,6 +394,28 @@
|
||||
"action": "Attack",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "627e81c9-a30c-497f-bbed-cfdc79f3a0f8",
|
||||
"path": "<Keyboard>/r",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard and Mouse",
|
||||
"action": "Repair",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "d59edd54-8ff7-49e2-b568-6b6983bc7e6a",
|
||||
"path": "<Gamepad>/buttonEast",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Repair",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace Synty.AnimationBaseLocomotion.Samples.InputSystem
|
||||
public Action onSprintDeactivated;
|
||||
|
||||
public Action onWalkToggled;
|
||||
public Action onRepairActivated;
|
||||
public Action onRepairDeactivated;
|
||||
|
||||
/// <inheritdoc cref="OnEnable" />
|
||||
private void OnEnable()
|
||||
@@ -182,5 +184,18 @@ namespace Synty.AnimationBaseLocomotion.Samples.InputSystem
|
||||
onAttackPerformed?.Invoke();
|
||||
}
|
||||
|
||||
public void OnRepair(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.started)
|
||||
{
|
||||
// Broadcast to any script listening that the repair button was pressed
|
||||
onRepairActivated?.Invoke();
|
||||
}
|
||||
else if (context.canceled)
|
||||
{
|
||||
// Broadcast that the button was released
|
||||
onRepairDeactivated?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user