예제 #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();
    }