public void Jump() { if (isServer) { //send view update information to all clients ScreenLogger.getLogger().ShowMsg("called from server: JUMP"); RpcJump(); } }
void Log(string str) { if (logger == null) { logger = ScreenLogger.getLogger(); } str = "Settings] " + str; logger.ShowMsg(str); Debug.Log(str); }
// Init void Start() { if (networkManager == null) { string goName = AWConfig.AW_CONFIG_GO_NAME; networkManager = GameObject.Find(goName).GetComponent <AWNetworkManager>(); } logger = ScreenLogger.getLogger(); initEvents(); }
public void Rotate(Vector3 axis, float degree) { if (isServer) { ScreenLogger.getLogger().ShowMsg("called from server: ROTATE " + degree); RpcRotate(axis, degree); } if (isClient) { ScreenLogger.getLogger().ShowMsg("called from client: ROTATE " + degree); SendCmd("Rotate", axis, degree); } }
//Shared hologram methods public void SetColor(Color color) { if (isServer) { //send view update information to all clients ScreenLogger.getLogger().ShowMsg("called from server " + color.ToString()); RpcSetColor(color); } if (isClient) { ScreenLogger.getLogger().ShowMsg("called from client" + color.ToString()); //send the command to the server SendCmd("SetColor", color); } }
// Use this for initialization void Start() { logger = ScreenLogger.getLogger(); netManager = (AWNetworkManager)AWNetworkManager.singleton; }