Example #1
0
 /// <summary>
 /// Generates a fear alert.
 /// </summary>
 public void OnScared()
 {
     if (_actor.IsAlive && Fear > float.Epsilon)
     {
         Alerts.Broadcast(transform.position, Fear, false, _actor, true);
     }
 }
Example #2
0
 /// <summary>
 /// Generates a cop call alert.
 /// </summary>
 public void OnCopCall()
 {
     if (_actor.IsAlive && CopCall > float.Epsilon)
     {
         Alerts.Broadcast(transform.position, CopCall, false, _actor, true);
     }
 }
Example #3
0
 /// <summary>
 /// Generates an assault alert.
 /// </summary>
 public void OnAssaultStart()
 {
     if (_actor.IsAlive && Assault > float.Epsilon)
     {
         Alerts.Broadcast(transform.position, Assault, false, _actor, true);
     }
 }
Example #4
0
 /// <summary>
 /// Generates an alert alert.
 /// </summary>
 public void OnAlerted()
 {
     if (_actor.IsAlive && Alert > float.Epsilon)
     {
         Alerts.Broadcast(transform.position, Alert, false, _actor, true);
     }
 }
Example #5
0
 /// <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);
     }
 }
Example #6
0
 /// <summary>
 /// Generates a cover switch alert.
 /// </summary>
 public void OnCoverSwitch()
 {
     if (_actor.IsAlive && CoverSwitch > float.Epsilon)
     {
         Alerts.Broadcast(transform.position, CoverSwitch, false, _actor, true);
     }
 }
Example #7
0
        /// <summary>
        /// Broadcast eject event./
        /// </summary>
        public void OnEject()
        {
            if (Reload <= float.Epsilon)
                return;

            checkActor();
            Alerts.Broadcast(transform.position, Reload, true, _actor, true);
        }
Example #8
0
        /// <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);
        }
Example #9
0
        /// <summary>
        /// Broadcast empty fire alert.
        /// </summary>
        public void OnEmptyFire()
        {
            if (EmptyFire <= float.Epsilon)
                return;

            checkActor();
            Alerts.Broadcast(transform.position, EmptyFire, true, _actor, true);
        }
Example #10
0
        /// <summary>
        /// Generates a melee moment alert.
        /// </summary>
        public void OnMeleeMoment()
        {
            if (Moment <= float.Epsilon)
            {
                return;
            }

            checkActor();
            Alerts.Broadcast(transform.position, Moment, true, _actor, true);
        }
Example #11
0
        /// <summary>
        /// Generates a melee attack alert.
        /// </summary>
        public void OnMeleeAttack()
        {
            if (Attack <= float.Epsilon)
            {
                return;
            }

            checkActor();
            Alerts.Broadcast(transform.position, Attack, true, _actor, true);
        }
Example #12
0
 /// <summary>
 /// Generates a land alert.
 /// </summary>
 public void OnLand()
 {
     Alerts.Broadcast(transform.position, Land, false, _actor, true);
 }
Example #13
0
 /// <summary>
 /// Activates the alert and resets the timer.
 /// </summary>
 public void Activate()
 {
     Alerts.Broadcast(transform.position, Range, IsHostile, _actor == null ? Generator : _actor, _actor != null);
 }
Example #14
0
 /// <summary>
 /// No resurrection alert.
 /// </summary>
 public void OnResurrect()
 {
     Alerts.Broadcast(transform.position, Resurrect, false, _actor, true);
 }
Example #15
0
 /// <summary>
 /// Generates a death alert.
 /// </summary>
 public void OnDead()
 {
     Alerts.Broadcast(transform.position, Death, true, _actor, true);
 }
Example #16
0
 /// <summary>
 /// Generates a hurt alert.
 /// </summary>
 public void OnHit(Hit hit)
 {
     Alerts.Broadcast(transform.position, Hurt, true, _actor, true);
 }
Example #17
0
 /// <summary>
 /// Broadcasts an alert.
 /// </summary>
 public void OnHit(Hit hit)
 {
     Alerts.Broadcast(hit.Position, Range, true, Actors.Get(hit.Attacker), false);
 }
Example #18
0
 /// <summary>
 /// Generates a jump alert.
 /// </summary>
 public void OnJump()
 {
     Alerts.Broadcast(transform.position, Jump, false, _actor, true);
 }