mirror of
https://github.com/Mukheem/TwinTurbine.git
synced 2025-05-04 22:10:34 +02:00
RPC for a variable to see if WT is rotating or not
Co-Authored-By: ZeinabBF <145973209+ZeinabBF@users.noreply.github.com>
This commit is contained in:
parent
dff55e7a42
commit
90de0fc7a3
Assets/SharedSpatialAnchors/Scripts
@ -55,6 +55,7 @@ public class API : MonoBehaviour
|
|||||||
PhotonView photonView;
|
PhotonView photonView;
|
||||||
private GameObject avatar;
|
private GameObject avatar;
|
||||||
private AudioController audioControllerScript;
|
private AudioController audioControllerScript;
|
||||||
|
[PunRPC]
|
||||||
public bool turn_WT_on_Y_Axis = false;
|
public bool turn_WT_on_Y_Axis = false;
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
@ -176,18 +177,18 @@ public void ExtractDataFromJson(string json)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
photonView = PhotonView.Get(this);
|
photonView = PhotonView.Get(this);
|
||||||
photonView.RPC("RPC_GreenButtonClick", RpcTarget.All,windDirectionInDirectionTerms,LatestT+" C","Kista",latestWS+" m/s");
|
photonView.RPC("RPC_GreenButtonClick", RpcTarget.All,windDirectionInDirectionTerms,LatestT+" C","Kista",latestWS+" m/s",true);
|
||||||
}
|
}
|
||||||
|
|
||||||
[PunRPC]
|
[PunRPC]
|
||||||
public void RPC_GreenButtonClick(String windDirection,String locationTemperature,String location,String windSpeed)
|
public void RPC_GreenButtonClick(String windDirection,String locationTemperature,String location,String windSpeed,bool turn_WT_on_Y_Axis_val)
|
||||||
{
|
{
|
||||||
Debug.Log("Latest WS is - " + windSpeed);
|
Debug.Log("Latest WS is - " + windSpeed);
|
||||||
windDirValue.SetText(windDirection);
|
windDirValue.SetText(windDirection);
|
||||||
temperatureValue.SetText(locationTemperature);
|
temperatureValue.SetText(locationTemperature);
|
||||||
loc.SetText(location);
|
loc.SetText(location);
|
||||||
windSpeedValue.SetText(windSpeed);
|
windSpeedValue.SetText(windSpeed);
|
||||||
turn_WT_on_Y_Axis = true; // flag set to true so that WT can rotate on it's Y axis.
|
turn_WT_on_Y_Axis = turn_WT_on_Y_Axis_val; // flag set to true so that WT can rotate on it's Y axis.
|
||||||
}
|
}
|
||||||
[PunRPC]
|
[PunRPC]
|
||||||
public void RPC_VoltageUpdate(String voltageGenerated)
|
public void RPC_VoltageUpdate(String voltageGenerated)
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
internal class NetworkedAttribute : Attribute
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c5abaf289b293084480009e235498473
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
x
Reference in New Issue
Block a user