/// <summary> /// Generates a fear alert. /// </summary> public void OnScared() { if (_actor.IsAlive && Fear > float.Epsilon) { Alerts.Broadcast(transform.position, Fear, false, _actor, true); } }
/// <summary> /// Generates a cop call alert. /// </summary> public void OnCopCall() { if (_actor.IsAlive && CopCall > float.Epsilon) { Alerts.Broadcast(transform.position, CopCall, false, _actor, true); } }
/// <summary> /// Generates an assault alert. /// </summary> public void OnAssaultStart() { if (_actor.IsAlive && Assault > float.Epsilon) { Alerts.Broadcast(transform.position, Assault, false, _actor, true); } }
/// <summary> /// Generates an alert alert. /// </summary> public void OnAlerted() { if (_actor.IsAlive && Alert > float.Epsilon) { Alerts.Broadcast(transform.position, Alert, false, _actor, true); } }
/// <summary> /// Generates a step alert. /// </summary> public void OnFootstep(Vector3 position) { if (_motor == null || (!_motor.IsCrouching && !_motor.IsInCover)) { Alerts.Broadcast(transform.position, Step, false, _actor, true); } }
/// <summary> /// Generates a cover switch alert. /// </summary> public void OnCoverSwitch() { if (_actor.IsAlive && CoverSwitch > float.Epsilon) { Alerts.Broadcast(transform.position, CoverSwitch, false, _actor, true); } }
/// <summary> /// Broadcast eject event./ /// </summary> public void OnEject() { if (Reload <= float.Epsilon) return; checkActor(); Alerts.Broadcast(transform.position, Reload, true, _actor, true); }
/// <summary> /// Generates a land alert. /// </summary> public void OnFire(float delay) { if (Fire <= float.Epsilon) return; checkActor(); Alerts.Broadcast(transform.position, Fire, true, _actor, true); }
/// <summary> /// Broadcast empty fire alert. /// </summary> public void OnEmptyFire() { if (EmptyFire <= float.Epsilon) return; checkActor(); Alerts.Broadcast(transform.position, EmptyFire, true, _actor, true); }
/// <summary> /// Generates a melee moment alert. /// </summary> public void OnMeleeMoment() { if (Moment <= float.Epsilon) { return; } checkActor(); Alerts.Broadcast(transform.position, Moment, true, _actor, true); }
/// <summary> /// Generates a melee attack alert. /// </summary> public void OnMeleeAttack() { if (Attack <= float.Epsilon) { return; } checkActor(); Alerts.Broadcast(transform.position, Attack, true, _actor, true); }
/// <summary> /// Generates a land alert. /// </summary> public void OnLand() { Alerts.Broadcast(transform.position, Land, false, _actor, true); }
/// <summary> /// Activates the alert and resets the timer. /// </summary> public void Activate() { Alerts.Broadcast(transform.position, Range, IsHostile, _actor == null ? Generator : _actor, _actor != null); }
/// <summary> /// No resurrection alert. /// </summary> public void OnResurrect() { Alerts.Broadcast(transform.position, Resurrect, false, _actor, true); }
/// <summary> /// Generates a death alert. /// </summary> public void OnDead() { Alerts.Broadcast(transform.position, Death, true, _actor, true); }
/// <summary> /// Generates a hurt alert. /// </summary> public void OnHit(Hit hit) { Alerts.Broadcast(transform.position, Hurt, true, _actor, true); }
/// <summary> /// Broadcasts an alert. /// </summary> public void OnHit(Hit hit) { Alerts.Broadcast(hit.Position, Range, true, Actors.Get(hit.Attacker), false); }
/// <summary> /// Generates a jump alert. /// </summary> public void OnJump() { Alerts.Broadcast(transform.position, Jump, false, _actor, true); }