Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Photon Network RPC Random Range Problem

$
0
0
Photon Network RPC Random Range Problem
Hi, I'm working on a project. I'm using this script for bot money;

using UnityEngine;
using System.Collections;

public class Botmoney : MonoBehaviour {
public int BotMoney;
public bool botStealable = true;
PhotonView photonView;
// Use this for initialization
void Start () {
photonView = GetComponent ();
photonView.RPC ("RandomMoneyFBot", PhotonTargets.All);

}
[punRPC]
void RandomMoneyFBot(){
BotMoney = Random.Range (12,60);
}
}

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>