using UnityEngine;

namespace MultiplayerClientSpawn
{
  public class MultiplayerSpawnBlock : MonoBehaviour
  {
    private void Awake()
    {
      if (Network.isClient)
      {
        GameScript.spawnPos = base.transform.position;
        if (MenuScript.player)
        {
          MenuScript.player.transform.position = base.transform.position;
        }
      }
    }

    private void OnConnectedToServer()
    {
      if (Network.isClient)
      {
        MenuScript.player.transform.position = base.transform.position;
      }
    }
  }
}
