add sniper

This commit is contained in:
CortexCore
2023-10-31 18:07:15 +08:00
parent 18f664a545
commit f0f348c246
47 changed files with 4568 additions and 389 deletions

View File

@@ -51,13 +51,15 @@ namespace BITKit.Entities
}
private void Melee(int _damage)
{
var forward = Transform.forward;
meleeService.Melee(new MeleeCommand()
{
PlayerId = Entity.Id,
Position = Transform.position + Vector3.up,
Force = Transform.forward * 128,
Force = forward * 128,
Range = 1.6f,
Damage = _damage,
Forward = forward
});
unityAnimator.Play("Attack");
//entity.Invoke(Constant.Animation.Play, "Melee");