WhenLoseSecurity.cs 603 B

12345678910111213141516171819202122232425
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using System;
  4. using System.Linq;
  5. using UnityEngine;
  6. public partial class CardEffectCommons
  7. {
  8. #region Can trigger "when security cards lose" effect
  9. public static bool CanTriggerWhenLoseSecurity(Hashtable hashtable, Func<Player, bool> playerCondition)
  10. {
  11. Player Player = GetPlayerFromHashtable(hashtable);
  12. if (Player != null)
  13. {
  14. if (playerCondition == null || playerCondition(Player))
  15. {
  16. return true;
  17. }
  18. }
  19. return false;
  20. }
  21. #endregion
  22. }