1
This commit is contained in:
@@ -12,7 +12,6 @@ namespace BITFALL.Entities.Equipment
|
||||
{
|
||||
public class AIMeleeController : AIEquipController
|
||||
{
|
||||
[SerializeReference,SubclassSelector] private IMeleeService meleeService;
|
||||
[SerializeField] private bool forceAttack;
|
||||
|
||||
private readonly IntervalUpdate interval = new(1);
|
||||
@@ -35,30 +34,10 @@ namespace BITFALL.Entities.Equipment
|
||||
OnAttack(new BITConstant.Command.AttackCommand());
|
||||
}
|
||||
}
|
||||
|
||||
private void OnAttack(BITConstant.Command.AttackCommand obj)
|
||||
{
|
||||
UnityEntity.Invoke(Constant.Animation.Play, BITConstant.Player.Melee);
|
||||
}
|
||||
|
||||
protected override void OnAnimationEvent(string animationEventName)
|
||||
{
|
||||
switch (animationEventName)
|
||||
{
|
||||
case BITConstant.Player.Attack:
|
||||
case BITConstant.Player.Melee:
|
||||
meleeService.Melee(new MeleeCommand()
|
||||
{
|
||||
Damage = assetableMelee.MeleeDamage,
|
||||
Force = assetableMelee.MeleeForce,
|
||||
PlayerId = Entity.Id,
|
||||
Position = transform.position,
|
||||
Range = assetableMelee.MeleeRange,
|
||||
Forward = UnityEntity.transform.forward,
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user