/// <summary>
        /// Creates a new RewardsScreen object.
        /// </summary>
        public RewardsScreen(RewardScreenMode mode, int experienceReward,
                             int goldReward, List <Gear> gearReward)
            : base()
        {
            this.IsPopup          = true;
            this.mode             = mode;
            this.experienceReward = experienceReward;
            this.goldReward       = goldReward;
            this.gearReward       = gearReward;

            maxLines    = 3;
            lineSpacing = 74;

            startIndex = 0;
            endIndex   = maxLines;

            if (endIndex > gearReward.Count)
            {
                endIndex = gearReward.Count;
            }

            // play the appropriate music
            switch (mode)
            {
            case RewardScreenMode.Combat:
                // play the combat-victory music
                AudioManager.PushMusic("WinTheme");
                break;

            case RewardScreenMode.Quest:
                // play the quest-complete music
                AudioManager.PushMusic("QuestComplete");
                break;
            }

            this.Exiting += new EventHandler(RewardsScreen_Exiting);
        }
예제 #2
0
        /// <summary>
        /// Creates a new RewardsScreen object.
        /// </summary>
        public RewardsScreen(RewardScreenMode mode, int experienceReward,
            int goldReward, List<Gear> gearReward)
            : base()
        {
            this.IsPopup = true;
            this.mode = mode;
            this.experienceReward = experienceReward;
            this.goldReward = goldReward;
            this.gearReward = gearReward;

            maxLines = 3;
            lineSpacing = 74;

            startIndex = 0;
            endIndex = maxLines;

            if (endIndex > gearReward.Count)
            {
                endIndex = gearReward.Count;
            }

            // play the appropriate music
            switch (mode)
            {
                case RewardScreenMode.Combat:
                    // play the combat-victory music
                    AudioManager.PushMusic("WinTheme");
                    break;

                case RewardScreenMode.Quest:
                    // play the quest-complete music
                    AudioManager.PushMusic("QuestComplete");
                    break;
            }

            this.Exiting += new EventHandler(RewardsScreen_Exiting);
        }