Example #1
0
        public static AbstractEvent GetDefaultDeathEvent()
        {
            SpriteFontContainer spriteFontContainer = new SpriteFontContainer(SpriteFactory.GetLightSpriteFont(), Color.Red);
            String        deathMessage  = "You are Dead";
            AbstractEvent abstractEvent = new DefaultDeathEvent(new TimeSpan(0, 0, 0, 3), new TimeSpan(0, 0, 0, 5), deathMessage, spriteFontContainer);

            return(abstractEvent);
        }
Example #2
0
        public static AbstractEvent GetDefaultSubLevelTransitionEvent()
        {
            SpriteFontContainer completeFontContainer = new SpriteFontContainer(SpriteFactory.GetLightSpriteFont(), Color.Orange);
            String        completeMessage             = "Onward!";
            AbstractEvent abstractEvent = new DefaultSubLevelTransitionEvent(new TimeSpan(0, 0, 0, 0), new TimeSpan(0, 0, 0, 3),
                                                                             completeMessage, completeFontContainer);

            return(abstractEvent);
        }
Example #3
0
        public DefaultSubLevelTransitionEvent(TimeSpan timeToTextOverlay, TimeSpan timeToLevelChange, String transitionMessage, SpriteFontContainer transitionFont)
        {
            this.timeIds                   = new int[2];
            this.timeIds[0]                = ClockFactory.RegisterTimer(timeToTextOverlay);
            this.timeIds[1]                = ClockFactory.RegisterTimer(timeToLevelChange);
            this.transitionMessage         = transitionMessage;
            this.transitionFont            = transitionFont;
            this.transitionMessagePosition = new Vector2();

            ClockFactory.StartTimer(timeIds[0]);
        }
Example #4
0
        public static AbstractEvent GetDefaultLevelCompleteEvent()
        {
            SpriteFontContainer completeFontContainer = new SpriteFontContainer(SpriteFactory.GetLightSpriteFont(), Color.Azure);
            String completeMessage = "Level Complete!";
            SpriteFontContainer scoreFontContainer = new SpriteFontContainer(SpriteFactory.GetSoulsSpriteFont(), Color.Azure);
            String        scoreMessage             = "Your score is " + ScoreManager.GetScore();
            AbstractEvent abstractEvent            = new DefaultLevelCompleteEvent(new TimeSpan(0, 0, 0, 0), new TimeSpan(0, 0, 0, 3), new TimeSpan(0, 0, 0, 5),
                                                                                   completeMessage, scoreMessage, completeFontContainer, scoreFontContainer);

            return(abstractEvent);
        }
        public DefaultDeathEvent(TimeSpan timeToTextOverlay, TimeSpan timeToLevelReset,
                                 String deathMessage, SpriteFontContainer deathFont)
        {
            this.timeIds              = new int[2];
            this.timeIds[0]           = ClockFactory.RegisterTimer(timeToTextOverlay);
            this.timeIds[1]           = ClockFactory.RegisterTimer(timeToLevelReset);
            this.deathMessage         = deathMessage;
            this.deathFont            = deathFont;
            this.deathMessagePosition = new Vector2();

            ClockFactory.StartTimer(timeIds[0]);
        }
        public DefaultLevelCompleteEvent(TimeSpan timeToTextOverlay, TimeSpan timeToScoreOverlay,
                                         TimeSpan timeToLevelChange, String completeMessage, String scoreMessage, SpriteFontContainer completeFont, SpriteFontContainer scoreFont)
        {
            this.timeIds                 = new int[3];
            this.timeIds[0]              = ClockFactory.RegisterTimer(timeToTextOverlay);
            this.timeIds[1]              = ClockFactory.RegisterTimer(timeToScoreOverlay);
            this.timeIds[2]              = ClockFactory.RegisterTimer(timeToLevelChange);
            this.completeMessage         = completeMessage;
            this.scoreMessage            = scoreMessage;
            this.completeFont            = completeFont;
            this.scoreFont               = scoreFont;
            this.completeMessagePosition = new Vector2();

            ClockFactory.StartTimer(timeIds[0]);
        }