Throwing Knife Added
This commit is contained in:
@@ -20,6 +20,11 @@ namespace BITKit.Entities.Movement
|
||||
public Vector3 GroundVelocity { get; }
|
||||
public Vector3 AngularVelocity { get; }
|
||||
public bool IsGrounded { get; }
|
||||
|
||||
[Inject(true)]
|
||||
private IHealth health;
|
||||
|
||||
|
||||
public void SyncMovement(Vector3 velocity, Vector3 position, Quaternion rotation, bool isGrounded)
|
||||
{
|
||||
}
|
||||
@@ -37,6 +42,20 @@ namespace BITKit.Entities.Movement
|
||||
}
|
||||
|
||||
public event Action<object> OnCommand;
|
||||
public override void OnAwake()
|
||||
{
|
||||
base.OnAwake();
|
||||
if (health is not null)
|
||||
{
|
||||
health.OnSetAlive += OnSetAlive;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnSetAlive(bool obj)
|
||||
{
|
||||
rigidbody.isKinematic = !obj;
|
||||
}
|
||||
|
||||
public override void OnFixedUpdate(float deltaTime)
|
||||
{
|
||||
rigidbody.MovePosition(rigidbody.position + Velocity * deltaTime
|
||||
|
Reference in New Issue
Block a user