// Should be called once before public static void PREGAMEupdateGameState(GameState gs) { if (PV != null && PV.IsMine) { Debug.Log(Game.myPlayer.getNetworkID() + " ~ Updating GameState..."); PV.RPC("PREGAMEupdateGameState", RpcTarget.AllBuffered, SavedGameController.serializeGameState(gs)); } else { Debug.Log(Game.myPlayer.getNetworkID() + " ~ Could not access PhotoView"); } }
// Player = PhotonNetwork.Instantiate(Path.Combine("Prefab", "PlayerCharacter"), new Vector3(Random.Range(-2.0f, 2.0f), 0, Random.Range(-2.0f, 2.0f)), Quaternion.identity); ; // Start is called before the first frame update public override void Start() { if (!pv.IsMine) { Destroy(cam.gameObject); body.GetComponent <Rigidbody>().isKinematic = true; } base.Start(); stand(); if (!PV.IsMine) { return; } eg.Hashtable newHT = new eg.Hashtable(); newHT["stance"] = 0; newHT["falling"] = false; newHT["hasjump"] = false; newHT["health"] = MaxHealth; pv.Owner.SetCustomProperties(newHT); pv.RPC("paint", RpcTarget.All); defaulthead = cam.transform.localPosition; }