Skip to content

Commit a599ab8

Browse files
committed
Created textbox displaying score and a fact on B.E.D
1 parent 0c98dc8 commit a599ab8

File tree

4 files changed

+55
-65
lines changed

4 files changed

+55
-65
lines changed

FoodEat.lsproj

+50-56
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"document_id": "-1OqFH8GjTGpoPp2zZ3I",
44
"original_document_id": "dIqbcVOrO1eSDB40qpGf",
55
"version": "16",
6-
"lastChanged": "1572317807882",
6+
"lastChanged": "1572496578542",
77
"preview": "X:\/GitHub\/FoodEat\/icon.png",
88
"videoPreview": "",
99
"videoPreviewUpdateTime": "",
@@ -113,10 +113,6 @@
113113
"OrangeFXB",
114114
"OrangeFXB"
115115
],
116-
[
117-
"Scripts",
118-
"EndGame"
119-
],
120116
[
121117
"Scripts",
122118
"Food"
@@ -201,7 +197,6 @@
201197
"collapsedList": [
202198
[
203199
"1517446348227994:84813",
204-
"1552098026708460:14811",
205200
"1570753455106874:647122",
206201
"1570760614117554:1012517",
207202
"1570763511505657:1410750",
@@ -211,6 +206,7 @@
211206
"1571365293403311:1049785",
212207
"1571706449664511:1294706",
213208
"1571706502830686:1328856",
209+
"1571708728952881:2139141",
214210
"1571708728954637:2139153",
215211
"1571708728961922:2139389",
216212
"1571708728973708:2139683",
@@ -222,7 +218,7 @@
222218
"icon_hash": "0f258e59f96a02c89cf0fb095962faa6",
223219
"icon_path": "icon.png",
224220
"hints": [
225-
"lens_hint_open_your_mouth"
221+
"lens_hint_raise_your_eyebrows"
226222
],
227223
"lens": "Food eat",
228224
"camera": "0",
@@ -306,14 +302,6 @@
306302
"additionalProperties": "",
307303
"flags": "1"
308304
},
309-
{
310-
"resId": "13",
311-
"uid": "1552099091370900:241547",
312-
"name": "Files\/File6.js",
313-
"sourceFilePath": "",
314-
"additionalProperties": "",
315-
"flags": "1"
316-
},
317305
{
318306
"resId": "15",
319307
"uid": "1552100202460583:110136",
@@ -747,6 +735,34 @@
747735
"attachTop": "false"
748736
}
749737
}
738+
},
739+
{
740+
"k": "1572493593961842:417033",
741+
"v": {
742+
"isBasicMode": "true",
743+
"basicModeSetup": {
744+
"fixWidth": "false",
745+
"fixHeight": "false",
746+
"attachBottom": "false",
747+
"attachLeft": "false",
748+
"attachRight": "false",
749+
"attachTop": "false"
750+
}
751+
}
752+
},
753+
{
754+
"k": "1572493594011867:417637",
755+
"v": {
756+
"isBasicMode": "true",
757+
"basicModeSetup": {
758+
"fixWidth": "false",
759+
"fixHeight": "false",
760+
"attachBottom": "false",
761+
"attachLeft": "false",
762+
"attachRight": "false",
763+
"attachTop": "false"
764+
}
765+
}
750766
}
751767
],
752768
"generalData": ""
@@ -783,7 +799,9 @@
783799
"25": "1571708728973708:2139683",
784800
"26": "1571708728976179:2139879",
785801
"27": "1571708728983355:2139919",
786-
"28": "1571708728985557:2140115"
802+
"28": "1571708728985557:2140115",
803+
"29": "1572493593382363:412593",
804+
"30": "1572493593930330:416646"
787805
}
788806
},
789807
"LayerComponent": {
@@ -828,10 +846,6 @@
828846
"k": "4",
829847
"v": "Files\/File4.ttf"
830848
},
831-
{
832-
"k": "6",
833-
"v": "Files\/File6.js"
834-
},
835849
{
836850
"k": "8",
837851
"v": "Files\/File8.png"
@@ -1047,10 +1061,6 @@
10471061
"k": "8",
10481062
"v": "Fonts\/jellee_roman.ttf"
10491063
},
1050-
{
1051-
"k": "10",
1052-
"v": "Scripts\/EndGame.js"
1053-
},
10541064
{
10551065
"k": "12",
10561066
"v": "Textures\/high_score_background.png"
@@ -1191,7 +1201,7 @@
11911201
},
11921202
{
11931203
"k": "7",
1194-
"v": "0515a1a0406d1a8a8874c8a16aada934"
1204+
"v": "9afb8b14d7092416e2e0eecf99cc6116"
11951205
},
11961206
{
11971207
"k": "8",
@@ -1423,7 +1433,7 @@
14231433
},
14241434
{
14251435
"k": "73",
1426-
"v": "73ab1d379df085fd0bd49e73e2b202ed"
1436+
"v": "26fee55542c2450b1a5045d100998d50"
14271437
},
14281438
{
14291439
"k": "74",
@@ -1439,11 +1449,11 @@
14391449
},
14401450
{
14411451
"k": "77",
1442-
"v": "2ed12fb07b4d2d3907fe2e673fc1c78b"
1452+
"v": "7d3fc87924048dc888fc14593acfc785"
14431453
},
14441454
{
14451455
"k": "78",
1446-
"v": "2ed12fb07b4d2d3907fe2e673fc1c78b"
1456+
"v": "6d6636010ebdaca9fbdf9fba1e7fa2da"
14471457
},
14481458
{
14491459
"k": "79",
@@ -1455,7 +1465,7 @@
14551465
"isFolder": "true",
14561466
"lastModified": "2019-10-29T13:54:16",
14571467
"name": "Public",
1458-
"hash": "3f5a1cd4edeebadb37a0aa156d10d48a",
1468+
"hash": "d50b449f3fc7bc748019b12798a64bc3",
14591469
"children": [
14601470
{
14611471
"isFolder": "false",
@@ -1559,17 +1569,10 @@
15591569
},
15601570
{
15611571
"isFolder": "true",
1562-
"lastModified": "2019-10-29T13:56:33",
1572+
"lastModified": "2019-10-31T15:35:15",
15631573
"name": "Scripts",
1564-
"hash": "e98ab623bcfd7f9e128f7e614e85e9b8",
1574+
"hash": "8891f03989edd45a618127ad8697eb44",
15651575
"children": [
1566-
{
1567-
"isFolder": "false",
1568-
"lastModified": "2019-08-26T15:10:52",
1569-
"name": "EndGame.js",
1570-
"hash": "63a50aceab941a84b3496b1d8b88c806",
1571-
"children": ""
1572-
},
15731576
{
15741577
"isFolder": "false",
15751578
"lastModified": "2019-08-26T15:10:52",
@@ -1586,9 +1589,9 @@
15861589
},
15871590
{
15881591
"isFolder": "false",
1589-
"lastModified": "2019-10-29T13:29:04",
1592+
"lastModified": "2019-10-31T15:35:15",
15901593
"name": "FoodController.js",
1591-
"hash": "73ab1d379df085fd0bd49e73e2b202ed",
1594+
"hash": "26fee55542c2450b1a5045d100998d50",
15921595
"children": ""
15931596
},
15941597
{
@@ -1614,9 +1617,9 @@
16141617
},
16151618
{
16161619
"isFolder": "false",
1617-
"lastModified": "2019-10-29T12:46:45",
1620+
"lastModified": "2019-10-31T15:13:48",
16181621
"name": "SimpleHighScoreController.js",
1619-
"hash": "0515a1a0406d1a8a8874c8a16aada934",
1622+
"hash": "9afb8b14d7092416e2e0eecf99cc6116",
16201623
"children": ""
16211624
},
16221625
{
@@ -1854,19 +1857,6 @@
18541857
"source": "",
18551858
"additional": "",
18561859
"resources": [
1857-
{
1858-
"name": "EndGame",
1859-
"type": "4",
1860-
"subtype": "0",
1861-
"resourceId": "13",
1862-
"dependency": "0",
1863-
"uid": "1552099091370900:241547",
1864-
"fileId": "6",
1865-
"originalId": "18446744073709551615",
1866-
"publicId": "10",
1867-
"source": "",
1868-
"additional": ""
1869-
},
18701860
{
18711861
"name": "GetPosition",
18721862
"type": "4",
@@ -2365,7 +2355,11 @@
23652355
}
23662356
},
23672357
"InspectorController": {
2368-
"selection": ""
2358+
"selection": {
2359+
"objects": [
2360+
"1572493593930330:416646"
2361+
]
2362+
}
23692363
},
23702364
"EffectsController": {
23712365
"1": "",

Public/Scripts/EndGame.js

-8
This file was deleted.

Public/Scripts/SimpleHighScoreController.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
// @input Component.Text scoreText
77
// @input Component.Text highScoreText
8+
// @input Component.Text endGameText
9+
810

911
var currentScore = 0;
1012
var highScore = 0;
@@ -54,7 +56,9 @@ function resetGame() {
5456
}
5557

5658
function endGame() {
57-
print("Congratulations, you scored: " + currentScore.toString() + ". Did you know binge eating disorder is the most common eating disorder?");
59+
print("Congratulations, you scored: " + currentScore.toString() + ".");
60+
script.endGameText.enabled = true;
61+
script.endGameText.text = "Wow, you ate " + currentScore.toString() + " oranges. Did you know binge eating disorder is the most common eating disorder?";
5862
setHighScore();
5963
resetGame();
6064
}

project.data

45 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)