Skip to content

Commit 36f2ca5

Browse files
author
afroraydude
committed
Alpha 2
Changelog: Allows the user to make their own board. Please report any problems you have to me.
1 parent 7eebd2a commit 36f2ca5

34 files changed

+500
-7
lines changed

.vs/ScammerBingoApp/v14/.suo

-1 KB
Binary file not shown.

Assets/Canvas.prefab

84.4 KB
Binary file not shown.

Assets/Canvas.prefab.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/GameObject.prefab

4.66 KB
Binary file not shown.

Assets/GameObject.prefab.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Leve/ButtonTextChanger.unity

115 KB
Binary file not shown.

Assets/Leve/ButtonTextChanger.unity.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Leve/Main.unity

-50.8 KB
Binary file not shown.

Assets/Scripts/ButtonDisabler.cs

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,41 @@
22
using System.Collections;
33
using UnityEngine.UI;
44
using UnityEngine.Analytics;
5+
using System.IO;
56

67
public class ButtonDisabler : MonoBehaviour
78
{
89
public Button[] buttons = new Button[16];
10+
public Text[] buttonText = new Text[16];
11+
public ButtonTextHolder buttonTextHolder;
912
int score = 0;
1013
// Use this for initialization
1114
public Text scoreUI;
15+
bool finishedNames = false;
1216
Color defaultColor;
17+
public int i = 0;
1318
void Awake()
1419
{
1520
defaultColor = buttons[0].image.color;
1621
}
1722

1823
void Start()
1924
{
20-
scoreUI = scoreUI.GetComponent<Text>();
21-
defaultColor = buttons[0].image.color;
25+
26+
27+
while (!finishedNames)
28+
{
29+
if (i < 15)
30+
{
31+
buttonText[i].text = buttonTextHolder.buttontexts[i];
32+
i++;
33+
}
34+
else if (i == 15)
35+
{
36+
buttonText[i].text = buttonTextHolder.buttontexts[i];
37+
break;
38+
}
39+
}
2240
}
2341

2442
// Update is called once per frame
@@ -44,7 +62,24 @@ public void BtnOnClick(int id)
4462
score--;
4563
}
4664
}
65+
public void OnValueChanged(int idOfOption)
66+
{
67+
if (idOfOption == 1)
68+
{
69+
Application.Quit();
70+
71+
}
72+
if (idOfOption == 2)
73+
{
74+
Application.LoadLevel(2);
75+
76+
}
77+
if (idOfOption == 3)
78+
{
79+
Reset();
4780

81+
}
82+
}
4883
public void Reset()
4984
{
5085
/**
@@ -63,4 +98,6 @@ public void Reset()
6398
}*/
6499
Application.LoadLevel(0);
65100
}
101+
102+
66103
}

Assets/Scripts/ButtonNameChanger.cs

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
using UnityEngine;
2+
using UnityEngine.UI;
3+
using System.Collections;
4+
5+
public class ButtonNameChanger : MonoBehaviour {
6+
7+
public ButtonTextHolder buttonTextHolder;
8+
public InputField[] inputField = new InputField[16];
9+
int i = 0;
10+
bool finishedNames = false;
11+
// Use this for initialization
12+
void Start () {
13+
while (!finishedNames)
14+
{
15+
if (i < 15)
16+
{
17+
inputField[i].text = buttonTextHolder.buttontexts[i];
18+
i++;
19+
}
20+
else if (i == 15)
21+
{
22+
inputField[i].text = buttonTextHolder.buttontexts[i];
23+
break;
24+
}
25+
}
26+
}
27+
public void ChangeTheText()
28+
{
29+
i = 0;
30+
while(!finishedNames)
31+
{
32+
if (i < 15)
33+
{
34+
buttonTextHolder.buttontexts[i] = inputField[i].text;
35+
i++;
36+
}
37+
else if (i == 15)
38+
{
39+
buttonTextHolder.buttontexts[i] = inputField[i].text;
40+
break;
41+
}
42+
}
43+
}
44+
// Update is called once per frame
45+
void Update () {
46+
47+
}
48+
49+
public void OnValueChanged(int idOfOption)
50+
{
51+
if (idOfOption == 1)
52+
{
53+
Application.Quit();
54+
55+
}
56+
if (idOfOption == 2)
57+
{
58+
Application.LoadLevel(2);
59+
60+
}
61+
if (idOfOption == 3)
62+
{
63+
Reset();
64+
65+
}
66+
}
67+
public void Reset()
68+
{
69+
/**
70+
bool resetDone = false;
71+
int i = 0;
72+
while (!resetDone)
73+
{
74+
buttons[i].enabled = true;
75+
buttons[i].interactable = true;
76+
i++;
77+
if(i > 16)
78+
{
79+
resetDone = true;
80+
}
81+
82+
}*/
83+
Application.LoadLevel(0);
84+
}
85+
86+
}

Assets/Scripts/ButtonNameChanger.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Scripts/ButtonTextHolder.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using UnityEngine;
2+
using System.Collections;
3+
4+
public class ButtonTextHolder : MonoBehaviour {
5+
public string[] buttontexts = new string[16];
6+
// Use this for initialization
7+
void Start () {
8+
9+
}
10+
11+
// Update is called once per frame
12+
void Update () {
13+
14+
}
15+
}

Assets/Scripts/ButtonTextHolder.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Scripts/Inner.meta

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/samplesettings.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[buttontext]
2+
0=Do One Thing
3+
1=Wirus
4+
2=Doublu Doublu Doublu
5+
3=Stopped Services
6+
4=Seure Server
7+
5=Sir/Ma'm
8+
6=firewall
9+
7=One Time Charge
10+
8=Network Security
11+
9=Microsoft Certified
12+
10=Level 3/5/10 technician
13+
11=Windows + R
14+
12=cmd
15+
13=hh h
16+
14=Errors and Warnings
17+
15=Notepad

Assets/samplesettings.txt.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Library/AssetImportState

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
25;0;131073;-1
1+
5;0;6;-1

Library/EditorUserBuildSettings.asset

84 Bytes
Binary file not shown.

Library/InspectorExpandedItems.asset

88 Bytes
Binary file not shown.
Binary file not shown.
905 Bytes
Binary file not shown.

Library/UnityAssemblies/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
5.3.5f1:2.2.0.0
2-
StandaloneLinuxUniversal
2+
StandaloneWindows
33
C:/Program Files/Unity/Editor/Data/Managed/UnityEngine.dll
44
C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll
55
C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll

Library/assetDatabase3

3.03 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)