Пример #1
0
 /// <summary>
 /// Reloads the gun.
 /// </summary>
 public bool Reload()
 {
     if (weapon && !IsFiring && !IsReloading && weapon.MagazineSize != 0)
     {
         reloadCoroutine = ExtendedCoroutine.ActionAfterSeconds(this, weapon.ReloadTime, OnReloaded, true);
         NetworkWeaponAnimator.OnStartedReload();
         ReloadingBegins?.Invoke(weapon.ReloadTime);
         return(true);
     }
     return(false);
 }
Пример #2
0
    public void ServerReviving(Player player)
    {
        // Maybe add a check if the player is in range.

        if (!player || player.Health.Alive)
        {
            return;
        }

        downedPlayerAbleToRevive = player;
        revivingCoroutine        = ExtendedCoroutine.ActionAfterSeconds(this, timeForPlayerRevive, OnServerPlayerRevived, true);
        RpcOnRevivingOtherPlayerStarted();
    }