Пример #1
0
 void Awake()
 {
     rb1 = Body1.GetComponent <Rigidbody>();
     rb2 = Body2.GetComponent <Rigidbody>();
     rb3 = Body3.GetComponent <Rigidbody>();
     rb5 = Body5.GetComponent <Rigidbody>();
     rb6 = Body6.GetComponent <Rigidbody>();
 }
Пример #2
0
 void setRigibody()
 {
     this.rb1 = Body1.GetComponent <Rigidbody>();
     this.rb2 = Body2.GetComponent <Rigidbody>();
     this.rb3 = Body3.GetComponent <Rigidbody>();
     this.rb4 = Body4.GetComponent <Rigidbody>();
     this.rb5 = Body5.GetComponent <Rigidbody>();
     this.rb6 = Body6.GetComponent <Rigidbody>();
 }
Пример #3
0
        public void RestapiV10AccountAccountIdExtensionExtensionIdMessageStoreMessageIdPutTest()
        {
            // TODO: add unit test for the method 'RestapiV10AccountAccountIdExtensionExtensionIdMessageStoreMessageIdPut'
            string accountId   = null; // TODO: replace null with proper value
            string extensionId = null; // TODO: replace null with proper value
            int?   messageId   = null; // TODO: replace null with proper value
            Body5  body        = null; // TODO: replace null with proper value

            var response = instance.RestapiV10AccountAccountIdExtensionExtensionIdMessageStoreMessageIdPut(accountId, extensionId, messageId, body);

            Assert.IsInstanceOf <MessageInfo> (response, "response is MessageInfo");
        }
Пример #4
0
    void Awake()
    {
        rb1 = Body1.GetComponent <Rigidbody>();
        rb2 = Body2.GetComponent <Rigidbody>();
        rb3 = Body3.GetComponent <Rigidbody>();
        rb4 = Body4.GetComponent <Rigidbody>();
        rb5 = Body5.GetComponent <Rigidbody>();
        rb6 = Body6.GetComponent <Rigidbody>();
        GameObject tor = this.chita.transform.GetChild(0).gameObject;

        torax        = tor.GetComponent <Rigidbody>();
        testeColisao = this.chita.transform.GetChild(13).gameObject;
        //chita = GameObject.Find("Chita");
        //z = new Animalx ();
        //a = GameObject.Instantiate (chita);
        //a.transform.position = new Vector3 (-2.16f,0.16f,-5f);
    }
Пример #5
0
    // Update is called once per frame
    void Update()
    {
        //Vector3 force1 = 30*ks*(desiredPos - rb1.position) - 30*kd*(rb1.velocity);
        //rb1.AddForce(force1);
        //float torque1 = 30*ks*(angle1 - Body1.GetComponent<HingeJoint>().angle) - kd*(Body1.GetComponent<HingeJoint>().velocity);
        //rb1.AddTorque(Vector3.forward * torque1);

        float torque2 = 30 * ks * (angle2 - Body2.GetComponent <HingeJoint>().angle) - kd * (Body2.GetComponent <HingeJoint>().velocity);

        rb1.AddTorque(Vector3.forward * torque2);
        rb2.AddTorque(Vector3.forward * torque2);
        float torque3 = 30 * ks * (angle3 - Body3.GetComponent <HingeJoint>().angle) - kd * (Body3.GetComponent <HingeJoint>().velocity);

        rb3.AddTorque(Vector3.forward * torque3);

        float torque5 = 30 * ks * (angle5 - Body5.GetComponent <HingeJoint>().angle) - kd * (Body5.GetComponent <HingeJoint>().velocity);

        rb5.AddTorque(Vector3.forward * torque5);
        float torque6 = 30 * ks * (angle6 - Body6.GetComponent <HingeJoint>().angle) - kd * (Body6.GetComponent <HingeJoint>().velocity);

        rb6.AddTorque(Vector3.forward * torque6);
    }
Пример #6
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="token"></param>
        /// <param name="body">JSON Request object (optional)</param>
        /// <returns>Task of ApiResponse (Object)</returns>
        public async System.Threading.Tasks.Task <ApiResponse <Object> > HelpfulAsyncWithHttpInfo(string token, Body5 body = null)
        {
            // verify the required parameter 'token' is set
            if (token == null)
            {
                throw new ApiException(400, "Missing required parameter 'token' when calling TicketsApi->Helpful");
            }

            var    localVarPath         = "/v0/tickets/entry/{token}/helpful/";
            var    localVarPathParams   = new Dictionary <String, String>();
            var    localVarQueryParams  = new List <KeyValuePair <String, String> >();
            var    localVarHeaderParams = new Dictionary <String, String>(this.Configuration.DefaultHeader);
            var    localVarFormParams   = new Dictionary <String, String>();
            var    localVarFileParams   = new Dictionary <String, FileParameter>();
            Object localVarPostBody     = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);

            if (localVarHttpHeaderAccept != null)
            {
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
            }

            if (token != null)
            {
                localVarPathParams.Add("token", this.Configuration.ApiClient.ParameterToString(token));                // path parameter
            }
            if (body != null && body.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
            }
            else
            {
                localVarPostBody = body; // byte array
            }

            // make the HTTP request
            IRestResponse localVarResponse = (IRestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath,
                                                                                                            Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
                                                                                                            localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int)localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("Helpful", localVarResponse);
                if (exception != null)
                {
                    throw exception;
                }
            }

            return(new ApiResponse <Object>(localVarStatusCode,
                                            localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
                                            (Object)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Object))));
        }
Пример #7
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="token"></param>
        /// <param name="body">JSON Request object (optional)</param>
        /// <returns>Task of Object</returns>
        public async System.Threading.Tasks.Task <Object> HelpfulAsync(string token, Body5 body = null)
        {
            ApiResponse <Object> localVarResponse = await HelpfulAsyncWithHttpInfo(token, body);

            return(localVarResponse.Data);
        }
Пример #8
0
        /// <summary>
        ///
        /// </summary>
        /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="token"></param>
        /// <param name="body">JSON Request object (optional)</param>
        /// <returns>Object</returns>
        public Object Helpful(string token, Body5 body = null)
        {
            ApiResponse <Object> localVarResponse = HelpfulWithHttpInfo(token, body);

            return(localVarResponse.Data);
        }
Пример #9
0
 public void Init()
 {
     instance = new Body5();
 }