RandomPromoInfo.cs 439 B

123456789101112131415161718
  1. using UnityEngine;
  2. using System.Collections;
  3. /// <summary>
  4. /// This component is responsible for choosing a random dialog to be displayed before the player starts playing
  5. /// </summary>
  6. public class RandomPromoInfo : ScreenBase
  7. {
  8. public UILabel info;
  9. public string[] infoKeys;
  10. public override void Show()
  11. {
  12. base.Show();
  13. int index = Random.Range(0, infoKeys.Length);
  14. info.text = Localization.instance.Get(infoKeys[index]);
  15. }
  16. }