protected override void OnPickableSensed(PickableController pickable) { if (pickable.IsMedkit() && state != State.Shooting) { state = State.PickingMedkit; } if (pickable.IsWeapon() && state == State.Seeking && !health.IsLowLife) { state = State.PickingWeapon; } }
protected override void OnPickableSensed(PickableController pickable) { if (state == State.Seeking && pickable.IsWeapon()) { state = State.PickingWeapon; } else if (pickable.IsMedkit() && state != State.PickingMedkit && state != State.SearchingEnnemy && state != State.Shooting) { state = State.PickingMedkit; medkitPosition = pickable.transform.position; } }
protected override void OnPickableUnsensed(PickableController pickable) { if (state != State.Seeking && state != State.PickingWeapon && base.PickableSensor.GetFirstMedkit == null) { medkitPosition = null; if (base.PickableSensor.GetFirstWeapon == null) { state = State.Seeking; } else { state = State.PickingWeapon; } } else if (state == State.PickingWeapon && base.PickableSensor.GetFirstWeapon == null) { state = State.Seeking; } else if (pickable.IsMedkit()) { medkitPosition = base.PickableSensor.GetFirstMedkit.transform.position; } }