You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 line
634 B

  1. using System;
  2. using CIGEnums;
  3. using SUISS.Core;
  4. using SUISSEngine;
  5. using UnityEngine;
  6. public class XPBalloon : Balloon
  7. {
  8. public XPBalloon() : base(GridTileIconType.WalkerBalloon, SpeechBaloonType.XP)
  9. {
  10. int level = SingletonMonobehaviour<CIGGameState>.Instance.Level;
  11. int value = UnityEngine.Random.Range(2 * Mathf.Max(1, level / 10), 5 * Mathf.Max(1, level / 10));
  12. this.Reward = new Currencies("XP", value);
  13. }
  14. public Currencies Reward { get; private set; }
  15. public override void Collect()
  16. {
  17. SingletonMonobehaviour<CIGGameState>.Instance.EarnCurrencies(this.Reward, this);
  18. base.Collect();
  19. }
  20. }