|
|
@ -5,6 +5,7 @@ using UnityEngine.UI; |
|
|
|
|
|
|
|
public class Category : MonoBehaviour |
|
|
|
{ |
|
|
|
const bool SHOW_RIGHT_ANSWERS = true; |
|
|
|
public string Name; |
|
|
|
public List<string> Elements = new List<string>(); |
|
|
|
List<string> WorkingElements = new List<string>(); |
|
|
@ -28,15 +29,23 @@ public class Category : MonoBehaviour |
|
|
|
|
|
|
|
_streak.SetActive(true); |
|
|
|
_streak.GetComponent<TMPro.TMP_Text>().text = "10"; |
|
|
|
_streak.GetComponent<TMPro.TMP_Text>().color = Color.green; |
|
|
|
if (streak > 1) |
|
|
|
{ |
|
|
|
_streak.GetComponent<TMPro.TMP_Text>().text += " x " + streak; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public void ShowFeedbackBad() |
|
|
|
public void ShowFeedbackBad(string wrongAnswer) |
|
|
|
{ |
|
|
|
ShowFeedback(_feedbackBad); |
|
|
|
|
|
|
|
if (SHOW_RIGHT_ANSWERS) |
|
|
|
{ |
|
|
|
_streak.SetActive(true); |
|
|
|
_streak.GetComponent<TMPro.TMP_Text>().text = wrongAnswer; |
|
|
|
_streak.GetComponent<TMPro.TMP_Text>().color = Color.red; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void ShowFeedback(SpriteRenderer feedback, bool show = true) |
|
|
|