1
This commit is contained in:
@@ -58,16 +58,27 @@ namespace BITFALL.Entities.Equipment.Melee
|
||||
|
||||
[Inject]
|
||||
private IEntityMovement _movement;
|
||||
[Inject]
|
||||
[Inject(true)]
|
||||
private IPlayerMovement _playerMovement;
|
||||
[Inject] private IHealth _health;
|
||||
|
||||
public override void OnAwake()
|
||||
{
|
||||
base.OnAwake();
|
||||
inputActionGroup.RegisterCallback(attackAction, OnAttack);
|
||||
inputActionGroup.RegisterCallback(blockAction, OnBlock);
|
||||
_health.OnDamageFactory += OnDamageFactory;
|
||||
|
||||
|
||||
if (attackAction is not null)
|
||||
{
|
||||
inputActionGroup.RegisterCallback(attackAction, OnAttack);
|
||||
}
|
||||
|
||||
if (blockAction is not null)
|
||||
{
|
||||
inputActionGroup.RegisterCallback(blockAction, OnBlock);
|
||||
}
|
||||
|
||||
if (_playerMovement is not null)
|
||||
_health.OnDamageFactory += OnDamageFactory;
|
||||
|
||||
_movement.OnStateChanged += OnMovementStateChanged;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user