Commit c66a0045cdcde9eed694f9091b6377de24cb96a1
1 parent
4102950d
Exists in
master
and in
8 other branches
Tratamento de pontuaçcao.
Showing
1 changed file
with
42 additions
and
6 deletions
Show diff stats
Assets/Scripts/GenericPlayerManager.cs
... | ... | @@ -390,8 +390,37 @@ public abstract class GenericPlayerManager : MonoBehaviour { |
390 | 390 | spelled = false; |
391 | 391 | } |
392 | 392 | |
393 | - playAnimation(TYPE_WORD, aniName); | |
393 | + bool isPunctuation = false; | |
394 | 394 | lastAnimationSubtitle = aniName; |
395 | + | |
396 | + if (aniName[0] == '[') | |
397 | + { | |
398 | + if (aniName.Equals("[PONTO]")) | |
399 | + { | |
400 | + isPunctuation = true; | |
401 | + lastAnimationSubtitle = "."; | |
402 | + } | |
403 | + | |
404 | + else if (aniName.Equals("[INTERROGACAO]")) | |
405 | + { | |
406 | + isPunctuation = true; | |
407 | + lastAnimationSubtitle = "?"; | |
408 | + } | |
409 | + | |
410 | + else if (aniName.Equals("[EXCLAMACAO]")) | |
411 | + { | |
412 | + isPunctuation = true; | |
413 | + lastAnimationSubtitle = "!"; | |
414 | + } | |
415 | + } | |
416 | + | |
417 | + if (isPunctuation) | |
418 | + playAnimation(TYPE_WORD, aniName, lastAnimationSubtitle); | |
419 | + else | |
420 | + playAnimation(TYPE_WORD, aniName); | |
421 | + | |
422 | + /*playAnimation(TYPE_WORD, aniName); | |
423 | + lastAnimationSubtitle = aniName;*/ | |
395 | 424 | } |
396 | 425 | // Soletra palavra |
397 | 426 | else |
... | ... | @@ -401,13 +430,20 @@ public abstract class GenericPlayerManager : MonoBehaviour { |
401 | 430 | if ( ! nonexistent) |
402 | 431 | nonexistentAssetBundles.Add(aniName); |
403 | 432 | |
404 | - // Se já houve o soletramento de alguma palavra, reproduz animação default | |
405 | - if (spelled) | |
406 | - playAnimation(TYPE_NONE, DEFAULT_ANIMATION, lastAnimationSubtitle, 1.6F); | |
433 | + if (aniName[0] == '[' && (aniName.Equals("[PONTO]") || aniName.Equals("[INTERROGACAO]") || aniName.Equals("[EXCLAMACAO]"))) | |
434 | + { | |
435 | + playAnimation(TYPE_NONE, DEFAULT_ANIMATION, "", 1.6F); | |
436 | + } | |
407 | 437 | else |
408 | - spelled = true; | |
438 | + { | |
439 | + // Se já houve o soletramento de alguma palavra, reproduz animação default | |
440 | + if (spelled) | |
441 | + playAnimation(TYPE_NONE, DEFAULT_ANIMATION, lastAnimationSubtitle, 1.6F); | |
442 | + else | |
443 | + spelled = true; | |
409 | 444 | |
410 | - lastAnimationSubtitle = spellWord(aniName); | |
445 | + lastAnimationSubtitle = spellWord(aniName); | |
446 | + } | |
411 | 447 | } |
412 | 448 | } |
413 | 449 | ... | ... |