Пример #1
0
 /// <summary>
 /// Constructs a peril card
 /// </summary>
 /// <param name="content">Content manager</param>
 /// <param name="spriteName">Name of the sprite to draw</param>
 /// <param name="hasMonsterSide">Determines if there is a monster effect</param>
 /// <param name="emptyFlavorText">Flavor text for empty rooms</param>
 /// <param name="emptyCondition">Condition to effect heroes in empty room</param>
 /// <param name="monsterFlavorText">Flavor text when monsters in room</param>
 /// <param name="monsterCondition">Condition to effect heroes when monsters present</param>
 public Card(bool hasMonsterSide, string emptyFlavorText, string emptyCondition, string monsterFlavorText, string monsterCondition, Rectangle source)
 {
     sourceRectangle = source;
     drawRectangle   = new Rectangle(GameConstants.HALF_WINDOW_WIDTH() - source.Width, GameConstants.HALF_WINDOW_HEIGHT() - source.Height, source.Width, source.Height);
     if (hasMonsterSide)
     {
         this.monsterFlavorText = monsterFlavorText;
         this.monsterCondition  = monsterCondition;
     }
     this.emptyFlavorText = emptyFlavorText;
     this.emptyCondition  = emptyCondition;
     this.hasMonsterSide  = hasMonsterSide;
 }
Пример #2
0
        //

        #region Constructors
        /// <summary>
        /// Constructs a search card
        /// </summary>
        /// <param name="content">Content manager</param>
        /// <param name="spriteName">Name of the sprite to draw</param>
        /// <param name="name">Name of search card</param>
        /// <param name="value">Value of search card</param>
        public Card(string name, int value, Rectangle source)
        {
            sourceRectangle = source;
            this.name       = name; this.value = value;
            drawRectangle   = new Rectangle(GameConstants.HALF_WINDOW_WIDTH() - source.Width, GameConstants.HALF_WINDOW_HEIGHT() - source.Height, source.Width, source.Height);
        }