This commit is contained in:
CortexCore
2023-11-15 23:54:54 +08:00
parent ee3ecec6cb
commit 3c837a4a33
356 changed files with 73756 additions and 26493 deletions

View File

@@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using BITFALL.Entities;
using BITFALL.Player.Equip;
using BITFALL.Player.Movement;
using BITKit;
using BITKit.Animations;
@@ -17,6 +18,8 @@ namespace BITFALL.Feel
private IPlayerMovement _playerMovement;
[Inject]
private IKnockdown _knockdown;
[Inject]
private IEquipService _equipService;
public override void OnStart()
{
_playerMovement.OnParachuteOpened += OnParachuteOpened;
@@ -24,11 +27,17 @@ namespace BITFALL.Feel
_knockdown.OnKnockdown += OnKnockdown;
}
public override void OnUpdate(float deltaTime)
{
base.OnUpdate(deltaTime);
_equipService.AllowEquip.SetDisableElements(this,animator[0].stateName != BITConstant.Player.Idle);
}
private void OnKnockdown()
{
animator.Play("OnKnockdown");
}
private void OnParachuteClosed()
{
animator.Play("OnParachuteClosed");