added enemy dead animation

This commit is contained in:
Mausham
2025-12-30 17:51:20 -08:00
parent 0ec69f66c9
commit b59d12631f
16 changed files with 41248 additions and 54 deletions

View File

@@ -136,6 +136,15 @@ public partial class @GameInputAction: IInputActionCollection2, IDisposable
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
},
{
""name"": ""Reload"",
""type"": ""Button"",
""id"": ""7bd7b761-fbb1-426d-8c5c-a9e053597a89"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
@@ -237,6 +246,17 @@ public partial class @GameInputAction: IInputActionCollection2, IDisposable
""action"": ""ADS Camera"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""f7aa340a-d21d-48a8-81a9-d673d57059d8"",
""path"": ""<Keyboard>/r"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Reload"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
@@ -250,6 +270,7 @@ public partial class @GameInputAction: IInputActionCollection2, IDisposable
m_Player_Jump = m_Player.FindAction("Jump", throwIfNotFound: true);
m_Player_Shoot = m_Player.FindAction("Shoot", throwIfNotFound: true);
m_Player_ADSCamera = m_Player.FindAction("ADS Camera", throwIfNotFound: true);
m_Player_Reload = m_Player.FindAction("Reload", throwIfNotFound: true);
}
~@GameInputAction()
@@ -335,6 +356,7 @@ public partial class @GameInputAction: IInputActionCollection2, IDisposable
private readonly InputAction m_Player_Jump;
private readonly InputAction m_Player_Shoot;
private readonly InputAction m_Player_ADSCamera;
private readonly InputAction m_Player_Reload;
/// <summary>
/// Provides access to input actions defined in input action map "Player".
/// </summary>
@@ -367,6 +389,10 @@ public partial class @GameInputAction: IInputActionCollection2, IDisposable
/// </summary>
public InputAction @ADSCamera => m_Wrapper.m_Player_ADSCamera;
/// <summary>
/// Provides access to the underlying input action "Player/Reload".
/// </summary>
public InputAction @Reload => m_Wrapper.m_Player_Reload;
/// <summary>
/// Provides access to the underlying input action map instance.
/// </summary>
public InputActionMap Get() { return m_Wrapper.m_Player; }
@@ -407,6 +433,9 @@ public partial class @GameInputAction: IInputActionCollection2, IDisposable
@ADSCamera.started += instance.OnADSCamera;
@ADSCamera.performed += instance.OnADSCamera;
@ADSCamera.canceled += instance.OnADSCamera;
@Reload.started += instance.OnReload;
@Reload.performed += instance.OnReload;
@Reload.canceled += instance.OnReload;
}
/// <summary>
@@ -433,6 +462,9 @@ public partial class @GameInputAction: IInputActionCollection2, IDisposable
@ADSCamera.started -= instance.OnADSCamera;
@ADSCamera.performed -= instance.OnADSCamera;
@ADSCamera.canceled -= instance.OnADSCamera;
@Reload.started -= instance.OnReload;
@Reload.performed -= instance.OnReload;
@Reload.canceled -= instance.OnReload;
}
/// <summary>
@@ -508,5 +540,12 @@ public partial class @GameInputAction: IInputActionCollection2, IDisposable
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
void OnADSCamera(InputAction.CallbackContext context);
/// <summary>
/// Method invoked when associated input action "Reload" 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 OnReload(InputAction.CallbackContext context);
}
}

View File

@@ -50,6 +50,15 @@
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Reload",
"type": "Button",
"id": "7bd7b761-fbb1-426d-8c5c-a9e053597a89",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
@@ -151,6 +160,17 @@
"action": "ADS Camera",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "",
"id": "f7aa340a-d21d-48a8-81a9-d673d57059d8",
"path": "<Keyboard>/r",
"interactions": "",
"processors": "",
"groups": "",
"action": "Reload",
"isComposite": false,
"isPartOfComposite": false
}
]
}

View File

@@ -9,6 +9,7 @@ namespace Darkmatter.Core
bool canAttack { get; }
string WeaponName { get; }
public int AmmoCount { get; }
public int maxAmmoCount { get; }
}
}

View File

@@ -7,6 +7,7 @@ namespace Darkmatter.Core
{
public event Action OnJumpPerformed;
public event Action OnAdsCameraSwitch;
public event Action OnReloadPerformed;
public Vector2 moveInput { get; }
public Vector2 lookInput { get; }
public bool isShooting { get; }

View File

@@ -11,6 +11,7 @@ namespace Darkmatter.Core
public event Action OnJumpPerformed;
public event Action OnAdsCameraSwitch;
public event Action OnReloadPerformed;
public bool isShooting { get; private set; }
public Vector2 moveInput { get; private set; }
public Vector2 lookInput { get; private set; }
@@ -62,5 +63,13 @@ namespace Darkmatter.Core
OnAdsCameraSwitch?.Invoke();
}
}
public void OnReload(InputAction.CallbackContext context)
{
if(context.performed)
{
OnReloadPerformed?.Invoke();
}
}
}
}

View File

@@ -12,6 +12,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d868e8202f5ceae4ea496e56b0db9db9, type: 3}
m_Name: PlayerConfigSO
m_EditorClassIdentifier: CoreAssembly::Darkmatter.Core.PlayerConfigSO
moveSpeed: 3
moveSpeed: 2
jumpForce: 5
gravity: -15