コード例 #1
0
ファイル: FFAGameMode.cs プロジェクト: Azoghal/PowerfulPlod
    /// <summary>
    /// Handles player death notification from the death mesh and passes the message forward to clients via RPC, logs the death onto the leaderboard.
    /// </summary>
    /// <param name="playerManager">The playerManager of the dieing player</param>
    ///
    public void handlePlayerDeath(V2PlayerManager playerManager)
    {
        playerManager.RpcDie();

        // TODO: Handle leaderboard.
        StartCoroutine(handlePlayerSpawn(playerManager));

        // maybe havea coroutine for handle player LMS death, which only respawns once all are dead?
    }
コード例 #2
0
ファイル: LMSGameMode.cs プロジェクト: Azoghal/PowerfulPlod
 public void handlePlayerDeath(V2PlayerManager playerManager)
 {
     playerManager.RpcDie();
     PlayersAlive--;
     if (PlayersAlive == 1)
     {
         for (int i = 0; i < Players.Length; i++)
         {
             if (Players[i].isDead == false)
             {
                 Debug.Log(Players[i].name);
             }
         }
         killAllAlive();
         spawnAll();
     }
 }