Exemplo n.º 1
0
    void OnCollisionEnter(Collision objet)
    {
        if (objet.gameObject.name == obj_destroy)
        {
            vie.damages(0.1f);
            //Destroy(targetRigidbody.gameObject);
        }

        /*else
         * {
         *      action();
         * }
         *
         * }
         *
         * void action()
         * {
         * float moveSpeed = 10f;
         * transform.Translate(-Vector3.forward * moveSpeed * Time.deltaTime);*/
    }