public override void GiveRevard(Player player) { player.coin += 1; transform.position = MapsManager.RandomPos(); photonView.RPC("SetItemPositionRPC", PhotonTargets.All, transform.position); }
private void SpawnItem(Items item) { var itemPrefab = items.FirstOrDefault(p => p.item == item).prefab; PhotonNetwork.Instantiate(itemPrefab.name, MapsManager.RandomPos(), MapsManager.RandomRot(), 0, null); }