예제 #1
0
    public void UpdateClientPosZ(FloatBackchannelType data)
    {
        var pos = player2.position;

        pos.z            = data.FLOAT_VALUE;
        player2.position = pos;
    }
 public void moveZ(FloatBackchannelType zValue)
 {
     computerVector.x = 0f;
     computerVector.y = 0f;
     computerVector.z = zValue.FLOAT_VALUE;
     myRigidbody.AddForce(computerVector * sensitivity);
 }
 public void UpdateServerPosX(FloatBackchannelType data)
 {
     Debug.Log(data.FLOAT_VALUE);
     player2.transform.position = new Vector3(data.FLOAT_VALUE,
                                              player2.transform.position.y,
                                              player2.transform.position.z);
 }
예제 #4
0
    public void UpdateClientPosX(FloatBackchannelType data)
    {
        Debug.Log(data.FLOAT_VALUE);
        var pos = player2.position;

        pos.x            = data.FLOAT_VALUE;
        player2.position = pos;
    }
    public void updateSpeed(FloatBackchannelType floatBackchannel)
    {
        //0mph(default) is rotation 10 and 220mph is rotation -190
        //usually is between 0 to 3 if fall off map is almost 10
        //so equation for line would be y= -20x + 10

        currentSpeed = floatBackchannel.FLOAT_VALUE;

        myRotation.z = -20.0f * currentSpeed + 10.0f;
        myRectTransform.localRotation = Quaternion.Euler(myRotation);
    }
예제 #6
0
 void Awake()
 {
     backchannelKey   = EasyWiFiController.registerControl(EasyWiFiConstants.BACKCHANNELTYPE_FLOAT, controlName);
     floatBackchannel = (FloatBackchannelType)EasyWiFiController.controllerDataDictionary[backchannelKey];
 }
 // Use this for initialization
 void Awake()
 {
     floatKey  = EasyWiFiController.registerControl(EasyWiFiConstants.CONTROLLERTYPE_FLOAT, controlName);
     floatData = (FloatBackchannelType)EasyWiFiController.controllerDataDictionary[floatKey];
 }
 public void UpdateServerPosZ(FloatBackchannelType data)
 {
     player2.transform.position = new Vector3(player2.transform.position.x,
                                              player2.transform.position.y,
                                              data.FLOAT_VALUE);
 }