Untitled
unknown
plain_text
2 years ago
434 B
15
Indexable
private bool Rotating = true; void Start() {} // Update is called once per frame void Update() {if (Input.GetKeyDown(KeyCode.Z)) if (Rotating == true) {transform.Rotate(0, 0, 90);} if (Input.GetKeyDown(KeyCode.X)) if (Rotating == true) {transform.Rotate(0, 0, -90);}} private void OnTriggerEnter2D (Collider2D collider) {Rotating = false;} }
Editor is loading...
Leave a Comment