void DrawExtraPoints() { if (tempPoints > 0) { MultiColoredString mcs = new MultiColoredString(); switch (tempPoints) { case (int)ScoreManager.EffectBonus.LOW: mcs.Append(new ColoredString("#00ff00ff", "+" + tempPoints.ToString())); break; case (int)ScoreManager.EffectBonus.MEDIUM: mcs.Append(new ColoredString("#00ffffff", "+" + tempPoints.ToString())); break; case (int)ScoreManager.EffectBonus.HIGH: mcs.Append(new ColoredString("#ff00ffff", "+" + tempPoints.ToString())); break; } mcs.Append(new ColoredString("#ffffffff", " " + LocalizacionManager.instance.GetTexto(249).ToUpper())); ShotFeedbackManager.Instance.SpawnShotFeedback( mcs, tempPosition, ShotFeedbackManager.ShotFeedbackTypes.EffectBonus); } }
public void SetMulticoloredText(MultiColoredString text) { _guiText.text = text.GetColoredText(); foreach (var shadowText in _shadowTexts) { shadowText.text = text.GetText(); } }
public GameObject SpawnShotFeedback(MultiColoredString feedbackText, Vector3 feedbackPosition, ShotFeedbackTypes feedbackType) { GameObject go = Instantiate(shotFeedbackPrefab) as GameObject; ShotFeedbackUnit sfu = go.GetComponent <ShotFeedbackUnit>(); if (sfu != null) { sfu.SetMulticoloredText(feedbackText); sfu.SetPosition(Camera.main.WorldToViewportPoint(feedbackPosition)); ConfigureShotFeedback(feedbackType, sfu); sfu.AdjustGUISize(); } return(go); }