1
This commit is contained in:
@@ -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");
|
||||
|
Reference in New Issue
Block a user