Untitled

 avatar
unknown
plain_text
a year ago
688 B
15
Indexable
if (transform.position.x > -5.5f)
        if (transform.rotation.z == 0)
        transform.Translate (0, -0.1f, 0);
        
        if (transform.position.x > -5.5f)
        if (transform.rotation.z == 90)
        transform.Translate (0.1f, 0, 0);
         
        if (transform.position.x > -5.5f)
        if (transform.rotation.z == 180)
        transform.Translate (0, 0.1f, 0);
         
        if (transform.position.x > -5.5f)
        if (transform.rotation.z == -90)
        transform.Translate (-0.1f, 0, 0);

        if (Input.GetKeyDown(KeyCode.X)) {
            if (Rotating == true) {
                transform.Rotate (0, 0, 90);
            }
        }
Editor is loading...
Leave a Comment