Example #1
0
        public Clock(int startHour, int startMinutes, int startSeconds, ContentManager Content)
        {
            content       = Content;
            ClockFace     = content.Load <Texture2D>("ClockFace");
            ClockOrigin.X = (WINDOWED_SCREEN_WIDTH / 2);
            ClockOrigin.Y = (ClockFace.Height / 2);

            clocktick       = content.Load <SoundEffect>("clock-ticking");
            lowclocktick    = content.Load <SoundEffect>("low_clock-ticking");
            lowestclocktick = content.Load <SoundEffect>("lowest_clock-ticking");

            shortHand   = new ShortHand(startHour, ClockOrigin, content);
            longHand    = new LongHand(startMinutes, ClockOrigin, content);
            secondsHand = new SecondsHand(startSeconds, ClockOrigin, Content);

            ClockPos.X = (WINDOWED_SCREEN_WIDTH / 2) - (ClockFace.Width / 2);
            ClockPos.Y = 0;
            Elapsed    = 0;
        } //Constructor
Example #2
0
        public Clock(int startHour, int startMinutes, int startSeconds, ContentManager Content)
        {
            content = Content;
            ClockFace = content.Load<Texture2D>("ClockFace");
            ClockOrigin.X = (WINDOWED_SCREEN_WIDTH / 2);
            ClockOrigin.Y = (ClockFace.Height / 2);

            clocktick = content.Load<SoundEffect>("clock-ticking");
            lowclocktick = content.Load<SoundEffect>("low_clock-ticking");
            lowestclocktick = content.Load<SoundEffect>("lowest_clock-ticking");

            shortHand = new ShortHand(startHour, ClockOrigin, content);
            longHand = new LongHand(startMinutes, ClockOrigin, content);
            secondsHand = new SecondsHand(startSeconds, ClockOrigin, Content);

            ClockPos.X = (WINDOWED_SCREEN_WIDTH / 2) - (ClockFace.Width / 2);
            ClockPos.Y = 0;
            Elapsed = 0;
        }