using System.Collections.ObjectModel;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;
using Photon.Realtime;

public class SpawnPlayer : MonoBehaviourPunCallbacks
{
    // Start is called before the first frame update
    void Start()
    {
        // Dictionary<int, GameObject> props = PhotonNetwork.LocalPlayer.CustomProperties;

        string preName;
        if (PhotonNetwork.LocalPlayer.CustomProperties["Ladybug"] != null)
        {
            preName = "Ladybug";
        }
        else
        {
            preName = "Dragonfly";
        }

        // if (PhotonNetwork.CurrentRoom.PlayerCount == 2)
        // {
        PhotonNetwork.Instantiate(preName, new Vector3(0, 0, (3.5f * Random.Range(0, 5)) * 10), Quaternion.Euler(0, 90, 0));
        // }
    }
}