1
This commit is contained in:
@@ -13,16 +13,40 @@ namespace BITKit
|
||||
[SerializeField] private new Rigidbody rigidbody;
|
||||
|
||||
[Inject] private IHealth _health;
|
||||
|
||||
[Inject(true)] private IEntityOverride _override;
|
||||
#endregion
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
if (_override is not null)
|
||||
{
|
||||
_override.OnOverride += (x) =>
|
||||
{
|
||||
agent.isStopped = x;
|
||||
};
|
||||
}
|
||||
|
||||
_health.OnSetAlive += OnSetAlive;
|
||||
_health.OnSetHealthPoint += OnSetHP;
|
||||
|
||||
}
|
||||
|
||||
#region 接口实现
|
||||
|
||||
public Vector3 Position
|
||||
{
|
||||
get=>transform.position;
|
||||
set=>transform.position=value;
|
||||
}
|
||||
|
||||
public Quaternion Rotation
|
||||
{
|
||||
get=>transform.rotation;
|
||||
set=>transform.rotation=value;
|
||||
}
|
||||
|
||||
public Vector3 Forward => transform.forward;
|
||||
public Vector3 ViewCenter { get; set; }
|
||||
public Quaternion ViewRotation { get; set; }
|
||||
public Vector3 LocomotionBasedVelocity { get; private set; }
|
||||
|
Reference in New Issue
Block a user