Exemplo n.º 1
0
     static void Main(string[] args)
     {
         PythonClient c = new PythonClient();
         string code = @"def test():
 for i949afd99145346bf9d108edf25ae0710 in range(4):
     print(""asdasdasdsad"",end="""")
 for ib13aa23add38472c8e47e9c8d51d2a67 in range(4):
     rint(""asda"",end="""")
     if 2==3:
         print(body, end="""")
     print(""asdasdasdsgggad"",end="""")
 print(""asdasd"",end="""")";
        // string id = c.CompileCode(code);
        // Console.WriteLine(id);
         Console.WriteLine(c.RunCode("0000000000", new object[] { 5, new DateTime(2019, 2, 4) }));
         Console.ReadKey();
         /*
         using (var client = new WebClient())
         {
             var values = new Dictionary<string, object>();
             values.Add("data", 5);
             values.Add("data2", "STRINGD");
             values.Add("datetime", new DateTime(2016, 12, 1));
             var json = new JavaScriptSerializer().Serialize(values);
             Console.WriteLine(json);
             client.Headers.Add(HttpRequestHeader.ContentType, "application/json");
             var response = client.UploadString(new Uri("http://localhost:5000/run"), "POST", json);
             Console.WriteLine(response);
             
             Console.ReadKey();
         }
         */
     }
    // Use this for initialization
    void Start()
    {
        clientObject = GameObject.Find("/LogicScripts").GetComponent <PythonClient>();

        // Put OVRCameraRig and LocalAvatar into scene
        if (rightHand == null)
        {
            rightHand = GameObject.Find("LocalAvatar/hand_right");
        }
        if (leftHand == null)
        {
            leftHand = GameObject.Find("LocalAvatar/hand_left");
        }
    }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     clientObject = GameObject.Find("/LogicScripts").GetComponent <PythonClient>();
 }
 // Use this for initialization
 void Start()
 {
     clientObject = GameObject.Find("/LogicScripts").GetComponent <PythonClient>();
     headObject   = GameObject.Find("/OVRCameraRig/TrackingSpace/CenterEyeAnchor");
 }