Exemple #1
0
    public override void GiveRevard(Player player)
    {
        player.coin += 1;

        transform.position = MapsManager.RandomPos();
        photonView.RPC("SetItemPositionRPC", PhotonTargets.All, transform.position);
    }
Exemple #2
0
    private void SpawnItem(Items item)
    {
        var itemPrefab = items.FirstOrDefault(p => p.item == item).prefab;

        PhotonNetwork.Instantiate(itemPrefab.name, MapsManager.RandomPos(), MapsManager.RandomRot(), 0, null);
    }