AddJogressLevelsClass.cs 887 B

1234567891011121314151617181920212223242526272829303132
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using System;
  5. public class AddJogressLevelsClass : ICardEffect, IAddJogressLevelsEffect
  6. {
  7. Func<CardSource, Permanent, List<int>> _getJogressLevels { get; set; }
  8. public void SetUpAddJogressLevelsClass(Func<CardSource, Permanent, List<int>> getJogressLevels)
  9. {
  10. _getJogressLevels = getJogressLevels;
  11. }
  12. public List<int> GetJogressLevels(CardSource cardSource, Permanent permanent)
  13. {
  14. if (cardSource != null)
  15. {
  16. if (permanent != null)
  17. {
  18. if (permanent.TopCard != null)
  19. {
  20. if (_getJogressLevels != null)
  21. {
  22. return _getJogressLevels(cardSource, permanent);
  23. }
  24. }
  25. }
  26. }
  27. return null;
  28. }
  29. }