public override void PickableDetected(PickableController pickable) { if (pickable != null) { if (pickable.GetPickableType() == PickableType.Shotgun || pickable.GetPickableType() == PickableType.Uzi) { target = pickable.gameObject; StartChasingPickable(); StopChasing(); } } }
public override void PickableDetected(PickableController pickable) { if (pickable != null) { if (pickable.GetPickableType() == PickableType.MedicalKit && IsChasingMedic == false) { target = pickable.gameObject; StartChasingMedic(); IsSearching = false; } else if (pickable.GetPickableType() == PickableType.Shotgun || pickable.GetPickableType() == PickableType.Uzi) { target = pickable.gameObject; StartChasingGun(); StopChasingMedic(); IsSearching = false; } } }
public override void PickableDetected(PickableController pickable) { if (!IsChasing) { if (!NeedsMedicalKit()) { target = pickable.gameObject; StartChasing(); } else { if (pickable.GetPickableType() == PickableType.MedicalKit) { target = pickable.gameObject; StartChasing(); } } } }
private void AffectBonus(Collider2D other) { switch (pickable.GetPickableType()) { case (PickableType.MedicalKit): AffectMedicalKit(other); break; case (PickableType.Shotgun): AffectShotgun(other); break; case (PickableType.Uzi): AffectUzi(other); break; case (PickableType.Invincible): AffectInvincible(other); break; } }