Skip to content

Commit 3806ae1

Browse files
authored
Update and rename TetrisBlock Step 7.cs to TetrisBlock Step 7 (Block Collision).cs
1 parent 239130b commit 3806ae1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
using System.Collections;
1+
using System.Collections;
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;
@@ -34,10 +34,10 @@ void Update()
3434
}
3535
else if (Input.GetKeyDown(KeyCode.UpArrow))
3636
{
37-
//rotate !
38-
transform.RotateAround(transform.TransformPoint(rotationPoint), new Vector3(0,0,1), 90);
37+
//Rotation
38+
transform.RotateAround(transform.TransformPoint(rotationPoint), new Vector3(0,0,1), -90); //You may need to make this -90
3939
if (!ValidMove())
40-
transform.RotateAround(transform.TransformPoint(rotationPoint), new Vector3(0, 0, 1), -90);
40+
transform.RotateAround(transform.TransformPoint(rotationPoint), new Vector3(0, 0, 1), 90); //And this (+)90
4141
}
4242

4343

@@ -85,4 +85,4 @@ bool ValidMove()
8585

8686
return true;
8787
}
88-
}
88+
}

0 commit comments

Comments
 (0)