Merge pull request #22 from RIP95/master

New voice line
This commit is contained in:
Nille 2017-03-06 18:34:51 +01:00 committed by GitHub
commit 301980c5a0
4 changed files with 10 additions and 7 deletions

View File

@ -227,7 +227,6 @@ public class MainActivity extends AppCompatActivity {
}
private void answerSpeech(String input) {
List<String> greeting = Arrays.asList("ハロー", "おはよう", "こんにちは", "こんばんは");
Log.e(TAG, input);
Random randomGen = new Random();
if (input.contains("クリスティーナ")) {
@ -276,15 +275,18 @@ public class MainActivity extends AppCompatActivity {
break;
}
}
} else if (input.contains("the zombie") || input.contains("セレブセブンティーン")) {
speak(voiceLines.get(32));
} else if (input.contains("アットチャンネル") || input.contains("栗ご飯") || input.contains("カメハメハ")) {
speak(voiceLines.get(30 + randomGen.nextInt(2)));
} else if (input.contains("サリエリ") || input.contains("真帆") || input.contains("比屋定")) {
speak(voiceLines.get(26 + randomGen.nextInt(4)));
} else if (input.contains("タイムマシーン") || input.contains("cern") || input.contains("タイムトラベル")) {
speak(voiceLines.get(32 + randomGen.nextInt(5)));
speak(voiceLines.get(33 + randomGen.nextInt(5)));
} else if (input.contains("メモリー") || input.contains("アマデウス") || input.contains("サイエンス")) {
speak(voiceLines.get(37 + randomGen.nextInt(5)));
} else if (greeting.contains(input)) {
speak(voiceLines.get(38 + randomGen.nextInt(5)));
} else if (input.contains("ハロー" ) || input.contains("おはよう") || input.contains("こんにちは")
|| input.contains("こんばんは")) {
switch (randomGen.nextInt(4)) {
case 0:
speak(voiceLines.get(12));
@ -349,6 +351,7 @@ public class MainActivity extends AppCompatActivity {
voiceLines.add(new VoiceLine(R.raw.senpai_who_is_this, Mood.NORMAL, R.string.line_senpai_who_is_this));
voiceLines.add(new VoiceLine(R.raw.senpai_please_dont_tell, Mood.BLUSH, R.string.line_senpai_please_dont_tell)); //30
voiceLines.add(new VoiceLine(R.raw.still_not_happy, Mood.BLUSH, R.string.line_still_not_happy));
voiceLines.add(new VoiceLine(R.raw.dont_call_me_like_that, Mood.ANGRY, R.string.line_dont_call_me_like_that));
voiceLines.add(new VoiceLine(R.raw.tm_nonsense, Mood.DISAPPOINTED, R.string.line_tm_nonsense));
voiceLines.add(new VoiceLine(R.raw.tm_not_possible, Mood.DISAPPOINTED, R.string.line_tm_not_possible));
voiceLines.add(new VoiceLine(R.raw.tm_scientist_no_evidence, Mood.NORMAL, R.string.line_tm_scientist_no_evidence));

View File

@ -26,12 +26,11 @@
android:layout_height="wrap_content"
android:layout_above="@+id/imageView_connect"
android:layout_marginBottom="39dp"
android:fontFamily="Droid"
android:fontFamily="monospace"
android:text="@string/call"
android:textAppearance="@style/TextAppearance.AppCompat"
android:textColor="#ffdec752"
android:textSize="22.0sp"
android:typeface="monospace" />
android:textSize="22.0sp" />
<ImageView
android:id="@+id/imageView_connect"

Binary file not shown.

View File

@ -6,6 +6,7 @@
<integer name="duration">40</integer>
<string name="line_hello">Hello.</string>
<string name="line_dont_call_me_like_that">Don\'t call me like that!</string>
<string name="line_but_i_refuse">But I refuse.</string>
<string name="line_devilish_pervert">I never thought you were such a devilish pervert. I guess I misjudged you.</string>
<string name="line_i_guess">I guess.</string>