Represents a minion at the most basic level
Inheritance: BaseCard, IAttacker, IDamageableEntity
コード例 #1
0
        public static void OnMinionPlayed(BaseMinion minionPlayed)
        {
            // If a tree falls in a forest without any one listening...
            if (!_minionPlayedListeners.Any()) return;

            // Listeners for this are called in the order in which they were played on the board
            var sortedListeners = _minionPlayedListeners.OrderBy(kvp => kvp.Item1.TimePlayed).ToList();
            foreach (var handler in sortedListeners.Select(kvp => kvp.Item2))
            {
                handler(minionPlayed);
            }
        }
コード例 #2
0
ファイル: GameEngine.cs プロジェクト: kwluo90/HearthAnalyzer
 /// <summary>
 /// Removes all deathrattles registered by the source card.
 /// </summary>
 /// <param name="source">The triggering card</param>
 public static void UnregisterDeathrattle(BaseMinion source)
 {
     GameEngine.Deathrattles.Remove(source);
 }
コード例 #3
0
        public static void OnMinionPlaced(BaseMinion minionPlaced)
        {
            if (!_minionPlacedListeners.Any()) return;

            // Listeners for this are called in the order in which they are played on the baord
            var sortedListeners = _minionPlacedListeners.OrderBy(kvp => kvp.Item1.TimePlayed).ToList();
            foreach (var handler in sortedListeners.Select(kvp => kvp.Item2))
            {
                handler(minionPlaced);
            }
        }