Skip to content

Commit 8d151ce

Browse files
committed
📌 🎉 fixed 🔧 🐛 with reset
1 parent 2be6a8b commit 8d151ce

File tree

7 files changed

+20
-3
lines changed

7 files changed

+20
-3
lines changed

DECO3500/Assets/MyData/Scripts/FlyingBrick.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ void Update () {
5858
}
5959
}
6060

61-
//TODO: [write] function definition (99) GetConsoleNumber
61+
/**
62+
* Receives the console numbers text and from that determins what method
63+
* to use to set the brick landing position.
64+
* @param {String} string text [The console number used for determing the
65+
* brick fight position of landing.]
66+
*/
6267
public void GetConsoleNumber(string text) {
6368
int number = 0;
6469
int.TryParse(text, out number);
@@ -211,4 +216,12 @@ public void FlyNow(bool clicked) {
211216
enterButton.invalidPress();
212217
}
213218
}
219+
220+
//TODO: [write] reset function definition (99)
221+
public void reset() {
222+
Debug.Log("hfjdsahjfhdsjafhjkd");
223+
count = 0;
224+
LaunchBrick = false;
225+
countDown = 100;
226+
}
214227
}

DECO3500/Assets/MyData/Scripts/TextGaze.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class TextGaze : MonoBehaviour {
1212
private GameObject launchButton;
1313
public Material blackLaunchButton;
1414
private GameObject flyingBrick;
15+
private FlyingBrick flyingBrickScript;
1516
private Player player;
1617

1718
void Start() {
@@ -24,6 +25,7 @@ void Start() {
2425
uiHandler = handlerObject.GetComponent<UIHandler>();
2526

2627
launchButton = GameObject.Find("LaunchButton");
28+
flyingBrickScript = launchButton.GetComponent<FlyingBrick>();
2729
}
2830

2931
/*Changes the console text colour when hovered over by reticle*/
@@ -44,8 +46,10 @@ public void clickReset() {
4446
uiHandler.enterPressed = false;
4547
//brick coordinates
4648
flyingBrick.transform.position = new Vector3(-3.62f, 3.55f, -0.069f);
47-
player.userAtConsole = true; // so next method can set it to false
48-
player.atConsole();
49+
/*player.userAtConsole = true; // so next method can set it to false
50+
player.atConsole();*/
51+
player.resetTeleport();
52+
flyingBrickScript.reset();
4953
}
5054

5155
}
Binary file not shown.
Binary file not shown.

DECO3500/Library/assetDatabase3

0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)