Ejemplo n.º 1
0
 // Start is called before the first frame update
 //This function gathers a list of all parking spot locations and instantiates a parked car there, and one random stall is set to be the parking spot.
 //This script requires all parking locations to be a child of the object this script is attached too.
 void Start()
 {
     if (PhotonNetwork.IsMasterClient)
     {
         GetComponent <PhotonView>().RPC("AddCarsToParkingSpots", RpcTarget.All, (int)System.DateTime.Now.Ticks);
     }
     PGM = GameObject.Find("ParkingGameManager").GetComponent <ParkingGameManager>();
 }
    private new void Awake()
    {
        base.Awake();
        Assert.IsNull(Instance);
        Instance = this;

        // Sync Settings
        UnityEngine.Random.InitState(RoomSettings.Seed);
    }