Skip to content

Commit 7e75e5a

Browse files
authored
Update TetrisBlock Step 6.cs
1 parent 28184f1 commit 7e75e5a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

TetrisBlock Step 6.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Collections.Generic;
33
using UnityEngine;
44

5-
public class TetrisBlock : MonoBehaviour
5+
public class TetrisBlock : MonoBehaviour //"TetrisBlock" MUST be renamed to whatever your script is called for the code to work!
66
{
77
public Vector3 rotationPoint;
88
private float previousTime;
@@ -33,10 +33,10 @@ void Update()
3333
}
3434
else if (Input.GetKeyDown(KeyCode.UpArrow))
3535
{
36-
//rotate !
37-
transform.RotateAround(transform.TransformPoint(rotationPoint), new Vector3(0,0,1), 90);
36+
//Rotation
37+
transform.RotateAround(transform.TransformPoint(rotationPoint), new Vector3(0,0,1), -90); //You may need to make this -90
3838
if (!ValidMove())
39-
transform.RotateAround(transform.TransformPoint(rotationPoint), new Vector3(0, 0, 1), -90);
39+
transform.RotateAround(transform.TransformPoint(rotationPoint), new Vector3(0, 0, 1), 90); //And this (+)90
4040
}
4141

4242

@@ -68,4 +68,4 @@ bool ValidMove()
6868

6969
return true;
7070
}
71-
}
71+
}

0 commit comments

Comments
 (0)