Skip to content

Commit cf67107

Browse files
committed
added android orientation, skeleton for issue #3
1 parent 5100da3 commit cf67107

File tree

2 files changed

+112
-1
lines changed

2 files changed

+112
-1
lines changed

UnityFiles/Assets/Scripts/AutoType.cs

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ void Update (){
6767
//StopCoroutine(createMessage());
6868
TypeText();
6969
}
70+
else if(Input.GetMouseButtonDown(1) && canClick == true)
71+
{
72+
remy.enabled = false;
73+
comcast.enabled = false;
74+
judge.enabled = false;
75+
explosion.enabled = false;
76+
}
7077
if (Input.GetKeyDown(KeyCode.Escape)) {
7178
Application.Quit();
7279
}
@@ -127,6 +134,108 @@ void OnGUI() {
127134
}
128135

129136
}
137+
138+
/* void ShowText()
139+
{
140+
141+
canClick = false;
142+
message = "";
143+
TwineNode1 tempNode;
144+
if(Twine.TwineData.Current.LinkTitle.Count == 1)
145+
{
146+
choice = false;
147+
if (Twine.TwineData.Current.Speaker.Count > 1)
148+
{
149+
foreach(string speakers in Twine.TwineData.Current.Speaker)
150+
{
151+
speakersList.Add(speakers);
152+
}
153+
Debug.Log("Speakers: " + speakersList.Count);
154+
foreach(string content in Twine.TwineData.Current.Content)
155+
{
156+
contentList.Add(content);
157+
}
158+
for(int i = 0; i < speakersList.Count; i++)
159+
{
160+
speaker = speakersList[i];
161+
if (speaker == "Flossopher")
162+
{
163+
remy.enabled = true;
164+
remyAudio.Play();
165+
}
166+
if (speaker == "Comcast")
167+
{
168+
comcast.enabled = true;
169+
comcastAudio.Play();
170+
}
171+
if (speaker == "Judge")
172+
{
173+
judge.enabled = true;
174+
judgeAudio.Play();
175+
}
176+
/*foreach (char letter in contentList[i])
177+
{
178+
message += letter;
179+
yield return 0;
180+
yield return new WaitForSeconds (letterPause);
181+
}
182+
message += contentList[i];
183+
Debug.Log("i: " + i + " Speakers: " + speakersList.Count);
184+
message+="\n";
185+
}
186+
if(speakersList.Count != contentList.Count)
187+
{
188+
foreach(char letter in contentList[speakersList.Count])
189+
{
190+
message += letter;
191+
yield return 0;
192+
yield return new WaitForSeconds (letterPause);
193+
}
194+
}
195+
}
196+
Twine.TwineData.NextNode(Twine.TwineData.Current.LinkData);
197+
}
198+
else
199+
{
200+
choice = true;
201+
tempNode = Twine.TwineData.Current;
202+
foreach (string currentChoice in Twine.TwineData.Current.Link)
203+
{
204+
Twine.TwineData.NextNode(currentChoice);
205+
choicesLinksList.Add(currentChoice);
206+
}
207+
208+
}
209+
else
210+
{
211+
speaker = Twine.TwineData.Current.SpeakerData;
212+
if (speaker == "Flossopher")
213+
{
214+
remy.enabled = true;
215+
remyAudio.Play();
216+
}
217+
if (speaker == "Comcast")
218+
{
219+
comcast.enabled = true;
220+
comcastAudio.Play();
221+
}
222+
if (speaker == "Judge")
223+
{
224+
judge.enabled = true;
225+
judgeAudio.Play();
226+
}
227+
foreach (char letter in Twine.TwineData.Current.ContentData.ToString())
228+
{
229+
message += letter;
230+
yield return 0;
231+
yield return new WaitForSeconds (letterPause);
232+
}
233+
}
234+
choicesList.Add (Twine.TwineData.Current.ContentData);
235+
}
236+
Twine.TwineData.Current = tempNode;
237+
}
238+
}*/
130239

131240
void TypeText () {
132241
TwineNode1 tempNode;

UnityFiles/Assets/Scripts/mainMenu.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ public class mainMenu : MonoBehaviour {
88

99
bool ShowCredits; // Use this for initialization
1010
void Start () {
11-
11+
#if UNITY_ANDROID
12+
Screen.orientation = ScreenOrientation.LandscapeLeft;
13+
#endif
1214
}
1315

1416
// Update is called once per frame

0 commit comments

Comments
 (0)