Esempio n. 1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "Player")
        {
            V2PlayerManager playerManager = other.gameObject.GetComponent <V2PlayerManager>();

            if (playerManager != null)
            {
                serverGameManager.currentGamemode.handlePlayerDeath(playerManager); // inform serverGameManager the player has died.
                //serverGameManager.SendMessage("handlePlayerDeath",playerManager);
            }
        }
        else if (other.gameObject.CompareTag("World Rigidbody"))
        {
            WorldRigidBody wrb = other.gameObject.GetComponent <WorldRigidBody>();

            if (wrb != null)
            {
                serverGameManager.handleWorldRigidBodyRespawn(wrb);
            }
        }
    }
Esempio n. 2
0
    public IEnumerator respawnWorldRigidbody(WorldRigidBody wrb)
    {
        yield return(new WaitForSeconds(WRBrespawnTime));

        wrb.RpcRespawn();
    }
Esempio n. 3
0
 public void handleWorldRigidBodyRespawn(WorldRigidBody wrb)
 {
     StartCoroutine(respawnWorldRigidbody(wrb));
 }